summaryrefslogtreecommitdiff
path: root/fixco_custom/views/account_move.xml
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-07-08 08:58:46 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-07-08 08:58:46 +0700
commitb858358ffbdd14c9b56ac96f035bddccae4d872d (patch)
tree0058aeea123b8e2c29ab704f98806b227838dbbe /fixco_custom/views/account_move.xml
parent8f07d24c8362cb6a4d5ded8f94b75c5057a5b025 (diff)
skema bills and requisition
Diffstat (limited to 'fixco_custom/views/account_move.xml')
-rw-r--r--fixco_custom/views/account_move.xml52
1 files changed, 49 insertions, 3 deletions
diff --git a/fixco_custom/views/account_move.xml b/fixco_custom/views/account_move.xml
index c77d046..1c55831 100644
--- a/fixco_custom/views/account_move.xml
+++ b/fixco_custom/views/account_move.xml
@@ -6,20 +6,66 @@
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
- <!-- <field name="ref" position="after">
- <field name="sale_id" readonly="1" attrs="{'invisible': [('move_type', '!=', 'entry')]}"/>
- </field> -->
+
<field name="payment_reference" position="after">
<field name="invoice_marketplace" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/>
<field name="transaction_type" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/>
</field>
+
<field name="partner_id" position="after">
<field name="address" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/>
</field>
+
<field name="invoice_date" position="after">
<field name="sale_id" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/>
<field name="picking_id" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/>
</field>
+
+ <!-- ✅ Add the new Many2many field after invoice_vendor_bill_id -->
+ <field name="invoice_vendor_bill_id" position="after">
+ <field name="purchase_id" invisible="1"/>
+
+ <label for="purchase_vendor_bill_ids" string="Auto-Complete" class="oe_edit_only"
+ attrs="{'invisible': ['|', ('state','!=','draft'), ('move_type', '!=', 'in_invoice')]}" />
+
+ <field name="purchase_vendor_bill_ids" nolabel="1"
+ attrs="{'invisible': ['|', ('state','!=','draft'), ('move_type', '!=', 'in_invoice')]}"
+ domain="partner_id and [('company_id', '=', company_id), ('partner_id.commercial_partner_id', '=', commercial_partner_id)] or [('company_id', '=', company_id)]"
+ placeholder="Select purchase orders or past bills"
+ context="{'show_total_amount': True}"
+ options="{'no_create': True, 'no_open': True}"/>
+ </field>
+
+ <!-- Purchase line_id on invoice line -->
+ <xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='company_id']" position="after">
+ <field name="purchase_line_id" invisible="1"/>
+ <field name="purchase_order_id"
+ attrs="{'column_invisible': [('parent.move_type', '!=', 'in_invoice')]}"
+ optional="hide"/>
+ </xpath>
+
+ <xpath expr="//field[@name='line_ids']/tree/field[@name='company_id']" position="after">
+ <field name="purchase_line_id" invisible="1"/>
+ </xpath>
+
+ </field>
+ </record>
+
+ <record id="account_move_inherit_purchase_inherit" model="ir.ui.view">
+ <field name="name">Account Move</field>
+ <field name="model">account.move</field>
+ <field name="inherit_id" ref="purchase.view_move_form_inherit_purchase"/>
+ <field name="arch" type="xml">
+ <field name="purchase_line_id" position="attributes">
+ <attribute name="invisible">0</attribute>
+ <attribute name="optional">hide</attribute>
+ <attribute name="attrs">
+ {'column_invisible': [('parent.move_type', '!=', 'in_invoice')]}
+ </attribute>
+ </field>
+ <field name="quantity" position="after">
+ <field name="qty_outstanding" optional="hide"/>
+ </field>
</field>
</record>
</data>