[WIP] police report

This commit is contained in:
Dario Lodeiros
2019-02-11 17:10:49 +01:00
parent bf3e75c24b
commit 069db75f31
4 changed files with 5 additions and 3 deletions

View File

@@ -63,7 +63,6 @@ class ResPartner(models.Model):
for i, record in enumerate(self):
if record.unconfirmed is True:
partner_dst = self.env['res.partner']._check_duplicated_partner(record)
return
res = super(ResPartner, self).write(vals)
return res

View File

@@ -30,6 +30,7 @@ class HotelCheckinPartner(models.Model):
document_number = fields.Char(related='partner_id.document_number')
document_expedition_date = fields.Date(related='partner_id.document_expedition_date')
gender = fields.Selection('Gender', related='partner_id.gender')
birthdate_date = fields.Date('Birhdate', related='partner_id.birthdate_date')
code_ine_id = fields.Many2one(related="partner_id.code_ine_id")
#TMP_FIX VAT Validation

View File

@@ -35,6 +35,7 @@
<field name="document_type"/>
<field name="document_number" string="Doc. Number"/>
<field name="document_expedition_date" string="Exp. Date"/>
<field name="birthdate_date" string="Birthdate" />
<field name="code_ine_id" />
</xpath>
</field>
@@ -58,6 +59,7 @@
<field name="document_type"/>
<field name="document_number" string="Doc. Number"/>
<field name="document_expedition_date" string="Exp. Date"/>
<field name="birthdate_date" string="Birthdate" />
<field name="code_ine_id" />
</xpath>
</field>

View File

@@ -41,9 +41,9 @@ class PoliceWizard(models.TransientModel):
def generate_file(self):
company = self.env.user.company_id
if company.police_number is not False and company.property_name is not False:
lines = self.env['cardex'].search([('enter_date', '=',
lines = self.env['hotel.checkin.partner'].search([('enter_date', '=',
self.download_date)])
content = "1|"+company.police_number+"|"+compa.property_name.upper()[0:40]
content = "1|"+company.police_number+"|"+company.property_name.upper()[0:40]
content += "|"
content += datetime.datetime.now().strftime("%Y%m%d|%H%M")
content += "|"+str(len(lines)) + """