diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-03-27 14:38:57 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-03-27 14:38:57 +0700 |
| commit | e926482af5f2b95ff465445215c77161223ee671 (patch) | |
| tree | 3005696f1fb0857930f09e5c0eca4063e35b2e76 /indoteknik_custom/models/stock_move.py | |
| parent | db3ff0677f9c6ddd0f04ebcf3e9c780045259f73 (diff) | |
push
Diffstat (limited to 'indoteknik_custom/models/stock_move.py')
| -rw-r--r-- | indoteknik_custom/models/stock_move.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/stock_move.py b/indoteknik_custom/models/stock_move.py index b5fc782e..87b1c94e 100644 --- a/indoteknik_custom/models/stock_move.py +++ b/indoteknik_custom/models/stock_move.py @@ -15,8 +15,8 @@ class StockMove(models.Model): barcode = fields.Char(string='Barcode', related='product_id.barcode') vendor_id = fields.Many2one('res.partner' ,string='Vendor') - @api.onchange('product_id') - def onchange_product_to_fill_vendor(self): + @api.constrains('product_id') + def constrains_product_to_fill_vendor(self): if self.product_id: if self.product_id.x_manufacture.override_vendor_id: self.vendor_id = self.product_id.x_manufacture.override_vendor_id.id |
