You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
116 lines
5.9 KiB
116 lines
5.9 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<!-- Pantry products action -->
|
|
<record id="action_pantry_product" model="ir.actions.act_window">
|
|
<field name="name">Pantry Products</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">product.product</field>
|
|
<field name="view_mode">kanban</field>
|
|
<field name="domain">[('pantry_product','=',True)]</field>
|
|
<field name="context">{'default_pantry_product': True}</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create a new pantry product
|
|
</p>
|
|
</field>
|
|
</record>
|
|
<!-- Pantry products menu -->
|
|
<menuitem id="hr_pantry_menu" name="Pantry" parent="hr.menu_hr_root"/>
|
|
<menuitem id="product_menu" name="Products" action="action_pantry_product"
|
|
parent="hr_pantry_menu"/>
|
|
<!-- Pantry products kanban view -->
|
|
<record id="pantry_product_view_kanban" model="ir.ui.view">
|
|
<field name="name">product.product.view.kanban.pantry.payroll</field>
|
|
<field name="model">product.product</field>
|
|
<field name="arch" type="xml">
|
|
<kanban create="0" sample="1">
|
|
<field name="id"/>
|
|
<field name="lst_price"/>
|
|
<field name="activity_state"/>
|
|
<field name="color"/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div class="oe_kanban_global_click">
|
|
<div class="o_kanban_image">
|
|
<img t-att-src="kanban_image('product.product', 'image_128', record.id.raw_value)"
|
|
alt="Product" class="o_image_64_contain"/>
|
|
</div>
|
|
<div class="oe_kanban_details">
|
|
<field name="priority" widget="priority"
|
|
readonly="1"/>
|
|
<strong class="o_kanban_record_title">
|
|
<field name="name"/>
|
|
<small t-if="record.default_code.value">[
|
|
<field name="default_code"/>]
|
|
</small>
|
|
</strong>
|
|
<div class="o_kanban_tags_section">
|
|
<field name="product_template_variant_value_ids"
|
|
groups="product.group_product_variant"
|
|
widget="many2many_tags"
|
|
options="{'color_field': 'color'}"/>
|
|
</div>
|
|
<ul>
|
|
<li>
|
|
<strong>Price:
|
|
<field name="lst_price"/>
|
|
</strong>
|
|
</li>
|
|
</ul>
|
|
<div name="tags"/>
|
|
<div class="oe_kanban_footer oe_kanban_bottom_left">
|
|
<div class="o_kanban_buttons d-flex justify-content-between">
|
|
<div>
|
|
<button name="action_quantity_decrement"
|
|
id="quantity_decrement"
|
|
type="object"
|
|
class="btn btn-primary">
|
|
-
|
|
</button>
|
|
<field name="quantity"
|
|
string="Quantity"/>
|
|
<button name="action_quantity_increment"
|
|
id="quantity_increment"
|
|
type="object"
|
|
class="btn btn-primary">
|
|
+
|
|
</button>
|
|
</div>
|
|
<div>
|
|
<button class="btn btn-primary"
|
|
name="action_buy_pantry"
|
|
type="object">Buy Now
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
<record id="pantry_product_kanban_action_view"
|
|
model="ir.actions.act_window.view">
|
|
<field name="sequence" eval="70"/>
|
|
<field name="view_mode">kanban</field>
|
|
<field name="view_id" ref="pantry_payroll.pantry_product_view_kanban"/>
|
|
<field name="act_window_id" ref="action_pantry_product"/>
|
|
</record>
|
|
<!-- Products inherit form view -->
|
|
<record id="product_normal_form_view" model="ir.ui.view">
|
|
<field name="name">product.product.view.form.inherit.pantry.payroll
|
|
</field>
|
|
<field name="model">product.product</field>
|
|
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//div[@name='options']" position="inside">
|
|
<span class="d-inline-block">
|
|
<field name="pantry_product"/>
|
|
<label for="pantry_product"/>
|
|
</span>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|
|
|