changer visiblity for action_budget action_skip_budget button in purchase order

This commit is contained in:
younes 2025-05-14 10:43:20 +01:00
parent 2f2d3edfd0
commit 69e3f57600
1 changed files with 17 additions and 29 deletions

View File

@ -130,9 +130,7 @@
</xpath> </xpath>
<field name="partner_id" position="attributes"> <field name="partner_id" position="attributes">
<attribute name="options">{'no_create': True, 'no_open': True}</attribute> <attribute name="options">{'no_create': True, 'no_open': True}</attribute>
<attribute name="domain">['&amp;',('supplier_rank','>', 0),'|', ('company_id', '=', False), <attribute name="domain">['&amp;',('supplier_rank','>', 0),'|', ('company_id', '=', False), ('company_id', '=', company_id)]</attribute>
('company_id', '=', company_id)]
</attribute>
</field> </field>
<xpath expr="/form/header/button[@name='action_rfq_send']" position="after"> <xpath expr="/form/header/button[@name='action_rfq_send']" position="after">
<field name="parent_state" invisible="1"/> <field name="parent_state" invisible="1"/>
@ -172,9 +170,7 @@
<!-- <button name="button_draft" states="cancel" string="Set to Draft" type="object"/>--> <!-- <button name="button_draft" states="cancel" string="Set to Draft" type="object"/>-->
</xpath> </xpath>
<xpath expr="//button[@name='button_approve']" position="replace"> <xpath expr="//button[@name='button_approve']" position="replace">
<button name="button_approve" type="object" <button name="button_approve" type="object" attrs="{'invisible':['|',('requisition_id','!=',False),('state','not in',('to approve'))]}" string="Approve Order" class="oe_highlight" groups="purchase.group_purchase_manager"/>
attrs="{'invisible':['|',('requisition_id','!=',False),('state','not in',('to approve'))]}"
string="Approve Order" class="oe_highlight" groups="purchase.group_purchase_manager"/>
</xpath> </xpath>
<xpath expr="//button[@name='button_draft']" position="after"> <xpath expr="//button[@name='button_draft']" position="after">
@ -193,8 +189,7 @@
<attribute name="groups">purchase.group_purchase_manager</attribute> <attribute name="groups">purchase.group_purchase_manager</attribute>
<attribute name="states">""</attribute> <attribute name="states">""</attribute>
<attribute name="attrs"> <attribute name="attrs">
{'invisible':[('state','in',('wait','wait_for_send','sign','sent','to {'invisible':[('state','in',('wait','wait_for_send','sign','sent','to approve','waiting','purchase','cancel'))]}
approve','waiting','purchase','cancel'))]}
</attribute> </attribute>
</xpath> </xpath>
<xpath expr="/form/header/button[@id='bid_confirm']" position="attributes"> <xpath expr="/form/header/button[@id='bid_confirm']" position="attributes">
@ -308,8 +303,7 @@
</xpath> </xpath>
<!-- i edit here readonly="1"--> <!-- i edit here readonly="1"-->
<xpath expr="//notebook//page[1]" position="after"> <xpath expr="//notebook//page[1]" position="after">
<page string="Committe Members" groups="purchase_requisition_custom.committe_member" <page string="Committe Members" groups="purchase_requisition_custom.committe_member" attrs="{'invisible':[('requisition_id','=', False)]}">
attrs="{'invisible':[('requisition_id','=', False)]}">
<field name="committe_members"> <field name="committe_members">
<tree> <tree>
<field name="user_id"/> <field name="user_id"/>
@ -341,8 +335,7 @@
</button> </button>
</xpath> </xpath>
<xpath expr="//div[@name='button_box']//button[@name='%(purchase_requisition.action_purchase_requisition_list)d']" <xpath expr="//div[@name='button_box']//button[@name='%(purchase_requisition.action_purchase_requisition_list)d']" position="replace">
position="replace">
<button name="action_purchase_orders_view" type="object" class="oe_stat_button" icon="fa-list-alt" <button name="action_purchase_orders_view" type="object" class="oe_stat_button" icon="fa-list-alt"
attrs="{'invisible': [('state', '=', 'draft')]}"> attrs="{'invisible': [('state', '=', 'draft')]}">
<field name="order_count" widget="statinfo" string="RFQs/Orders"/> <field name="order_count" widget="statinfo" string="RFQs/Orders"/>
@ -438,8 +431,7 @@
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</xpath> </xpath>
<xpath expr="/form/header/field[@name='state']" position="replace"> <xpath expr="/form/header/field[@name='state']" position="replace">
<field name="state" widget="statusbar" statusbar_visible="draft,in_progress,done" <field name="state" widget="statusbar" statusbar_visible="draft,in_progress,done" attrs="{'invisible': [('is_quantity_copy', '=', 'none')]}"/>
attrs="{'invisible': [('is_quantity_copy', '=', 'none')]}"/>
</xpath> </xpath>
<xpath expr="//field[@name='date_end']" position="before"> <xpath expr="//field[@name='date_end']" position="before">
<!-- <field name="agreement_name" attrs="{'readonly': [('state','!=', 'draft')]}"/>--> <!-- <field name="agreement_name" attrs="{'readonly': [('state','!=', 'draft')]}"/>-->
@ -473,8 +465,7 @@
<attribute name="attrs">{ <attribute name="attrs">{
'readonly': [('state','in',('cancel','checked','done','waiting'))], 'readonly': [('state','in',('cancel','checked','done','waiting'))],
'required': [('type_exclusive', '=', 'multiple')] 'required': [('type_exclusive', '=', 'multiple')]
} }</attribute>
</attribute>
</xpath> </xpath>
<xpath expr="//field[@name='ordering_date']" position="attributes"> <xpath expr="//field[@name='ordering_date']" position="attributes">
<attribute name="required">1</attribute> <attribute name="required">1</attribute>
@ -486,10 +477,7 @@
</xpath> </xpath>
<xpath expr="//notebook/page[1]/field[@name='line_ids']/tree[1]/field[@name='account_analytic_id']" <xpath expr="//notebook/page[1]/field[@name='line_ids']/tree[1]/field[@name='account_analytic_id']"
position="replace"> position="replace">
<field name="account_analytic_id" <field name="account_analytic_id" attrs="{'column_invisible':[('parent.is_purchase_budget','=',False)]}" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]" groups="analytic.group_analytic_accounting"/>
attrs="{'column_invisible':[('parent.is_purchase_budget','=',False)]}"
domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"
groups="analytic.group_analytic_accounting"/>
</xpath> </xpath>
<xpath expr="//notebook/page[1]/field[@name='line_ids']/tree[1]/field[@name='account_analytic_id']" <xpath expr="//notebook/page[1]/field[@name='line_ids']/tree[1]/field[@name='account_analytic_id']"
position="after"> position="after">