Browse Source

[IMP] bottom page logo now can be uploaded

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

2
easy_my_coop/models/company.py

@ -20,3 +20,5 @@ class ResCompany(models.Model):
"to have only one type of share")
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">
<field name="unmix_share_type"/>
<field name="display_logo1"/>
<field name="bottom_logo1"/>
<field name="display_logo2"/>
<field name="bottom_logo2"/>
<field name="coop_email_contact"/>
<field name="subscription_maximum_amount"/>
<field name="property_cooperator_account"/>

6
theme_light/views/layout_template.xml

@ -67,12 +67,14 @@
<td/>
<t t-if="company.display_logo1">
<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>
</t>
<t t-if="company.display_logo2">
<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>
</t>
</tr>

Loading…
Cancel
Save