19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:47 +01:00
parent accf5918df
commit 6e65e8c877
688 changed files with 225434 additions and 199401 deletions

View file

@ -11,3 +11,10 @@ class StockRule(models.Model):
new_move_vals = super(StockRule, self)._push_prepare_move_copy_values(move_to_copy, new_date)
new_move_vals["is_subcontract"] = False
return new_move_vals
def _get_stock_move_values(self, product_id, product_qty, product_uom, location_dest_id, name, origin, company_id, values):
move_values = super()._get_stock_move_values(product_id, product_qty, product_uom, location_dest_id, name, origin, company_id, values)
if not move_values.get('partner_id'):
if values.get('move_dest_ids') and values['move_dest_ids'].raw_material_production_id.subcontractor_id:
move_values['partner_id'] = values['move_dest_ids'].raw_material_production_id.subcontractor_id.id
return move_values