Tuesday, September 17, 2024
2 changes · 17.0
Enhancements to existing features
The Spanish localization now sets deferred account defaults in its accounting template. This helps Spanish companies apply the correct accounting setup more consistently and reduces manual configuration during setup.
Original PR description
This commit will set the deferred accounts for spain template. task: 4181499 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Stock move line selection can now respect extra selection rules configured on the field. This lets businesses tailor which lots or move lines users can choose without requiring a custom JavaScript workaround.
Original PR description
The custom stock.move.line's x2many field computes a domain automatically for the SML that can be selected from the stock.move records (e.g. when trying to find a specific lot, etc. to fulfill a demand).
This commit makes it possible to include the domain defined on the field in the final constructed domain, making it possible to somewhat customize this behaviour without the need for a js override.
Task-4116000
-----------
Example of customization made possible with this:
Have a computed field `x_allowed_lot_ids` on the stock.move and restrict the selection of the lots to this domain by modifying the view `stock.view_stock_move_operations`:
```xml
<field name="move_line_ids" domain="[('lot_id', 'in', x_allowed_lot_ids)]" [...] widget="sml_x2_many"/>
```
without this commit, the `domain` attribute set on the field is simply ignored and it would require a more complex js custo (we could live with it)