|
@ -3,6 +3,7 @@ |
|
|
from openerp import api, fields, models, _ |
|
|
from openerp import api, fields, models, _ |
|
|
from openerp.exceptions import UserError |
|
|
from openerp.exceptions import UserError |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PartnerUpdateInfo(models.TransientModel): |
|
|
class PartnerUpdateInfo(models.TransientModel): |
|
|
_name = "partner.update.info" |
|
|
_name = "partner.update.info" |
|
|
_description = "Update Partner Info" |
|
|
_description = "Update Partner Info" |
|
@ -20,11 +21,16 @@ class PartnerUpdateInfo(models.TransientModel): |
|
|
else: |
|
|
else: |
|
|
return partner.national_register_number |
|
|
return partner.national_register_number |
|
|
|
|
|
|
|
|
register_number = fields.Char(string="Register Number", required=True, default=_get_register_number) |
|
|
|
|
|
cooperator = fields.Many2one('res.partner', string="Cooperator", default=_get_partner) |
|
|
|
|
|
|
|
|
register_number = fields.Char(string="Register Number", |
|
|
|
|
|
required=True, |
|
|
|
|
|
default=_get_register_number) |
|
|
|
|
|
cooperator = fields.Many2one('res.partner', |
|
|
|
|
|
string="Cooperator", |
|
|
|
|
|
default=_get_partner) |
|
|
|
|
|
|
|
|
def check_belgian_ident_id(self, register_number): |
|
|
def check_belgian_ident_id(self, register_number): |
|
|
if self.env['subscription.request'].check_belgian_identification_id(register_number): |
|
|
|
|
|
|
|
|
if self.env['subscription.request'].check_belgian_identification_id( |
|
|
|
|
|
register_number): |
|
|
return True |
|
|
return True |
|
|
else: |
|
|
else: |
|
|
raise UserError(_("The national register number is not valid.")) |
|
|
raise UserError(_("The national register number is not valid.")) |
|
|