diff options
| -rw-r--r-- | indoteknik_custom/models/unpaid_invoice_view.py | 11 | ||||
| -rw-r--r-- | indoteknik_custom/views/unpaid_invoice_view.xml | 39 |
2 files changed, 42 insertions, 8 deletions
diff --git a/indoteknik_custom/models/unpaid_invoice_view.py b/indoteknik_custom/models/unpaid_invoice_view.py index 517d078b..f6ce79b8 100644 --- a/indoteknik_custom/models/unpaid_invoice_view.py +++ b/indoteknik_custom/models/unpaid_invoice_view.py @@ -9,21 +9,22 @@ class UnpaidInvoiceView(models.Model): partner_id = fields.Many2one('res.partner', string='Partner') partner_name = fields.Char(string='Partner Name') - email = fields.Char() - phone = fields.Char() + # email = fields.Char() + # phone = fields.Char() invoice_id = fields.Many2one('account.move', string='Invoice') invoice_number = fields.Char(string='Invoice Number') invoice_date = fields.Date() invoice_date_due = fields.Date(string='Due Date') + date_terima_tukar_faktur = fields.Date(string='Terima Faktur') currency_id = fields.Many2one('res.currency', string='Currency') - amount_total = fields.Monetary(string='Total', currency_field='currency_id') - amount_residual = fields.Monetary(string='Residual', currency_field='currency_id') + amount_total = fields.Monetary(string='Total Amount', currency_field='currency_id') + amount_residual = fields.Monetary(string='Sisa Amount', currency_field='currency_id') payment_state = fields.Selection([ ('not_paid','Not Paid'), ('in_payment','In Payment'), ('paid','Paid'), ('reversed','Reversed') ], string='Payment State') - payment_term = fields.Char() + payment_term_id = fields.Many2one('account.payment.term', string='Payment Term') invoice_day_to_due = fields.Integer(string="Day to Due") new_invoice_day_to_due = fields.Integer(string="New Day Due") diff --git a/indoteknik_custom/views/unpaid_invoice_view.xml b/indoteknik_custom/views/unpaid_invoice_view.xml index 19cc07a6..0bbba60a 100644 --- a/indoteknik_custom/views/unpaid_invoice_view.xml +++ b/indoteknik_custom/views/unpaid_invoice_view.xml @@ -8,7 +8,9 @@ <field name="partner_id"/> <field name="invoice_number"/> <field name="invoice_date"/> - <field name="invoice_date_due" widget="badge" decoration-danger="invoice_day_to_due < 0" /> + <field name="date_terima_tukar_faktur"/> + <field name="payment_term_id"/> + <field name="invoice_date_due" widget="badge" decoration-danger="invoice_day_to_due < 0"/> <field name="invoice_day_to_due" readonly="1"/> <field name="new_invoice_day_to_due" readonly="1"/> <field name="amount_total"/> @@ -17,17 +19,48 @@ decoration-danger="payment_state == 'not_paid'" decoration-warning="payment_state in ('partial', 'in_payment')" decoration-success="payment_state in ('paid', 'reversed')"/> - <field name="payment_term"/> </tree> </field> </record> + <!-- Form view --> + <record id="view_unpaid_invoice_form" model="ir.ui.view"> + <field name="name">unpaid.invoice.view.form</field> + <field name="model">unpaid.invoice.view</field> + <field name="arch" type="xml"> + <form string="Unpaid Invoice Detail" create="false" edit="false" delete="false"> + <sheet> + <group> + <group> + <field name="partner_id"/> + <field name="invoice_id"/> + <field name="invoice_date"/> + <field name="invoice_date_due" widget="badge" decoration-danger="invoice_day_to_due < 0"/> + <field name="date_terima_tukar_faktur"/> + <field name="payment_term_id"/> + </group> + <group> + <field name="invoice_day_to_due"/> + <field name="new_invoice_day_to_due"/> + <field name="payment_state" widget="badge" + decoration-danger="payment_state == 'not_paid'" + decoration-warning="payment_state in ('partial', 'in_payment')" + decoration-success="payment_state in ('paid', 'reversed')"/> + <field name="amount_total"/> + <field name="amount_residual"/> + </group> + </group> + </sheet> + </form> + </field> + </record> + <!-- Action --> <record id="action_unpaid_invoice_view" model="ir.actions.act_window"> <field name="name">Unpaid Invoices Monitoring</field> <field name="res_model">unpaid.invoice.view</field> <field name="view_mode">tree,form</field> - <field name="context">{}</field> + <field name="view_id" ref="view_unpaid_invoice_tree"/> </record> <!-- Menu --> |
