diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-09-01 15:50:14 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-09-01 15:50:14 +0700 |
| commit | 8bb599fc4b3e3de94fada7c277518446a88630fa (patch) | |
| tree | 2a8802a417f94e0948f66aa248d8f7acc5375b8d | |
| parent | 4c2decb6938e1920cf330dd8210bebf9ab3669b7 (diff) | |
(andri) add view unpaid invoices
| -rwxr-xr-x | indoteknik_custom/__manifest__.py | 1 | ||||
| -rwxr-xr-x | indoteknik_custom/models/__init__.py | 3 | ||||
| -rw-r--r-- | indoteknik_custom/models/unpaid_invoice_view.py | 28 | ||||
| -rwxr-xr-x | indoteknik_custom/security/ir.model.access.csv | 3 | ||||
| -rw-r--r-- | indoteknik_custom/views/unpaid_invoice_view.xml | 38 |
5 files changed, 71 insertions, 2 deletions
diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py index 31685005..9ebab15e 100755 --- a/indoteknik_custom/__manifest__.py +++ b/indoteknik_custom/__manifest__.py @@ -177,6 +177,7 @@ 'views/tukar_guling_po.xml', # 'views/refund_sale_order.xml', 'views/update_date_planned_po_wizard_view.xml', + 'views/unpaid_invoice_view.xml', ], 'demo': [], 'css': [], diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 3a9f9312..ba3dbad9 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -156,4 +156,5 @@ from . import refund_sale_order # from . import patch from . import tukar_guling from . import tukar_guling_po -from . import update_date_planned_po_wizard
\ No newline at end of file +from . import update_date_planned_po_wizard +from . import unpaid_invoice_view
\ No newline at end of file diff --git a/indoteknik_custom/models/unpaid_invoice_view.py b/indoteknik_custom/models/unpaid_invoice_view.py new file mode 100644 index 00000000..77007102 --- /dev/null +++ b/indoteknik_custom/models/unpaid_invoice_view.py @@ -0,0 +1,28 @@ +from odoo import models, fields + +class UnpaidInvoiceView(models.Model): + _name = 'unpaid.invoice.view' + _description = 'Unpaid Invoices Monitoring' + _auto = False + _rec_name = 'partner_name' + + partner_id = fields.Many2one('res.partner', string='Partner') + partner_name = fields.Char(string='Partner Name') + 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() + 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') + payment_state = fields.Selection([ + ('not_paid','Not Paid'), + ('in_payment','In Payment'), + ('paid','Paid'), + ('reversed','Reversed') + ], string='Payment State') + payment_term = fields.Char() + 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/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv index 3a320510..4649c743 100755 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -195,4 +195,5 @@ access_tukar_guling_mapping_koli_all_users,tukar.guling.mapping.koli.all.users,m access_purchase_order_update_date_wizard,access.purchase.order.update.date.wizard,model_purchase_order_update_date_wizard,base.group_user,1,1,1,1 access_sync_promise_date_wizard,access.sync.promise.date.wizard,model_sync_promise_date_wizard,base.group_user,1,1,1,1 access_sync_promise_date_wizard_line,access.sync.promise.date.wizard.line,model_sync_promise_date_wizard_line,base.group_user,1,1,1,1 -access_change_date_planned_wizard,access.change.date.planned.wizard,model_change_date_planned_wizard,,1,1,1,1
\ No newline at end of file +access_change_date_planned_wizard,access.change.date.planned.wizard,model_change_date_planned_wizard,,1,1,1,1 +access_unpaid_invoice_view,access.unpaid.invoice.view,model_unpaid_invoice_view,base.group_user,1,1,1,1
\ No newline at end of file diff --git a/indoteknik_custom/views/unpaid_invoice_view.xml b/indoteknik_custom/views/unpaid_invoice_view.xml new file mode 100644 index 00000000..f9c393c5 --- /dev/null +++ b/indoteknik_custom/views/unpaid_invoice_view.xml @@ -0,0 +1,38 @@ +<odoo> + <!-- Tree view --> + <record id="view_unpaid_invoice_tree" model="ir.ui.view"> + <field name="name">unpaid.invoice.view.tree</field> + <field name="model">unpaid.invoice.view</field> + <field name="arch" type="xml"> + <tree string="Unpaid Invoices Monitoring" create="false" delete="false" edit="false"> + <field name="partner_id"/> + <field name="invoice_number"/> + <field name="invoice_date"/> + <field name="invoice_date_due"/> + <field name="invoice_day_to_due" readonly="1"/> + <field name="new_invoice_day_to_due" readonly="1"/> + <field name="amount_total"/> + <field name="amount_residual"/> + <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="payment_term"/> + </tree> + </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> + </record> + + <!-- Menu --> + <menuitem id="menu_unpaid_invoice_root" + name="Unpaid Invoices Monitoring" + parent="account.menu_finance_receivables" + action="action_unpaid_invoice_view"/> +</odoo> |
