diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2026-02-03 16:38:59 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2026-02-03 16:38:59 +0700 |
| commit | 3a18b6f0ca12384e009db08d99e94d38974f9811 (patch) | |
| tree | bcc01464b0aefb6d92cf66def750c2a33378134c | |
| parent | 20ab2011bc9766e436cf3f81be70c1c52af824ba (diff) | |
<Miqdad> add invoice marketplace in tree view general ledger
| -rwxr-xr-x | fixco_custom/__manifest__.py | 1 | ||||
| -rw-r--r-- | fixco_custom/models/account_move_line.py | 7 | ||||
| -rw-r--r-- | fixco_custom/views/account_move_line.xml | 15 |
3 files changed, 23 insertions, 0 deletions
diff --git a/fixco_custom/__manifest__.py b/fixco_custom/__manifest__.py index 3e32552..9d781c0 100755 --- a/fixco_custom/__manifest__.py +++ b/fixco_custom/__manifest__.py @@ -54,6 +54,7 @@ 'views/report_picking_list_new.xml', 'views/purchase_order_line_wizard.xml', 'views/account_payment.xml', + 'views/account_move_line.xml', ], 'demo': [], 'css': [], diff --git a/fixco_custom/models/account_move_line.py b/fixco_custom/models/account_move_line.py index f03d6e6..bf579f9 100644 --- a/fixco_custom/models/account_move_line.py +++ b/fixco_custom/models/account_move_line.py @@ -5,6 +5,13 @@ class AccountMoveLine(models.Model): _inherit = "account.move.line" qty_outstanding = fields.Float(string='Qty Outstanding', compute='_compute_qty_outstanding') + invoice_marketplace = fields.Text("Invoice Mearketplace", compute='_compute_invoice_marketplace') + + @api.depends('move_id', 'move_id.invoice_marketplace') + def _compute_invoice_marketplace(self): + for line in self: + invoice_origin = line.move_id.invoice_marketplace + line.invoice_marketplace = invoice_origin def _compute_qty_outstanding(self): for line in self: diff --git a/fixco_custom/views/account_move_line.xml b/fixco_custom/views/account_move_line.xml new file mode 100644 index 0000000..ee4eaa9 --- /dev/null +++ b/fixco_custom/views/account_move_line.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<odoo> + <data> +<record id="view_move_line_tree_gl_invoice_mp" model="ir.ui.view"> + <field name="name">account.move.line.tree.gl.invoice.marketplace</field> + <field name="model">account.move.line</field> + <field name="inherit_id" ref="account.view_move_line_tree_grouped_general"/> + <field name="arch" type="xml"> + <xpath expr="//field[@name='name']" position="after"> + <field name="invoice_marketplace" optional="hide"/> + </xpath> + </field> +</record> +</data> +</odoo> |
