diff --git a/.idea/client_contracts.iml b/.idea/client_contracts.iml new file mode 100644 index 0000000..6711606 --- /dev/null +++ b/.idea/client_contracts.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..4e1dbee --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..9a6a7f4 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 11f1f69..41d508c 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,6 +2,8 @@ + + @@ -17,8 +19,8 @@ - - + + @@ -39,8 +41,8 @@ - - + + @@ -61,9 +63,10 @@ - - + + + @@ -84,34 +87,45 @@ - - - - - - - - - - - - - + - - - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + @@ -156,14 +170,14 @@ - + - + @@ -217,11 +231,6 @@ - - - - - @@ -265,13 +274,12 @@ - + - + - @@ -285,6 +293,7 @@ + @@ -302,7 +311,9 @@ - + + + @@ -331,7 +342,7 @@ - + @@ -348,18 +359,10 @@ - - - - - - - - - + @@ -372,7 +375,9 @@ - + + + @@ -381,7 +386,7 @@ - + @@ -398,18 +403,10 @@ - - - - - - - - - + @@ -442,7 +439,9 @@ - + + + @@ -478,18 +477,10 @@ - - - - - - - - - + @@ -503,7 +494,7 @@ - + @@ -512,7 +503,9 @@ - + + + @@ -521,7 +514,7 @@ - + @@ -550,18 +543,10 @@ - - - - - - - - - + @@ -582,18 +567,13 @@ - - - - - - - - - + + + + @@ -626,7 +606,9 @@ - + + + @@ -658,61 +640,16 @@ - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - @@ -720,7 +657,6 @@ - @@ -728,9 +664,6 @@ - - - @@ -754,16 +687,6 @@ - - - - - - - - - - @@ -780,21 +703,40 @@ + + + + + + + + - - + + + + + + + + + + + + - - + + + @@ -815,29 +757,30 @@ - - - - - - - - - - - - - + - - - - - - + + + + + + - + + + + + + + + + + + + + + diff --git a/models/contract_wizard.py b/models/contract_wizard.py index c19cf0c..c26412b 100644 --- a/models/contract_wizard.py +++ b/models/contract_wizard.py @@ -82,7 +82,7 @@ class ContractWizard(models.TransientModel): @api.onchange('contract_id') def _compute_context_date(self): contract_date = datetime.strptime(self.contract_id.date, '%Y-%m-%d') - self._context_date = contract_date.strftime('%d %b %Y') + self._context_date = contract_date.strftime('%d %B %Y') @api.onchange('partner_id') def _compute_context_partner_contract_name(self): diff --git a/models/models.py b/models/models.py index 8cf8ac0..cb10295 100644 --- a/models/models.py +++ b/models/models.py @@ -50,7 +50,8 @@ class PartnerContract(models.Model): @api.model def create(self, vals): - vals['name'] = self._calculate_contract_name(datetime.now()) + datetime_now = datetime.now().strftime("%Y-%m-%d") + vals['name'] = self._calculate_contract_name(datetime_now) return super(PartnerContract, self).create(vals) @@ -85,7 +86,12 @@ class ResPartner(models.Model): @api.one @api.depends('street', 'street2', 'city', 'state_id', 'zip', 'country_id') def _compute_full_adress(self): - full_adress = '{}, {}, {}, {} {}'.format(self.zip, self.country_id.name, self.city, self.street, self.street2) + if self.zip: + full_adress = '{}, {}, {}, {} {}'.format(self.zip, self.country_id.name, self.city, self.street, + self.street2) + else: + full_adress = '{}, {}, {} {}'.format(self.country_id.name, self.city, self.street, + self.street2) self.full_adress = full_adress @api.one diff --git a/views/templates.xml b/views/templates.xml index 3748896..a89b022 100644 --- a/views/templates.xml +++ b/views/templates.xml @@ -429,6 +429,14 @@ + + + + + + + + Расчетный счет: @@ -440,6 +448,17 @@ + + + Паспорт: + + + Адрес: + + Телефон: + + + @@ -622,7 +641,7 @@ - + ПРОДАВЕЦ @@ -636,19 +655,14 @@ - + - - - - Паспорт: - - Адрес: - - Телефон: - + + + + @@ -663,7 +677,6 @@ - @@ -680,7 +693,7 @@ - +