Browse Source

[IMP] Pos placement of icon and size of button, use cooperator type for constraint, remove easy_my_coop dependency

pull/18/head
Thibault Francois 8 years ago
parent
commit
9c193c1566
  1. 8
      beesdoo_base/models/partner.py
  2. 14
      beesdoo_base/views/partner.xml
  3. 2
      beesdoo_pos/__openerp__.py
  4. 12
      beesdoo_pos/models/beesdoo_pos.py
  5. 8
      beesdoo_pos/static/src/css/beesdoo.css
  6. 1
      beesdoo_pos/static/src/xml/templates.xml

8
beesdoo_base/models/partner.py

@ -44,12 +44,8 @@ class Partner(models.Model):
the owner of a B share can have a maximum of three eaters. the owner of a B share can have a maximum of three eaters.
""" """
# Get the default_code of the share for the current eater and his parent # Get the default_code of the share for the current eater and his parent
share_type_code = None
parent_share_type_code = None
for line in self.share_ids:
share_type_code = line.share_product_id.default_code
for line in self.parent_eater_id.share_ids:
parent_share_type_code = line.share_product_id.default_code
share_type_code = self.cooperator_type
parent_share_type_code = self.parent_eater_id.cooperator_type
# Raise exception # Raise exception
if share_type_code == 'share_b' or parent_share_type_code == 'share_b': if share_type_code == 'share_b' or parent_share_type_code == 'share_b':
if len(self.child_eater_ids) > 3 or len(self.parent_eater_id.child_eater_ids) > 3: if len(self.child_eater_ids) > 3 or len(self.parent_eater_id.child_eater_ids) > 3:

14
beesdoo_base/views/partner.xml

@ -100,6 +100,20 @@
</field> </field>
</record> </record>
<record model="ir.ui.view" id="beesdoo_partner_search_view">
<field name="name">beesdoo.partner.search.view</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter" />
<field name="arch" type="xml">
<filter name="type_person" position="after">
<filter name="type_a" string="Cooperator type A" domain="[('cooperator_type', '=', 'share_a')]" />
<filter name="type_b" string="Cooperator type B" domain="[('cooperator_type', '=', 'share_b')]" />
<filter name="type_c" string="Cooperator type C" domain="[('cooperator_type', '=', 'share_c')]" />
</filter>
</field>
</record>
<!-- S022 : By default a supplier should be a company --> <!-- S022 : By default a supplier should be a company -->
<record id="base.action_partner_supplier_form" model="ir.actions.act_window"> <record id="base.action_partner_supplier_form" model="ir.actions.act_window">
<field name="context">{ <field name="context">{

2
beesdoo_pos/__openerp__.py

@ -20,7 +20,7 @@
'version': '0.1', 'version': '0.1',
# any module necessary for this one to work correctly # any module necessary for this one to work correctly
'depends': ['beesdoo_base', 'beesdoo_product', 'easy_my_coop'],
'depends': ['beesdoo_base', 'beesdoo_product'],
# always loaded # always loaded
'data': [ 'data': [

12
beesdoo_pos/models/beesdoo_pos.py

@ -44,14 +44,10 @@ class BeescoopPosPartner(models.Model):
_inherit = 'res.partner' _inherit = 'res.partner'
def _get_eater(self): def _get_eater(self):
eater1, eater2, eater3 = False, False, False
if self.child_eater_ids:
eater1 = self.child_eater_ids[0].name
if len(self.child_eater_ids) > 1:
eater2 = self.child_eater_ids[1].name
if len(self.child_eater_ids) > 2:
eater3 = self.child_eater_ids[2].name
return eater1, eater2, eater3
eaters = [False, False, False]
for i, eater in enumerate(self.child_eater_ids):
eaters[i] = eater.name
return tuple(eaters)
@api.multi @api.multi
def get_balance_and_eater(self): def get_balance_and_eater(self):

8
beesdoo_pos/static/src/css/beesdoo.css

@ -13,10 +13,16 @@
font-size: 18px; font-size: 18px;
} }
.button.set-customer.decentered {
.pos .actionpad .button.set-customer {
height: 108px; height: 108px;
} }
.pos .actionpad .button .fa-user {
left: 5px;
top: 38px;
}
.customer-information-pay { .customer-information-pay {
font-weight: normal; font-weight: normal;
font-size: 12px; font-size: 12px;

1
beesdoo_pos/static/src/xml/templates.xml

@ -22,6 +22,7 @@
<span class='customer-delegate1' /> <span class='customer-delegate1' />
<br /> <br />
<span class='customer-delegate2' /> <span class='customer-delegate2' />
<br />
<span class='customer-delegate3' /> <span class='customer-delegate3' />
</div> </div>
</t> </t>

Loading…
Cancel
Save