diff --git a/ext/custom-addons/dp_custom/models/res_partner.py b/ext/custom-addons/dp_custom/models/res_partner.py index a424c40e..fbcb2f29 100644 --- a/ext/custom-addons/dp_custom/models/res_partner.py +++ b/ext/custom-addons/dp_custom/models/res_partner.py @@ -46,6 +46,10 @@ class Partner(models.Model): _name = 'res.partner' _inherit = ['res.partner', 'dp_custom.helper'] + @api.model + def _default_country_id(self): + return self.env.ref('base.at') + company = fields.Char(string='Unternehmen') info_kundennr = fields.Char(string='Info-Kundennr.') info_uid = fields.Char(string='Info-UID') @@ -57,6 +61,7 @@ class Partner(models.Model): portal_export_pending = fields.Boolean(string='Portal Export ausständig') date_vat_check = fields.Date(string='Datum der letzten UID-Prüfung') collective_bill = fields.Boolean(string='Sammelrechnung', default=True) + country_id = fields.Many2one('res.country', string='Country', ondelete='restrict', default=_default_country_id) _sql_constraints = [ ('ref_uniq', 'unique(ref)', 'Die Interne Referenz muss eindeutig sein'),