Daily updates from Odoo
Wednesday, June 12, 2024
14 changes · 17.0
Enhancements to existing features
Users can now attach CFDI invoice files directly to existing vendor bills instead of having to create bills from scratch. When a CFDI invoice is attached to a bill without an associated invoice, the fiscal folio information is automatically populated, making it easier to match bills with their corresponding CFDI documents even when line items or prices differ.
Original PR description
Previously, you could only link a vendor bill with a CFDI invoice file by creating the bill directly from it. In a lot of cases, Odoo is unable to match bills created from the CFDI file with the corresponding purchase order for various reasons (eg: different line items, different prices, etc), and it is currently impossible to link them by hand. This commit makes it so that when you attach a CFDI invoice to a vendor bill, if that bill does not already have an associated CFDI invoice, it becomes associated with that CFDI invoice, and the fiscal folio is automatically filled in from the document. If there are lines on the vendor bill, lines from the CFDI invoice are ignored, if there are none they are filled in as normal. task-3731034
The AHL (Annual Housing Levy) deduction calculation for Kenya payroll has been updated to apply a 15% deduction on the AHL amount with a maximum cap of 9,000 KES. This ensures accurate and compliant payroll processing for Kenyan employees by implementing the latest AHL computation rules.
Original PR description
This commit adds the new rule for the AHL computation where a deduction is applied as 15 percent of the AHL amount capped at 9ksh. Note the l10n_ke_employees_salary_ahl_amount is the same except the sequence its just reordered task-3911725
The WhatsApp messaging feature in Odoo's Discuss app now displays dynamic partner avatars for each WhatsApp channel instead of a generic static image. This makes conversations more personalized and easier to identify, as each channel now shows the actual profile picture of the associated contact.
Original PR description
In the Discuss app, update the avatar for each WhatsApp channel category message, from a static to a dynamic one. The avatar image is fetched from the associated partner. task-3908710 Forward-Port-Of: odoo/enterprise#64102 Forward-Port-Of: odoo/enterprise#63078
Resolved issues and error corrections
This fix resolves an issue where the "Disabled children" toggle was not appearing in the salary configurator for Belgian employees, even when disabled children were configured in their profile. The problem occurred because a method was being called without proper event handling, causing the disabled children field to be incorrectly hidden. The fix ensures the toggle displays correctly so HR teams can properly configure salary options for employees with disabled dependents.
Original PR description
## Issue: When configuring an employee before sending the salary configurator, if we set up children and disabled children for the employee, the option to enable/disable them in the salary…
## Issue: When configuring an employee before sending the salary configurator, if we set up children and disabled children for the employee, the option to enable/disable them in the salary configurator does not appear. ## Steps To Reproduce: - on the runbot change the company to "my Belgian company". - In Laurie Poiret's employee profile, on the "personal information" tab, change the value for children to 2 and set 1 as disabled. - Go to Laurie Poiret's contract (stat button) and generate an offer. - From the offer, navigate to the salary configurator. - In the salary configurator, proceed until you reach the family status section. - Notice that the "Disabled children" Toggle does not appear unless you change the value of the children input. ## Solution: - The `onchangeChildren` method is being invoked in the `start` method without an `event` argument (`event` is `undefined`). This results in `event.currentTarget` being `undefined`, causing the `childCount` variable to be `NaN` and `disabledChildrenNumber` to get disabled at the end of the method. - to fix the problem, we added a check for `event` argument in the event handler, if it is not present, we fallback to getting the children input value using JQuery and it solves the issue. **opw-3925640** Forward-Port-Of: odoo/enterprise#64347 Forward-Port-Of: odoo/enterprise#63535
A recent update to the subscription module inadvertently prevented non-sales users (such as stock managers) from accessing the product creation form. This fix restores access by properly configuring user permissions for the new subscription pricing field, allowing all relevant team members to work with products without restrictions.
Original PR description
A new field of type 'sale.subscription.pricing' was added to the 'product.template' model. This breaks product creation form for users who don't have sales permissions (e.g. stock managers). This commit fixes the issue by adding `groups` to the field.
This fix addresses two validation issues in the Documents module when users clear required fields in the document inspector. When a required field like Name or Workspace is cleared, the system now properly displays an alert dialog and reverts the changes when the user confirms, instead of either showing no alert or incorrectly saving empty values. This ensures data integrity by preventing documents from being saved with missing required information.
Original PR description
**Steps to reproduce:** - Go to list view or kanban view. - Select the document to preview in the inspector. - Clear the input value of a required field (here, Name or Workspace), and click elsewhere…
**Steps to reproduce:**
- Go to list view or kanban view.
- Select the document to preview in the inspector.
- Clear the input value of a required field (here, Name or Workspace), and click elsewhere or press 'Enter'.
**Issues:**
- _**Workspace field**_
A validation error is raised when a Workspace name is cleared. However, an alert dialog is not displayed.
- _**Name field**_
An alert dialog indicating a validation error is shown yet on clicking the `OK` button, the unnamed document is saved as is.
Instead, the changes should be reverted.
**Causes:**
- _**Workspace field**_
The `required` attribute was not added to `folder_id` field in the view. As a result, alert dialog was not shown.
- _**Name field**_
The config mode never changes to 'edit'. Even when a user is editing an inspector field, the mode is 'readonly'.
As a result, the boolean `isInEdition` remains false and the code-block meant to be executed
on click of the confirm button of alert dialog does not execute as intended.
**Fix:**
- _**Workspace field**_
The `required` attribute is forcefully set to true for the `folder_id` field so that an empty value for workspace
is not considered to be a 'validSelection' and the user faces an alert popup.
- _**Name field**_
This PR fixes the issue by switching to edit mode whenever user changes the value of a document inspector field.
This PR also adds a testcase in `documents_kanban_tests.js` to ensure that the confirm ('OK') button works as intended.
Task: [3799280](https://www.odoo.com/web#id=3799280&menu_id=4722&cids=2&action=333&active_id=10888&model=project.task&view_type=form)This fix prevents chatbot configuration errors by validating that an Email step exists before a Create Ticket step. Previously, misconfigured chatbots would break during operation. Now, the system catches these configuration issues upfront with a clear validation error message, ensuring a smoother user experience.
Original PR description
**Before this PR:** When you have a `Create ticket` step in your ChatBot script steps, but you don't have an `Email` step prior to that. Then it will break the flow of ChatBot, as an email is required to create a helpdesk ticket. **After this PR:** It will raise a `ValidationError` if it fails to validate the steps while configuring the chatbot script steps. **task**-[3547675](https://www.odoo.com/web#id=3547675&menu_id=6478&cids=2&action=4043&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#64394 Forward-Port-Of: odoo/enterprise#56802
This fix resolves an error that occurred when users attempted to reconcile accounting lines with different currencies using the write-off wizard. The system was incorrectly trying to process multiple currency records at once, causing the reconciliation process to fail. Users can now successfully reconcile multi-currency transactions without encountering this error.
Original PR description
When trying to reconcile to debit or credit lines with different currencies, we get a singleton error on `wizard.reco_currency_id` in `_compute_is_write_off_required` opw-3833477 Forward-Port-Of: odoo/enterprise#64011
Fixed an issue where project administrators couldn't rename projects when the Documents module was installed. The system now properly handles folder name updates in the Documents module without requiring additional permissions, allowing project admins to manage their projects seamlessly.
Original PR description
To reproduce: ============= - install Project and Documents - create a project - give the user the project admin rights and **User** rights for the Documents module - try to rename a project -> access error Problem: ======== when Document is installed, every project has a related folder in the Documents. When renaming a project, the folder name should be updated as well. As the user has no rights to write on Documents, the renaming fails. Solution: ========= set the folder name as `sudo` to avoid access errors opw-3928018 Forward-Port-Of: odoo/enterprise#63787
This fix ensures that when users select an email template with CC recipients for follow-up emails in the Accounting module, those CC addresses are properly added to the email recipients list. Previously, CC addresses from templates were only included when loading the template in the full view, not when selecting it in the quick template field. This update makes the behavior consistent across both methods.
Original PR description
### Steps to reproduce the issue: 1. Go to _Settings > Technical > Email > Email Templates_ 2. Select a template that applies to a Contact 3. Add a mail address in the Cc field 4. Go to _Accounting >…
### Steps to reproduce the issue: 1. Go to _Settings > Technical > Email > Email Templates_ 2. Select a template that applies to a Contact 3. Add a mail address in the Cc field 4. Go to _Accounting > Customers > Follow-up Reports_ select one of the reports 5. Click on "Follow up" 6. Select the template with the Cc in the Content Template field 7. The Cc address is not added to the Email Recipients field 8. Click on Send Message in the chatter 9. Open the full view and add the template with the Cc in the Load template field 10. The Cc address is added to the Recipients field ### Explanation: The field `email_recipient_ids` is not a computed field. Because of it, there is no change called when `template_id` is assigned a new value. ### Suggested fix: We need to change `email_recipients_ids` according to `template_id` while keeping its current properties (stored, writable). The method is adapted from `mail.compose.message._compute_partner_ids`. https://github.com/odoo/odoo/blob/1849b709f1acf0f5546582bf7551129a870e3113/addons/mail/wizard/mail_compose_message.py#L482-L496 opw-3878125 Forward-Port-Of: odoo/enterprise#63918 Forward-Port-Of: odoo/enterprise#61861
This fix resolves a validation error that occurred when generating delivery guides for products that may be hazardous under Mexican regulations. The system now properly handles products with uncertain hazard classifications by allowing users to explicitly indicate whether such products should be treated as hazardous or non-hazardous, preventing delivery guide generation failures.
Original PR description
With an MX company setup Create a product with: - UNSPSC Category: 12352106 Ácidos orgánicos o sus sustitutos - Hazardous Material Designation Code (MX): - Hazardous Packaging (MX): - Tariff…
With an MX company setup Create a product with: - UNSPSC Category: 12352106 Ácidos orgánicos o sus sustitutos - Hazardous Material Designation Code (MX): - Hazardous Packaging (MX): - Tariff Fraction: 2917190800 Ácido fumárico. - UMT Aduana: kg - Weight: 1.00 Create a Sale Order with the product Confirm Go to Delivery Set: - Tansport Type: Federal Highways - In MX Tab add 'Vehicle Setup' and 'Gross Vehicle Weight' Validate and Generate Delivery Guide Error: Code : CP155 Message : El valor registrado en el atributo "Mercancia:MaterialPeligroso" no es válido o el valor registrado en el atributo “Mercancias:Mercancia:BienesTransp” contiene el valor "0" (cero) en la columna "Material peligroso" del catálogo catCartaPorte:c_ClaveProdServCP. This occurs because the MarierialPeligroso element is not filled In the ClaveProdServ tab of the CatalogoCartaPorte30 it is specified if a product or service is (1), not is (0) or may be (0,1) considered hazardous When having to deal with "may be" hazardous products it is required to set the 'MaterialPeligroso' element. Currently, the system does not allow to specify if the "may be" product is actually hazardous, but if the 'Hazardous Material Designation Code (MX)' field is not set the MaterialPeligroso element will not be filled, failing the validation The proposed workaround is to use the value '0' as flag to indicate that the maybe hazardous product should not be considered hazardous and 'MaterialPeligroso' will be set to 'No' opw-3955361 task-3668225 Forward-Port-Of: odoo/enterprise#64153 Forward-Port-Of: odoo/enterprise#63832
This update fixes an issue where appointment type intro messages couldn't be edited through the website editor if they hadn't been set yet. The fix adjusts how the intro message element is positioned and selected in the editor, making it properly editable for users who want to customize their appointment booking pages.
Original PR description
Purpose ======= Fix the appointment type intro message which, if not set yet, wasn't available for edition using the website editor. Specification ============= The "o_appointment_intro" element has been changed from inside, to next to the "o_appointment" element. Changing the selector to match the new "o_appointment_intro" position. Ref commit: https://github.com/odoo/enterprise/commit/4f68079b535c1ea54c42ae8dabae903f88d6e87f Also combining the 2 separate conditions that adds the d-none class into 1 single OR-ed condition for readability. Task-3976356
This fix resolves an issue where quotations created from CRM opportunities were not automatically using the partner's configured usage value. Previously, quotations would always default to "General Usage" instead of inheriting the partner's setting. Now the system correctly applies the partner's usage preference when creating new quotations.
Original PR description
Problem: When the user creates a new quotation from a CRM opportunity, the quotation does not compute to the partner's usage value and always default to "General Usage". The default prevents the compute from getting called. Purpose: The compute method "_compute_l10n_mx_edi_usage" should be called when a new quotation is created from the crm opportunity. Steps to Reproduce on Runbot17: 1. Install Sales, l10n_mx, l10n_mx_edi, CRM, Contacts 2. Set a value for field "Usage" (l10n_mx_edi_usage) on a partner whose country is Mexico in Contacts 3. Create a CRM opportunity with the partner above 4. Create a new quotation from the opportunity and observe that the "Usage" value is not the same as defined on the partner opw-3934009
This update fixes a crash that occurred when users tried to access call activities that had been removed from the Call Queue. The system now properly refreshes the display when call activities are added or removed, ensuring users always see current information and can safely interact with their call queue without encountering errors.
Original PR description
When call activity gets deleted or added, the related component has to be re-rendered so that most uptodate information is shown, otherwise this might lead to crash if those activities are accessed. To mitigate the issue, component re-rendering is invoked when call activity gets added or removed from the queue. The activity removal happens when `delete_call_activity` function is invoked directly, which crafts domain, to search the activies that are outdated. Steps to reproduce: - on crm lead schedule call activity and make sure that activity is old - book activity and save it - add it to Call Queue - remove it from Call Queue - try to access it/click on it Forward-Port-Of: odoo/enterprise#64325