Saturday, January 4, 2025
2 changes · saas-18.1
Miscellaneous changes
## Description Integration between `event.event` <-> `crm.lead` heavily depends on the fkey `crm.lead.event_id`. There are multitude of `search`/ `read_group` just based on it. Adding an index to avoid guaranteed `Seq.Scan` on `crm.lead`, as it's a table that tends to grow large on average. ## Reference task-3977976 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191314
Original PR description
## Description Integration between `event.event` <-> `crm.lead` heavily depends on the fkey `crm.lead.event_id`. There are multitude of `search`/ `read_group` just based on it. Adding an index to avoid guaranteed `Seq.Scan` on `crm.lead`, as it's a table that tends to grow large on average. ## Reference task-3977976 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191314
Before this PR: - The bill type was determined based only on whether the section code was 'cdnr'. This resulted in all documents under this section being classified as credit notes, regardless of their actual type. After this PR: - The bill type is now determined by checking both the section code and the document type. If the section code is 'cdnr' and the document type is 'C', the bill is classified as a credit note. Otherwise, it defaults to a regular bill or debit note as applicable.
Original PR description
Before this PR:
- The bill type was determined based only on whether the section code was 'cdnr'. This resulted in all documents under this section being classified as credit notes, regardless of their actual type.
After this PR:
- The bill type is now determined by checking both the section code and the document type. If the section code is 'cdnr' and the document type is 'C', the bill is classified as a credit note. Otherwise, it defaults to a regular bill or debit note as applicable.
Why:
- This change ensures accurate classification of documents under the 'cdnr' section, distinguishing between credit notes ('C') and debit notes ('D').
Forward-Port-Of: odoo/enterprise#76427