Friday, 3 September 2021

Odoo CRM sending email to Odoo

Odoo CRM sending email to Odoo

In odoo CRM there is facility you can configure the email address and if someone send an email the system automatic generate leads in odoo. So the user can achieve this by sending email to odoo.

Configuration

1. Activate Leads, go to CRM > Configuration > Settings and find out Leads. 

 

 2. Configure email Address in Particular Sales Team

 

This will create leads when someone sent mail to specified address. 

 

Thanks,

..Enjoy..

Friday, 3 January 2020

V 13 : Add Create invoice button in planning


As you know Odoo V13 released in October with great new features. The new module added Planning. Having great range of features and you can easily plan the hours of your employees or workers.

In some cases we need to create invoice based on planned hours. Here, the server action only need to add. And you are able to create invoice from planning.

Server Action:

for rec in records:
  partner_id = rec.employee_id.address_home_id
  price_unit = rec.employee_id.timesheet_cost
  invoice = env['account.move'].create({
    'type': 'out_invoice',
    'partner_id': partner_id.id,
    'invoice_line_ids': [(0, 0, {
                                'quantity': rec.allocated_hours,
                                'price_unit': price_unit,
                                'name': 'Emp. Planned Hours'
                                })
                        ]})
  invoice.post()
  action = {
    'type': 'ir.actions.act_window',
    'res_id': invoice.id,
    'res_model': 'account.move',
    'views': [(env.ref('account.view_move_form').id, 'form')],
  }


Youtube Video :



..Enjoy..

Sunday, 8 December 2019

V13 : Record Rule Domain Changes not applied


Sometimes the record rule not working correctly even we wrote correct the record rule. There are many reason but one of the reason is records saved in cache.

In this cases you have to clear the cache.

Problem :
Let's take one example suppose on user I have field product category and I want to show these product categories Manufacturing order to user.



Record Rule:

[('product_id.categ_id','in',[g.id for g in user.x_studio_product_category])]



Solution:
----------

in mrp.production ass search_read method and clear the cache

    @api.model
    def search_read(self, domain=None, fields=None, offset=0, limit=None, order=None):
        self.clear_caches()
        res = super(MrpProduction, self).search_read(domain, fields, offset, limit, order)
        return res

Video:



Contact for any Odoo Services

..Enjoy..

Tuesday, 3 December 2019

Remove 'CREATE AND EDIT' from One2many and/or many2one



Remove 'CREATE AND EDIT'  from One2many and/or many2one :

In Tree view:


<tree string="Journal Items" create="false" edit="false" delete="false">


In Kanban View:


<kanban class="o_kanban_mobile" create="false" delete="false">

Options:

- create="false" => This will not allow to create record on the fly

- edit="false" => no option to edit the record

- delete="false" => do not allow the user to delete the record

- limit="10" => This will limit the records in tree view pager


Sunday, 8 April 2018

Odoo Analytic Defaults

Analytic Defaults

This module is very important for you if you are working with Analytic Accounting. This allows you to Set default values for your analytic accounts.

How it helps me ?

Let's take one simple example to understand this. Suppose, you have different department in Organisation like Research and Development, HR Department,...

You allocated amount to various departments(thank to Analytic Distribution ). Now you have all users configured and whenever the responsible user login and add entry like invoice the system by default take the department analytic department to know the cost vs revenue of each department.

If we have case like this then this module helps us to default set analytic account based on,

  • Product
  • Partner
  • User
  • Company
  • Date


How it works in Odoo ?


  • Install module

  • Go to Accounting > Configuration > Analytic Accounting > Analytic Defaults

Here, the analytic account "Research & Development" apply on sales order and invoice based on different conditions.
Apply based on , Product, User, Partner.

Video



For more subscribe channel :  http://www.youtube.com/c/PinakinNayi
..Enjoy..