Browse Source

[IMP] posibility to upload an attachment and link it to the request

pull/1/head
houssine 5 years ago
parent
commit
8b67b077b9
  1. 1
      easy_my_coop/models/company.py
  2. 1
      easy_my_coop/view/res_company_view.xml
  3. 13
      easy_my_coop/view/subscription_template.xml

1
easy_my_coop/models/company.py

@ -14,6 +14,7 @@ class ResCompany(models.Model):
default=lambda self: self.country_id)
default_lang_id = fields.Many2one('res.lang',
string="Default lang")
allow_id_card_upload = fields.Boolean(string="Allow ID Card upload")
board_representative = fields.Char(string="Board representative name")
signature_scan = fields.Binary(string="Board representative signature")
property_cooperator_account = fields.Many2one('account.account',

1
easy_my_coop/view/res_company_view.xml

@ -8,6 +8,7 @@
<xpath expr="//group[@name='account_grp']" position="after">
<group name="coop_grp" string="EasyMy Coop" groups="easy_my_coop.group_energiris_manager">
<field name="unmix_share_type"/>
<field name="allow_id_card_upload"/>
<field name="display_logo1"/>
<field name="bottom_logo1"/>
<field name="display_logo2"/>

13
easy_my_coop/view/subscription_template.xml

@ -166,7 +166,6 @@
</div>
<div t-attf-class="form-group #{error and 'country_id' in error and 'has-error' or ''}">
<label class="col-md-3 col-sm-4 control-label" style="width:25%" for="country_id">Country</label>
<select name="country_id" class="col-md-7 col-sm-8 form-control " style="width:54%;margin-left:15px">
<option value="">Country...</option>
@ -183,8 +182,7 @@
</div>
</div>
<div t-attf-class="form-group #{error and 'product_id' in error and 'has-error' or ''}">
<div t-attf-class="form-group #{error and 'share_product_id' in error and 'has-error' or ''}">
<label class="col-md-3 col-sm-4 control-label" style="width:25%" for="share_product_id">Parts type</label>
<select id="share_product_id" name="share_product_id" class="col-md-7 col-sm-8 form-control " style="width:54%;margin-left:15px">
<t t-foreach="products or []" t-as="product">
@ -192,6 +190,7 @@
</t>
</select>
</div>
<div name="share_div" class="form-group">
<table style="width:80%">
<tr>
@ -229,6 +228,14 @@
</tr>
</table>
</div>
<div t-if="res_company.allow_id_card_upload" t-attf-class="form-group #{error and 'file' in error and 'has-error' or ''}">
<label class="col-md-3 col-sm-4 control-label" style="width:25%" for="file">Idendity card scan</label>
<div class="col-md-7 col-sm-8">
<input type="file" class="form-control" name="Resume" t-attf-value="#{file or ''}" style="width:50%"/>
</div>
</div>
<div class="bottom-line" style="margin-left:178px;margin-top:0px;width:61%"></div>
<br/>

Loading…
Cancel
Save