flectra/addons/point_of_sale/views/res_partner_view.xml

39 lines
2.1 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_partner_property_form" model="ir.ui.view">
<field name="name">res.partner.pos.form.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="groups_id" eval="[(4, ref('group_pos_user'))]"/>
<field name="arch" type="xml">
<div name="button_box" position="inside">
<button class="oe_stat_button" type="action" name="%(point_of_sale.action_pos_pos_form)d"
context="{'search_default_partner_id': active_id,'default_partner_id': active_id}"
attrs="{'invisible': ['|', ('customer', '=', False), ('pos_order_count', '=', 0)]}"
icon="fa-shopping-bag">
<field string="POS Sales" name="pos_order_count" widget="statinfo"/>
</button>
</div>
<xpath expr="//page[@name='sales_purchases']/group">
<group string="Point of Sale" name="point_of_sale">
<field name="barcode" />
</group>
</xpath>
</field>
</record>
<record id="view_partner_pos_kanban" model="ir.ui.view">
<field name="name">res.partner.pos.kanban.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
<field name="groups_id" eval="[(4, ref('group_pos_user'))]"/>
<field name="arch" type="xml">
<field name="state_id" position="before">
<field name="pos_order_count"/>
</field>
<xpath expr="//div[hasclass('oe_kanban_partner_links')]" position="inside">
<span t-if="record.pos_order_count.value>0" class="badge"><i class="fa fa-fw fa-shopping-bag"/><t t-esc="record.pos_order_count.value"/></span>
</xpath>
</field>
</record>
</odoo>