| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<record id="purchase_order_form_inherit_stock_dropshipping" model="ir.ui.view"> |
| 4 |
<field name="name">purchase.order.form.inherit.stock.dropshipping</field> |
| 5 |
<field name="model">purchase.order</field> |
| 6 |
<field name="inherit_id" ref="purchase.purchase_order_form"/> |
| 7 |
<field name="arch" type="xml"> |
| 8 |
<xpath expr="//div[hasclass('oe_button_box')]/button[@name='action_view_picking']" position="before"> |
| 9 |
<button type="object" |
| 10 |
name="action_view_dropship" |
| 11 |
class="oe_stat_button" |
| 12 |
icon="fa-truck" |
| 13 |
invisible="dropship_picking_count == 0" groups="stock.group_stock_user"> |
| 14 |
<field name="dropship_picking_count" widget="statinfo" string="Dropship"/> |
| 15 |
</button> |
| 16 |
</xpath> |
| 17 |
<xpath expr="//field[@name='picking_type_id']" position="attributes"> |
| 18 |
<attribute name="domain"> |
| 19 |
[('code', 'in', ('incoming', 'dropship')), '|', ('warehouse_id', '=', False), ('warehouse_id.company_id', '=', company_id)] |
| 20 |
</attribute> |
| 21 |
</xpath> |
| 22 |
</field> |
| 23 |
</record> |
| 24 |
</odoo> |