Commit Graph

8 Commits

Author SHA1 Message Date
Ivàn Todorovich
5dde8e261e [IMP] mrp_bom_attribute_match: use constraints and computed fields
Instead of updates triggered by onchanges or writes, use constraints
to execute all checks, and a computed field for `match_on_attribute_ids`
2022-10-31 08:14:03 -03:00
Ivàn Todorovich
30a41e1711 [IMP] mrp_bom_attribute_match: Drop the web_field_domain dependency.
The same result can be achieved with a computed field.
Moreover, we have one already in odoo core. Originally it was a related
field, but we can change it to a computed and add our extra logic there.
2022-10-27 16:42:33 -03:00
Ivàn Todorovich
ce303be6d7 [IMP] mrp_bom_attribute_match: make private methods, private
These methods shouldn't be exposed to xmlrpc.
2022-10-26 14:49:45 -03:00
Ivàn Todorovich
3e4a5ed007 [FIX] mrp_bom_attribute_match: write products recordset
The check expects a single record, so it should be processed accordingly.
2022-10-26 14:49:44 -03:00
Ivàn Todorovich
6e0daadbde [FIX] mrp_bom_attribute_match: properly translate strings 2022-10-26 14:49:44 -03:00
Ivàn Todorovich
685370373e [MIG] mrp_bom_attribute_match: Migration to 15.0
Notes:

* `_get_product2bom` renamed to `_bom_find`
* Test case `test_manufacturing_order_2`:
  * No longer check for "Add some materials to consume before marking this MO as to do.",
    as it's already supported in core since https://github.com/odoo/odoo/commit/bf5e1debf
2022-10-26 14:49:43 -03:00
Ilyas
b72c4daca0 [14.0][FIX] bom_attribute_match: BOM unit of measure should match uom of a component_template_id. 2022-10-26 14:49:43 -03:00
Ilyas
c66253cb91 [14.0][ADD] mrp_bom_attribute_match 2022-10-26 14:49:39 -03:00