diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-05-15 13:19:22 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-05-15 13:19:22 +0700 |
| commit | 3c170c77e4913313ca28169172dbad8c8726ad5c (patch) | |
| tree | 5feb24f481271c812836b88b95870b2c0be93b45 /indoteknik_custom/views | |
| parent | 2469ee37cfe854f0419a8c3fbabed5bc32bcaa6e (diff) | |
(andri) add button sync price to SO & penyesuaian readonly pada orderline PO
Diffstat (limited to 'indoteknik_custom/views')
| -rwxr-xr-x | indoteknik_custom/views/purchase_order.xml | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml index b58139c6..bd842a76 100755 --- a/indoteknik_custom/views/purchase_order.xml +++ b/indoteknik_custom/views/purchase_order.xml @@ -36,7 +36,9 @@ </button> <button name="button_unlock" position="after"> <button name="create_bill_pelunasan" string="Create Bill Pelunasan" type="object" class="oe_highlight" attrs="{'invisible': [('state', 'not in', ('purchase', 'done')), ('bills_pelunasan_id', '!=', False)]}"/> - + </button> + <button name="create_bill_dp" position="after"> + <button name="sync_price_to_so" string="Sync Price to SO" type="object" attrs="{'invisible': [('state', 'in', ['draft', 'cancel'])]}"/> </button> <field name="date_order" position="before"> <field name="sale_order_id" attrs="{'readonly': [('state', 'not in', ['draft'])]}"/> @@ -140,19 +142,27 @@ </field> <field name="order_line" position="attributes"> - <attribute name="attrs">{'readonly': ['|', ('state', 'in', ['purchase', 'done', 'cancel']), ('has_active_invoice', '=', True)]}</attribute> + <attribute name="attrs">{'readonly': ['|', ('state', 'in', ['done', 'cancel']), ('has_active_invoice', '=', True)]}</attribute> </field> + + <xpath expr="//field[@name='order_line']/tree/field[1]" position="before"> + <field name="mark_po_line" widget="boolean_toggle" attrs="{'invisible': [('state', 'in', ['draft', 'cancel'])]}"/> + </xpath> + + <xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="attributes"> + <attribute name="attrs">{'readonly': [('parent.state', 'in', ['purchase', 'done', 'cancel'])]}</attribute> + </xpath> <xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_unit']" position="attributes"> - <attribute name="attrs">{'readonly': [], 'required': True}</attribute> + <attribute name="attrs">{'readonly': [('parent.state', 'in', ['purchase', 'done', 'cancel'])], 'required': True}</attribute> </xpath> <xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='taxes_id']" position="attributes"> - <attribute name="attrs">{'readonly': []}</attribute> + <attribute name="attrs">{'readonly': [('parent.state', 'in', ['purchase', 'done', 'cancel'])]}</attribute> </xpath> <xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='product_qty']" position="attributes"> - <attribute name="attrs">{'required': True}</attribute> + <attribute name="attrs">{'readonly': [('parent.state', 'in', ['purchase', 'done', 'cancel'])],'required': True}</attribute> </xpath> <xpath expr="//form/sheet/notebook/page[@name='purchase_delivery_invoice']" position="before"> |
