diff options
| -rw-r--r-- | indoteknik_custom/models/account_move.py | 7 | ||||
| -rw-r--r-- | indoteknik_custom/views/account_move.xml | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index d55cca38..699191d6 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -32,13 +32,6 @@ class AccountMove(models.Model): no_faktur_pajak = fields.Char(string='No Faktur Pajak') date_completed = fields.Datetime(string='Date Completed') - @api.onchange('efaktur_id') - def change_efaktur_id(self): - for invoice in self: - if not invoice.efaktur_id: - return - invoice.no_faktur_pajak = invoice.efaktur_id.name - def _compute_due_line(self): for invoice in self: invoice.due_line = self.env['due.extension.line'].search([ diff --git a/indoteknik_custom/views/account_move.xml b/indoteknik_custom/views/account_move.xml index 1721abb6..b0a206bf 100644 --- a/indoteknik_custom/views/account_move.xml +++ b/indoteknik_custom/views/account_move.xml @@ -17,7 +17,7 @@ <field name="date_completed" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/> </field> <field name="efaktur_document" position="before"> - <field name="no_faktur_pajak" readonly="1"/> + <field name="no_faktur_pajak" attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}"/> </field> <field name="efaktur_document" position="attributes"> <attribute name="widget">pdf_viewer</attribute> |
