Browse Source

[IMP] bottom page logo now can be uploaded

pull/1/head
houssine 7 years ago
parent
commit
da4f30186a
  1. 6
      easy_my_coop/models/company.py
  2. 2
      easy_my_coop/view/res_company_view.xml
  3. 6
      theme_light/views/layout_template.xml

6
easy_my_coop/models/company.py

@ -18,5 +18,7 @@ class ResCompany(models.Model):
unmix_share_type = fields.Boolean(string="Unmix share type", unmix_share_type = fields.Boolean(string="Unmix share type",
help="If checked, A cooperator will be authorized " help="If checked, A cooperator will be authorized "
"to have only one type of share") "to have only one type of share")
display_logo1 = fields.Boolean(string="Display logo1")
display_logo2 = fields.Boolean(string="Display logo2")
display_logo1 = fields.Boolean(string="Display logo 1")
display_logo2 = fields.Boolean(string="Display logo 2")
bottom_logo1 = fields.Binary(string="Bottom logo 1")
bottom_logo2 = fields.Binary(string="Bottom logo 2")

2
easy_my_coop/view/res_company_view.xml

@ -9,7 +9,9 @@
<group name="coop_grp" string="EasyMy Coop" groups="easy_my_coop.group_energiris_manager"> <group name="coop_grp" string="EasyMy Coop" groups="easy_my_coop.group_energiris_manager">
<field name="unmix_share_type"/> <field name="unmix_share_type"/>
<field name="display_logo1"/> <field name="display_logo1"/>
<field name="bottom_logo1"/>
<field name="display_logo2"/> <field name="display_logo2"/>
<field name="bottom_logo2"/>
<field name="coop_email_contact"/> <field name="coop_email_contact"/>
<field name="subscription_maximum_amount"/> <field name="subscription_maximum_amount"/>
<field name="property_cooperator_account"/> <field name="property_cooperator_account"/>

6
theme_light/views/layout_template.xml

@ -67,12 +67,14 @@
<td/> <td/>
<t t-if="company.display_logo1"> <t t-if="company.display_logo1">
<td rowspan="5" style="padding-left:15px;text-align:center;width:135px;border-left:1px solid #adadad" > <td rowspan="5" style="padding-left:15px;text-align:center;width:135px;border-left:1px solid #adadad" >
<img src="/theme_light/static/img/gallery/label_fin.jpg" style="width:98px;height:auto;padding-bottom:5px;"/>
<img t-if="company.bottom_logo1" t-att-src="'data:image/png;base64,%s' % company.bottom_logo1" style="width:98px;height:auto;padding-bottom:5px;"/>
<img t-if="not company.bottom_logo1" src="/theme_light/static/img/gallery/label_fin.jpg" style="width:98px;height:auto;padding-bottom:5px;"/>
</td> </td>
</t> </t>
<t t-if="company.display_logo2"> <t t-if="company.display_logo2">
<td rowspan="5" style="padding-left:15px;text-align:center;width:135px;border-left:1px solid #adadad" > <td rowspan="5" style="padding-left:15px;text-align:center;width:135px;border-left:1px solid #adadad" >
<img src="/theme_light/static/img/gallery/cnc_agree.jpg" style="width:162px;height:auto;padding-bottom:5px;"/>
<img t-if="company.bottom_logo2" t-att-src="'data:image/png;base64,%s' % company.bottom_logo2" style="width:162px;height:auto;padding-bottom:5px;"/>
<img t-if="not company.bottom_logo2" src="/theme_light/static/img/gallery/cnc_agree.jpg" style="width:162px;height:auto;padding-bottom:5px;"/>
</td> </td>
</t> </t>
</tr> </tr>

Loading…
Cancel
Save