Browse Source

Merge commit '428b5a87e862d422af23bd418dc92bf7ac082b2d' into 9.0-s010cr-elise_new

# Conflicts:
#	beesdoo_base/views/partner.xml
pull/13/head
EliseDup 8 years ago
parent
commit
5033d50de1
  1. 5
      README.md
  2. 4
      beesdoo_base/models/partner.py
  3. 55
      beesdoo_base/views/partner.xml
  4. 2
      beesdoo_product/views/beesdoo_product.xml

5
README.md

@ -1,9 +1,10 @@
# Obeesdoo
Specific module for the Beescoop
# Migrate barcode
```sql
insert into member_card (active, barcode, partner_id, responsible_id, activation_date) select 't', barcode, id, 1, '2016-01-01' from res_partner where barcode is not null;
update res_partner set eater = 'worker_eater' where barcode is not null;
```
```

4
beesdoo_base/models/partner.py

@ -13,8 +13,8 @@ class Partner(models.Model):
child_eater_ids = fields.One2many("res.partner", "parent_eater_id", domain=[('customer', '=', True),
('eater', '=', 'eater')])
parent_eater_id = fields.Many2one("res.partner", string="Parent Worker", readonly=True)
barcode = fields.Char(compute="_get_bar_code", string='Bar Code', store=True)
parent_barcode = fields.Char(compute="_get_bar_code", string='Parent Bar Code', store=True)
barcode = fields.Char(compute="_get_bar_code", string='Barcode', store=True)
parent_barcode = fields.Char(compute="_get_bar_code", string='Parent Barcode', store=True)
member_card_ids = fields.One2many('member.card', 'partner_id')
member_card_to_be_printed = fields.Boolean('Print BEES card?')

55
beesdoo_base/views/partner.xml

@ -14,6 +14,7 @@
<field name="target">new</field>
</record>
<<<<<<< HEAD
<record model="ir.ui.view" id="beesdoo_partner_form_view">
<field name="name">beesdoo.partner.form.view</field>
<field name="model">res.partner</field>
@ -71,6 +72,60 @@
</field>
</field>
</record>
=======
<record model="ir.ui.view" id="beesdoo_partner_form_view">
<field name="name">beesdoo.partner.form.view</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="point_of_sale.view_partner_property_form" />
<field name="arch" type="xml">
<field name="name" position="replace">
<field name="name" class="oe_read_only" />
<field name="first_name" placeholder="First Name" class="oe_edit_only"
attrs="{'invisible' : [('company_type', '=', 'company')]}" />
<field name="last_name" placeholder="Last Name" class="oe_edit_only"
default_focus="1" />
</field>
<field name="website" position="after">
<field name="eater"
attrs="{'invisible': [('company_type', '=', 'company')]}" />
<field name="parent_eater_id" attrs="{'invisible' : [('eater', '!=', 'eater')]}" />
</field>
<xpath expr="//notebook" position="inside">
<page string="Member Cards"
attrs="{'invisible': ['|', ('customer', '=', False), ('eater', '!=', 'worker_eater')]}">
<separator string="Printing" />
<group>
<field name="member_card_to_be_printed" />
<field name="last_printed" />
</group>
<separator string="Eaters" />
<field name="child_eater_ids" widget="many2many_tags" />
<separator string="Cards" />
<field string="Cards" name="member_card_ids">
<tree editable="bottom">
<field name="barcode" />
<field name="create_date" />
<field name="end_date" />
<field name="responsible_id" />
<field name="comment" />
<field name="valid" />
</tree>
</field>
<group>
<button string="New Card" name="%(action_membercard_wizard)d"
type="action" />
</group>
</page>
</xpath>
<field name="barcode" position="attributes">
<attribute name="attrs">{'invisible' : [('eater', '!=', 'worker_eater')]}</attribute>
</field>
<field name="barcode" position="after">
<field name="parent_barcode" attrs="{'invisible' : [('eater', '!=', 'eater')]}" />
</field>
</field>
</record>
>>>>>>> 428b5a87e862d422af23bd418dc92bf7ac082b2d
<!-- S022 : By default a supplier should be a company -->
<record id="base.action_partner_supplier_form" model="ir.actions.act_window">

2
beesdoo_product/views/beesdoo_product.xml

@ -23,7 +23,7 @@
<attribute name="invisible">1</attribute>
</field>
<xpath expr="//group[@name='inventory']/.." position="after">
<page string="Étiquette">
<page string="Label">
<group>
<group name="label">
<field name="total_with_vat"/>

Loading…
Cancel
Save