Thibault Francois
9 years ago
5 changed files with 95 additions and 3 deletions
-
8README.md
-
3beesdoo_base/__openerp__.py
-
55beesdoo_base/models/partner.py
-
2beesdoo_base/security/ir.model.access.csv
-
30beesdoo_base/views/partner.xml
@ -1 +1,9 @@ |
|||
# Obeesdoo |
|||
|
|||
|
|||
|
|||
# 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; |
|||
``` |
@ -0,0 +1,2 @@ |
|||
"id","name","model_id/id","group_id/id","perm_read","perm_write","perm_create","perm_unlink" |
|||
"member_card_read_all","member card read all","beesdoo_base.model_member_card","","True","False","False","False" |
@ -1,15 +1,43 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<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="base.view_partner_form" /> |
|||
<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="Carte de Membre" |
|||
attrs="{'invisible': ['|', ('customer', '=', False), ('eater', '!=', 'worker_eater')]}"> |
|||
<separator string="Mangeurs" /> |
|||
<field name="child_eater_ids" widget="many2many_tags" /> |
|||
<separator string="Cartes" /> |
|||
<field string="Cartes" name="member_card_ids"> |
|||
<tree editable="bottom"> |
|||
<field name="barcode" /> |
|||
<field name="activation_date" /> |
|||
<field name="end_date" /> |
|||
<field name="responsible_id" /> |
|||
<field name="comment" /> |
|||
</tree> |
|||
</field> |
|||
</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> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue