Browse Source

Merge commit '428b5a87e862d422af23bd418dc92bf7ac082b2d' into

9.0-s0023-elise_new

# Conflicts:
#	beesdoo_product/views/beesdoo_product.xml
pull/14/head
EliseDup 8 years ago
parent
commit
3efa7c92bc
  1. 3
      README.md
  2. 4
      beesdoo_base/models/partner.py
  3. 10
      beesdoo_base/views/partner.xml
  4. 2
      beesdoo_base/wizard/member_card.py
  5. 4
      beesdoo_base/wizard/views/member_card.xml
  6. 18
      beesdoo_product/views/beesdoo_product.xml

3
README.md

@ -1,8 +1,9 @@
# 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?')

10
beesdoo_base/views/partner.xml

@ -25,17 +25,17 @@
<field name="parent_eater_id" attrs="{'invisible' : [('eater', '!=', 'eater')]}" />
</field>
<xpath expr="//notebook" position="inside">
<page string="Carte de Membre"
<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="Mangeurs" />
<separator string="Eaters" />
<field name="child_eater_ids" widget="many2many_tags" />
<separator string="Cartes" />
<field string="Cartes" name="member_card_ids">
<separator string="Cards" />
<field string="Cards" name="member_card_ids">
<tree editable="bottom">
<field name="barcode" />
<field name="create_date" />
@ -46,7 +46,7 @@
</tree>
</field>
<group>
<button string="Nouvelle Carte" name="%(action_membercard_wizard)d"
<button string="New Card" name="%(action_membercard_wizard)d"
type="action" />
</group>
</page>

2
beesdoo_base/wizard/member_card.py

@ -12,7 +12,7 @@ class NewMemberCardWizard(models.TransientModel):
def _get_default_partner(self):
return self.env.context['active_id']
new_comment = fields.Text('Reason', required=True)
new_comment = fields.Char('Reason', required=True)
partner_id = fields.Many2one('res.partner', default=_get_default_partner)
force_barcode = fields.Char('Force Barcode', groups="beesdoo_base.group_force_barcode")

4
beesdoo_base/wizard/views/member_card.xml

@ -13,9 +13,9 @@
<field name="new_comment" string="Raison" editable="True" />
<field name="partner_id" invisible="1" />
<footer>
<button type="object" name="create_new_card" string="Créer"
<button type="object" name="create_new_card" string="Create"
class="oe_highlight" />
<button special="cancel" string="Annuler" />
<button special="cancel" string="Cancel" />
</footer>
</form>
</field>

18
beesdoo_product/views/beesdoo_product.xml

@ -29,21 +29,21 @@
<page string="Label">
<group>
<group name="label">
<field name="total_with_vat" />
<field name="display_weight" />
<field name="total_with_vat"/>
<field name="display_weight"/>
<field name="display_unit" />
<field name="default_reference_unit" />
<field name="default_reference_unit"/>
<field name="total_with_vat_by_unit" />
<field name="total_deposit" />
</group>
<group>
<field name="main_seller_id" />
<field name="eco_label" />
<field name="local_label" />
<field name="fair_label" />
<field name="origin_label" />
<field name="label_to_be_printed" />
<field name="label_last_printed" />
<field name="eco_label"/>
<field name="local_label"/>
<field name="fair_label"/>
<field name="origin_label"/>
<field name="label_to_be_printed"/>
<field name="label_last_printed"/>
</group>
</group>

Loading…
Cancel
Save