update attrs in views for account_credit_hold
This commit is contained in:
parent
1b2288e31e
commit
a25bc32d67
4 changed files with 25 additions and 57 deletions
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="account_followup_followup_line_form_inherit" model="ir.ui.view">
|
||||
<field name="name">account_credit_hold.account_followup_line.form</field>
|
||||
<field name="model">account_followup.followup.line</field>
|
||||
|
|
@ -9,44 +8,26 @@
|
|||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='send_email']" position="before">
|
||||
<field name="account_hold"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</xpath></field>
|
||||
</record>
|
||||
|
||||
<record id="customer_statements_form_view_inherit" model="ir.ui.view">
|
||||
<field name="name">customer.statements.form.view.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="account_followup.customer_statements_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[last()]" position="after">
|
||||
<field name="hold_bg" invisible="1"/>
|
||||
<button
|
||||
string="Credit Hold"
|
||||
type="object"
|
||||
name="action_credit_hold"
|
||||
class="button btn-secondary"
|
||||
attrs="{'invisible': [('hold_bg', '=', True)]}"
|
||||
/>
|
||||
<button
|
||||
string="Lift Credit Hold"
|
||||
type="object"
|
||||
name="action_lift_credit_hold"
|
||||
class="button btn-secondary"
|
||||
attrs="{'invisible': [('hold_bg', '=', False)]}"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
<field invisible="1" name="hold_bg"/>
|
||||
<button class="button btn-secondary" invisible="hold_bg == True" name="action_credit_hold" string="Credit Hold" type="object"/>
|
||||
<button class="button btn-secondary" invisible="hold_bg == False" name="action_lift_credit_hold" string="Lift Credit Hold" type="object"/>
|
||||
</xpath></field>
|
||||
</record>
|
||||
|
||||
<record id="action_credit_hold" model="ir.actions.server">
|
||||
<field name="name">action_credit_hold</field>
|
||||
<field name="model_id" ref="base.model_res_partner"/>
|
||||
<field name="binding_model_id" ref="base.model_res_partner"/>
|
||||
<field name="binding_view_types">list,form</field>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
records.action_credit_hold()
|
||||
</field>
|
||||
<field name="code">records.action_credit_hold()</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="res_partner_form_inherit" model="ir.ui.view">
|
||||
<field name="name">account_credit_hold.res_partner.form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="before">
|
||||
<field name="hold_bg" invisible="True" />
|
||||
<field name="on_hold" invisible="True" />
|
||||
<widget name="web_ribbon" title="Credit Hold"
|
||||
bg_color="bg-danger" attrs="{'invisible': [('on_hold','=',False)]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
<xpath expr="//div[@name='button_box']" position="before">
|
||||
<field invisible="True" name="hold_bg"/>
|
||||
<field invisible="True" name="on_hold"/>
|
||||
<widget bg_color="bg-danger" invisible="on_hold == False" name="web_ribbon" title="Credit Hold"/>
|
||||
</xpath></field>
|
||||
</record>
|
||||
<record id="view_partner_property_form_inherit" model="ir.ui.view">
|
||||
<field name="name">account_credit_hold.view_partner_property_form</field>
|
||||
|
|
@ -21,13 +18,10 @@
|
|||
<field name="inherit_id" ref="account.view_partner_property_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='banks']" position="before">
|
||||
<group string="Credit Hold" >
|
||||
<field name="postpone_hold_until"
|
||||
groups="account.group_account_manager,account.group_account_user"
|
||||
attrs="{'readonly': [('hold_bg','=',False), ('postpone_hold_until','=',False)]}"/>
|
||||
<group string="Credit Hold">
|
||||
<field groups="account.group_account_manager,account.group_account_user" name="postpone_hold_until" readonly="hold_bg == False and postpone_hold_until == False"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</xpath></field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="sale_order_form_inherit" model="ir.ui.view">
|
||||
<field name="name">account_credit_hold.sale_order.form</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="before">
|
||||
<field name="client_on_hold" invisible="True" />
|
||||
<widget name="web_ribbon" title="Credit Hold"
|
||||
bg_color="bg-danger" attrs="{'invisible': [('client_on_hold','=',False)] }"/>
|
||||
</xpath>
|
||||
</field>
|
||||
<field invisible="True" name="client_on_hold"/>
|
||||
<widget bg_color="bg-danger" invisible="client_on_hold == False" name="web_ribbon" title="Credit Hold"/>
|
||||
</xpath></field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="stock_picking_form_inherit" model="ir.ui.view">
|
||||
<field name="name">account_credit_hold.stock_picking.form</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="priority" eval="8"/>
|
||||
<field eval="8" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="before">
|
||||
<field name="client_on_hold" invisible="True" />
|
||||
<widget name="web_ribbon" title="Credit Hold"
|
||||
bg_color="bg-danger" attrs="{'invisible': [('client_on_hold','=',False)] }"/>
|
||||
|
||||
</xpath>
|
||||
</field>
|
||||
<field invisible="True" name="client_on_hold"/>
|
||||
<widget bg_color="bg-danger" invisible="client_on_hold == False" name="web_ribbon" title="Credit Hold"/>
|
||||
</xpath></field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
|
|
|||
Loading…
Reference in a new issue