Wednesday 12 October 2022

Get Many2Many data in query

 Collect data of many2many in SQL query.

Sometimes in query needed to get all customer/partner data including tags. Here example to get all customer tags data in query.


select as "Partner Name", as "Phone",

(select STRING_AGG(,',') from res_partner_category ctg  left join res_partner_res_partner_category_rel ct ON where as "Tags"

from res_partner;

Tuesday 15 March 2022

Odoo 15: Send email to all followers with email template

Send Email to all followers

Here simple solution to send email to all followers or you custom the followers (exclude).

In your code file define the function to send email.

    def action_lead_mail_send(self):
        group_id_list = []
        ir_model_data = self.env['']
        group_id_list.append(ir_model_data.get_object_reference('sales_team', 'group_sale_manager')[1])
        users_email = ",".join([ for user in self.env['res.groups'].browse(group_id_list).users if])
        # read email template
        template_id = ir_model_data.get_object_reference('crm_notification', 'email_template_meeting')[1]
        template = self.env['mail.template'].browse(template_id)
            'email_to': users_email or '',
        return True

So, here you can customise the email receivers. You can also add the followers of the record.You can also exclude the followers and send email.


Friday 24 December 2021

Odoo V15: Exclusive


1. How to activate Cookie Bar in Odoo 15 ?

From the website settings you can activate customisable cookie bar in Odoo 15

2. Search bar building block in Odoo 15

3. Odoo 15 : Optional product, Alternative / Similar product, Accessory product

In Odoo have facility to set different suggestion to your visitors.

Alternative Product means similar products you can suggest to your customer when they are checking product.

4. Odoo 15: Invoice specific timesheet period entries only

Odoo gives you facility to choose the specific period for timesheet to invoice

You can invoice timesheets from specific period

5. Overtime in Odoo 15

Difference between the number of hours recorded and the number of hours the employee was supposed to work according to his contract

more , coming soon....

Saturday 4 September 2021

Lead Time Calculation


If Today 4th September and validate sales order,

Product : Macbook Air

Routes : Buy + Make to Order

Customer Lead Time : 10 Days

Vendor Lead Time : 6 Days

Purchase Company Security Lead Time : 2 Days


Purchase Order Date (Order Deadline) : 6th September 

(Order Date: 4st September+Customer Lead Time: 10 Days) - Vendor Lead Time(6 Days) - security lead time (2 Days)

Receipt Date: 12th September (Order Date + Vendor Lead Time)

6th September + 6 Days = 12th September





Odoo 14: CRM Functionality

 Odoo CRM : Game Changer

In odoo CRM, you can generate Sales orders and Quotations from Opportunity. Here, there are possibilities you can generate several quotations and Sales orders from Opportunity.



Sales Team Configuration,

In Odoo V12, from sales team we can know the exact situation of any sales team. In below screenshot you can see the order to invoice that will shows the all the invoices which are in Open or In Payment or Paid state.

Also the untaxed total amount calculated based on All Confirmed or Done sales order of this sales team.


In the Opportunity there is possibility to change the probability based on stage change.

Odoo V12:


 Odoo V14:

In Odoo V14 the probability calculated based on past records. 

Predictive lead scoring is computing the lead probability, based on won and lost leads from the past
    # Each won/lost lead increments a frequency table, where we store, for each field/value couple, the number of
    # won and lost leads.
    #   E.g. : A won lead from Belgium will increase the won count of the frequency country_id='Belgium' by 1.
    # The frequencies are split by team_id, so each team has his own frequencies environment. (Team A doesn't impact B)
    # There are two main ways to build the frequency table:
    #   - Live Increment: At each Won/lost, we increment directly the frequencies based on the lead values.
    #       Done right BEFORE writing the lead as won or lost.
    #       We consider a lead that will be marked as won or lost.
    #       Used each time a lead is won or lost, to ensure frequency table is always up to date
    #   - One shot Rebuild: empty the frequency table and rebuild it from scratch, based on every already won/lost leads
    #       Done during cron process.
    #       We consider all the leads that have been already won or lost.
    #       Used in one shot, when modifying the criteria to take into account (fields or reference date)