diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-12-13 15:55:13 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-12-13 15:55:13 +0700 |
| commit | a9727da77122abc067ab7ff59100fc28eda50642 (patch) | |
| tree | b9c0500739518211f1c54ad7f02047872f834afc /indoteknik_custom/models/stock_move.py | |
| parent | 5343cbd0bfceb6bd50dbbed55a1de4b116f5fef4 (diff) | |
| parent | 335d724a7f359223138de74bf682cfc3530b5ea7 (diff) | |
Merge branch 'production' into iman/pengajuan-tempo
Diffstat (limited to 'indoteknik_custom/models/stock_move.py')
| -rw-r--r-- | indoteknik_custom/models/stock_move.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_move.py b/indoteknik_custom/models/stock_move.py index ac2e3cc0..8214a057 100644 --- a/indoteknik_custom/models/stock_move.py +++ b/indoteknik_custom/models/stock_move.py @@ -7,6 +7,18 @@ class StockMove(models.Model): line_no = fields.Integer('No', default=0) sale_id = fields.Many2one('sale.order', string='SO') + print_barcode = fields.Boolean( + string="Print Barcode", + default=lambda self: self.product_id.print_barcode, + ) + + def write(self, vals): + res = super(StockMove, self).write(vals) + if 'print_barcode' in vals: + for line in self: + if line.product_id: + line.product_id.print_barcode = vals['print_barcode'] + return res def _do_unreserve(self, product=None, quantity=False): moves_to_unreserve = OrderedSet() |
