Browse Source

Hide button when not opened by pos

pull/227/head
hpar 7 years ago
parent
commit
b85c415471
  1. 7
      pos_backend_partner/static/src/css/pos_backend_partner.css
  2. 3
      pos_backend_partner/views/assets.xml
  3. 12
      pos_backend_partner/views/backend_partner.xml

7
pos_backend_partner/static/src/css/pos_backend_partner.css

@ -0,0 +1,7 @@
td[data-field="select_in_pos_current_order"] {
display:none;
}
.pos_backend_communication td[data-field="select_in_pos_current_order"] {
display:block;
}

3
pos_backend_partner/views/assets.xml

@ -9,6 +9,9 @@
<template id="assets_backend" name="back partner " inherit_id="web.assets_backend"> <template id="assets_backend" name="back partner " inherit_id="web.assets_backend">
<xpath expr="." position="inside"> <!-- both back and POS --> <xpath expr="." position="inside"> <!-- both back and POS -->
<script type="text/javascript" src="/pos_backend_partner/static/src/js/back_partner.js"></script> <script type="text/javascript" src="/pos_backend_partner/static/src/js/back_partner.js"></script>
<link rel="stylesheet" href="/pos_backend_partner/static/src/css/pos_backend_partner.css"/>
</xpath> </xpath>
</template> </template>

12
pos_backend_partner/views/backend_partner.xml

@ -13,18 +13,6 @@
</field> </field>
</record> </record>
<record id="view_partner_form" model="ir.ui.view">
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="display_name" position="after">
<button string="Choose"
type="object" name="select_in_pos_current_order"
help="Select as customer in point of sale"/>
</field>
</field>
</record>
<record id="action_select_partner_pos" model="ir.actions.act_window"> <record id="action_select_partner_pos" model="ir.actions.act_window">
<field name="name">Client</field> <field name="name">Client</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>

Loading…
Cancel
Save