diff options
Diffstat (limited to 'fixco_custom/models/account_move_line.py')
| -rw-r--r-- | fixco_custom/models/account_move_line.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fixco_custom/models/account_move_line.py b/fixco_custom/models/account_move_line.py index a2a6e02..0c64fe1 100644 --- a/fixco_custom/models/account_move_line.py +++ b/fixco_custom/models/account_move_line.py @@ -6,7 +6,17 @@ class AccountMoveLine(models.Model): qty_outstanding = fields.Float(string='Qty Outstanding', compute='_compute_qty_outstanding') invoice_marketplace = fields.Text("Invoice Mearketplace", compute='_compute_invoice_marketplace') - faktur_pajak = fields.Char(string='Faktur Pajak', related='move_id.faktur_pajak') + faktur_pajak = fields.Char(string='Faktur Pajak', compute='_compute_faktur_pajak') + + def _compute_faktur_pajak(self): + for line in self: + line.faktur_pajak = False + move = line.move_id + + if not move: + continue + + line.faktur_pajak = move.efaktur_id.name if move.efaktur_id else False def action_gl_reconcile(self): lines = self |
