| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<record id="view_stock_move_operations_expiry" model="ir.ui.view"> |
| 4 |
<field name="name">stock.move.operations.inherit.form</field> |
| 5 |
<field name="model">stock.move</field> |
| 6 |
<field name="inherit_id" ref="stock.view_stock_move_operations"/> |
| 7 |
<field name="arch" type="xml"> |
| 8 |
<xpath expr="//field[@name='product_id']" position="after" > |
| 9 |
<field name="picking_code" invisible="1"/> |
| 10 |
<field name="use_expiration_date" invisible="1"/> |
| 11 |
</xpath> |
| 12 |
</field> |
| 13 |
</record> |
| 14 |
|
| 15 |
<record id="view_stock_move_line_operation_tree_expiry" model="ir.ui.view"> |
| 16 |
<field name="name">stock.move.line.inherit.list</field> |
| 17 |
<field name="model">stock.move.line</field> |
| 18 |
<field name="inherit_id" ref="stock.view_stock_move_line_operation_tree"/> |
| 19 |
<field name="arch" type="xml"> |
| 20 |
<xpath expr="//field[@name='lot_id']" position="after"> |
| 21 |
<field name="is_expired" column_invisible="True"/> |
| 22 |
</xpath> |
| 23 |
<xpath expr="//field[@name='lot_name']" position="after" > |
| 24 |
<field name="picking_type_use_existing_lots" column_invisible="True"/> |
| 25 |
<field name="expiration_date" force_save="1" column_invisible="not parent.use_expiration_date" readonly="picking_type_use_existing_lots" |
| 26 |
decoration-danger="is_expired if state == 'done' else expiration_date < context_today().strftime('%Y-%m-%d')" |
| 27 |
decoration-bf="is_expired if state == 'done' else expiration_date < context_today().strftime('%Y-%m-%d')"/> |
| 28 |
<field name="removal_date" force_save="1" column_invisible="not parent.use_expiration_date" readonly="picking_type_use_existing_lots" |
| 29 |
decoration-danger="removal_date < (context_today() + datetime.timedelta(days=1)).strftime('%Y-%m-%d')" |
| 30 |
decoration-bf="removal_date < (context_today() + datetime.timedelta(days=1)).strftime('%Y-%m-%d')"/> |
| 31 |
</xpath> |
| 32 |
</field> |
| 33 |
</record> |
| 34 |
|
| 35 |
<record id="view_stock_move_line_detailed_operation_tree_expiry" model="ir.ui.view"> |
| 36 |
<field name="name">stock.move.line.operations.inherit.list</field> |
| 37 |
<field name="model">stock.move.line</field> |
| 38 |
<field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree"/> |
| 39 |
<field name="arch" type="xml"> |
| 40 |
<xpath expr="//field[@name='lot_name']" position="after"> |
| 41 |
<field name="picking_type_use_existing_lots" column_invisible="True"/> |
| 42 |
<field name="tracking" column_invisible="True"/> |
| 43 |
<field name="expiration_date" decoration-danger="is_expired if state == 'done' else expiration_date < context_today().strftime('%Y-%m-%d')" |
| 44 |
decoration-bf="is_expired if state == 'done' else expiration_date < context_today().strftime('%Y-%m-%d')" |
| 45 |
force_save="1" readonly="picking_type_use_existing_lots" invisible="tracking == 'none'"/> |
| 46 |
<field name="removal_date" force_save="1" readonly="1" invisible="tracking == 'none'" |
| 47 |
decoration-danger="removal_date < (context_today() + datetime.timedelta(days=1)).strftime('%Y-%m-%d')" decoration-bf="removal_date < (context_today() + datetime.timedelta(days=1)).strftime('%Y-%m-%d')"/> |
| 48 |
</xpath> |
| 49 |
<xpath expr="//field[@name='lot_id']" position="after"> |
| 50 |
<field name="is_expired" column_invisible="True"/> |
| 51 |
</xpath> |
| 52 |
</field> |
| 53 |
</record> |
| 54 |
</odoo> |