diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-01-07 16:02:47 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-01-07 16:02:47 +0700 |
| commit | 61c9291070da3ef7f81774290db1923789792210 (patch) | |
| tree | c010ebacb209dfb57fb5fe1d23e986c4b051cac1 /indoteknik_custom/models/stock_move.py | |
| parent | c971e71a19426de6c210100e2e110319df81aafa (diff) | |
| parent | 1ec4b411c91851202a6058b531257f45fdd76457 (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 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indoteknik_custom/models/stock_move.py b/indoteknik_custom/models/stock_move.py index 8214a057..c0ac341c 100644 --- a/indoteknik_custom/models/stock_move.py +++ b/indoteknik_custom/models/stock_move.py @@ -11,6 +11,15 @@ class StockMove(models.Model): string="Print Barcode", default=lambda self: self.product_id.print_barcode, ) + qr_code_variant = fields.Binary("QR Code Variant", compute='_compute_qr_code_variant') + + def _compute_qr_code_variant(self): + for rec in self: + if rec.print_barcode and rec.print_barcode == True and rec.product_id and rec.product_id.qr_code_variant: + rec.qr_code_variant = rec.product_id.qr_code_variant + else: + rec.qr_code_variant = False + def write(self, vals): res = super(StockMove, self).write(vals) @@ -103,7 +112,7 @@ class StockMove(models.Model): # 440 is static id for "PPN Keluaran" on account.account model debit_account_id = self.picking_id.account_id.id if self.picking_id.account_id.id else 538 - tax = cost * (11 / 100) + tax = cost * (12 / 100) move_lines = self._prepare_account_move_line(qty, cost, credit_account_id, debit_account_id, description) move_lines += self._prepare_account_move_line(qty, tax, 440, debit_account_id, description) |
