Hello everybody
I created a model named adherent inherited from res.partner:
class Adherent(models.Model):
_name = 'adherent.adherent'
_inherit = ['res.partner', 'mail.thread', 'mail.activity.mixin']
num_adh = fields.Integer(string="N° adhérent")
num_contrat = fields.Char(string="Contrat")
adhesion = fields.Many2one('product.product', string='Adhésion', domain=lambda self: [('categ_id.name', '=', 'Adhésion')])
contact = fields.Many2one('res.partner', string='Contact associé')
partenaire_adhesion = fields.Char(string='Partenaire')
deb_adhesion = fields.Date(string="Date adhésion")
fin_adhesion = fields.Date(string="Fin adhésion")
adherent_dob = fields.Date(string="Date de naissance")
When I try to create a record in using XmlRPC I got an error only with the field commercial_partner_id:
ValueError: Wrong value for adherent.adherent.commercial_partner_id: adherent.adherent(82,)
I tried to set the value of this field: to null, with an existing partner id without success
Could u help me to fix this bug?
Thks in advance,
Bruno