Browse Source

Merge pull request #34 from beescoop/9.0-s0058-eater-card

Hide eater section on eaters contact page
pull/37/head
Robin Keunen 7 years ago
committed by GitHub
parent
commit
25c8ebc8d9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      beesdoo_base/report/beescard.xml
  2. 49
      beesdoo_base/views/partner.xml

24
beesdoo_base/report/beescard.xml

@ -58,27 +58,27 @@
</td> </td>
<td <td
style="vertical-align:top;width:7.72cm;height: 6.87cm;position: relative;"> style="vertical-align:top;width:7.72cm;height: 6.87cm;position: relative;">
<p
style="text-align: left;padding-top: 0.2cm;font-size: 1.2em;">
<span t-raw="partner.first_name and partner.first_name[:30] or ''"
style="font-family:Roboto-Regular" />
<p style="text-align: left;padding-top: 0.2cm;font-size: 1.2em;">
<span t-raw="partner.first_name and partner.first_name[:30] or ''" style="font-family:Roboto-Regular" />
<br /> <br />
<span t-raw="partner.last_name and partner.last_name[:26] or ''"
style="font-family:Roboto-Bold;" />
<span t-raw="partner.last_name and partner.last_name[:26] or ''" style="font-family:Roboto-Bold;" />
<br /> <br />
</p> </p>
<p
style="font-size: 0.8em;font-family:Roboto-Regular">
<t t-if="partner.parent_eater_id and partner.parent_eater_id.cooperator_type == 'share_a'">
<span
t-raw="'[' + (partner.parent_eater_id.first_name and partner.parent_eater_id.first_name[:30] or '') + ' ' + (partner.parent_eater_id.last_name and partner.parent_eater_id.last_name[:30] or '') + ']'"
style="font-family:Roboto-Regular" />
<p style="text-align: left;padding-top: 0.2cm;font-size: 1em;">
<t t-if="partner.parent_eater_id and partner.eater == 'eater'">
<!--fix here -->
<span t-raw="partner.parent_eater_id.first_name and partner.parent_eater_id.first_name[:30] or ''" style="font-family:Roboto-Regular;" />
<span t-raw="partner.parent_eater_id.last_name and partner.parent_eater_id.last_name[:26] or ''" style="font-family:Roboto-Regular;" />
</t> </t>
<t t-if="partner.parent_eater_id and partner.parent_eater_id.cooperator_type == 'share_b'"> <t t-if="partner.parent_eater_id and partner.parent_eater_id.cooperator_type == 'share_b'">
<!--fix here never true-->
<span <span
t-raw="'[' + (partner.parent_eater_id.name[:60] or '') + ']'" t-raw="'[' + (partner.parent_eater_id.name[:60] or '') + ']'"
style="font-family:Roboto-Regular" /> style="font-family:Roboto-Regular" />
</t> </t>
</p> </p>
<div style="position: absolute;bottom: 0;"> <div style="position: absolute;bottom: 0;">
<div style="padding-top:0.3cm"> <div style="padding-top:0.3cm">

49
beesdoo_base/views/partner.xml

@ -47,35 +47,38 @@
<group name="info_session" /> <group name="info_session" />
</page> </page>
<page string="Member Card" <page string="Member Card"
attrs="{'invisible': ['|', ('customer', '=', False), ('eater', '!=', 'worker_eater')]}">
attrs="{'invisible': ['|', ('customer', '=', False), ('eater', 'not in', ('worker_eater', 'eater'))]}">
<group> <group>
<group> <group>
<field name="member_card_to_be_printed" /> <field name="member_card_to_be_printed" />
<field name="last_printed" /> <field name="last_printed" />
</group> </group>
</group> </group>
<separator string="Eaters" />
<field name="child_eater_ids" widget="many2many_tags"
options="{'no_create': True}"
context="{'default_eater' : 'eater', 'default_customer' : True}" />
<group>
<button string="New Eater" name="%(action_eater_wizard)d"
type="action" />
</group>
<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 attrs="{'invisible': ['|', ('customer', '=', False), ('eater', '!=', 'worker_eater')]}">
<separator string="Eaters" />
<field name="child_eater_ids" widget="many2many_tags"
options="{'no_create': True}"
context="{'default_eater' : 'eater', 'default_customer' : True}" />
<group>
<button string="New Eater" name="%(action_eater_wizard)d"
type="action" />
</group>
<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>
</group> </group>
</page> </page>

Loading…
Cancel
Save