|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<odoo> |
| 3 | + <record id="view_template_property_form" model="ir.ui.view"> |
| 4 | + <field name="name">product.template.stock.property.form.inherit</field> |
| 5 | + <field name="model">product.template</field> |
| 6 | + <field name="inherit_id" ref="product.product_template_form_view"/> |
| 7 | + <field name="arch" type="xml"> |
| 8 | + <xpath expr="//header" position="attributes"> |
| 9 | + <attribute name="invisible">1</attribute> |
| 10 | + </xpath> |
| 11 | + </field> |
| 12 | + </record> |
| 13 | + |
| 14 | + <record id="view_template_property_form3" model="ir.ui.view"> |
| 15 | + <field name="name">product.template.stock</field> |
| 16 | + <field name="model">product.template</field> |
| 17 | + <field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/> |
| 18 | + <field name="arch" type="xml"> |
| 19 | + <xpath expr="//t[@groups='stock.group_stock_user']//button[@name='action_update_quantity_on_hand']" position="attributes"> |
| 20 | + <attribute name="invisible">1</attribute> |
| 21 | + </xpath> |
| 22 | + <xpath expr="//t[@groups='stock.group_stock_user']//button[@name='action_product_tmpl_forecast_report']" position="attributes"> |
| 23 | + <attribute name="invisible">1</attribute> |
| 24 | + </xpath> |
| 25 | + <xpath expr="//t[@groups='stock.group_stock_user']" position="inside"> |
| 26 | + <button type="object" |
| 27 | + name="action_product_tmpl_forecast_report" |
| 28 | + invisible="not show_forecasted_qty_status_button" |
| 29 | + context="{'default_product_tmpl_id': id}" |
| 30 | + class="oe_stat_button" icon="fa-area-chart"> |
| 31 | + |
| 32 | + <div class="o_field_widget o_stat_info d-flex align-items-center"> |
| 33 | + <div class="d-flex flex-column ps-2"> |
| 34 | + <span class="o_stat_value d-flex gap-1"> |
| 35 | + <field name="qty_available" nolabel="1" class="oe_inline"/> |
| 36 | + <field name="uom_name" class="oe_inline"/> |
| 37 | + </span> |
| 38 | + <span class="o_stat_value d-flex gap-1"> |
| 39 | + <field name="virtual_available" nolabel="1" class="oe_inline" decoration-danger="virtual_available < 0" decoration-success="virtual_available > 0"/> |
| 40 | + <span class="text-muted">Forecasted</span> |
| 41 | + </span> |
| 42 | + </div> |
| 43 | + </div> |
| 44 | + </button> |
| 45 | + </xpath> |
| 46 | + </field> |
| 47 | + </record> |
| 48 | + |
| 49 | + <record id="view_template_property_form2" model="ir.ui.view"> |
| 50 | + <field name="name">product.template.stock.property.form.inherit2</field> |
| 51 | + <field name="model">product.template</field> |
| 52 | + <field name="inherit_id" ref="product.product_template_form_view"/> |
| 53 | + <field name="arch" type="xml"> |
| 54 | + <xpath expr="//group[@name='group_general']" position="inside"> |
| 55 | + <label for="qty_input" class="oe_inline"/> |
| 56 | + <div class="o_row" invisible ="is_multi_location"> |
| 57 | + <field name="qty_input"/> |
| 58 | + <field name="uom_name"/> |
| 59 | + </div> |
| 60 | + <div class="o_row" invisible ="not is_multi_location"> |
| 61 | + <field name="qty_available"/> |
| 62 | + <field name="uom_name"/> |
| 63 | + <button name="action_open_quants" type="object" |
| 64 | + string="Update Quantity" |
| 65 | + class="btn-link mb-1 px-0" icon="fa-refresh" /> |
| 66 | + </div> |
| 67 | + </xpath> |
| 68 | + <xpath expr="//field[@name='product_tooltip']" position="attributes"> |
| 69 | + <attribute name="invisible">1</attribute> |
| 70 | + </xpath> |
| 71 | + </field> |
| 72 | + </record> |
| 73 | + |
| 74 | + <record id="action_open_label_layout_from_action" model="ir.actions.server"> |
| 75 | + <field name="name">Print Labels</field> |
| 76 | + <field name="model_id" ref="product.model_product_template"/> |
| 77 | + <field name="state">code</field> |
| 78 | + <field name="binding_model_id" ref="product.model_product_template"/> |
| 79 | + <field name="binding_view_types">form</field> |
| 80 | + <field name="code"> |
| 81 | + action = records.action_open_label_layout() |
| 82 | + </field> |
| 83 | + </record> |
| 84 | + |
| 85 | + <record id="action_open_replenish_action" model="ir.actions.server"> |
| 86 | + <field name="name">Replenish</field> |
| 87 | + <field name="model_id" ref="product.model_product_template"/> |
| 88 | + <field name="state">code</field> |
| 89 | + <field name="binding_model_id" ref="product.model_product_template"/> |
| 90 | + <field name="binding_view_types">form</field> |
| 91 | + <field name="code"> |
| 92 | + action = { |
| 93 | + 'type': 'ir.actions.act_window', |
| 94 | + 'res_model': 'product.replenish', |
| 95 | + 'view_mode': 'form', |
| 96 | + 'target': 'new', |
| 97 | + 'context': {'default_product_tmpl_id': records.id}, |
| 98 | + } |
| 99 | + </field> |
| 100 | + </record> |
| 101 | +</odoo> |
| 102 | + |
0 commit comments