I've created my own field company_origin. It is only visible if the partner (res.partner modell) is a company.
The field company_origin is a Many2one field, related to a modell origin which i added to res_partner.
My Problem is that i can't write values into the children of the company. For some fields it works (e.g. street) but for some it doesn't. (e.g. website). I also can not write the fields that i added to res.partner with my own model.
Here is some code that shows my problem, street changes but website doesnt (both are fields.Char() fields).
@api.onchange('company_origin')
def _set_children_origin(self):
if self.child_ids != False:
#--------------------------#
for child in self.child_ids:
child.street = "teststreet"
child.website = "testsite"
Thanks, for any advice.
Both fields are in the view xml?
Yes i can see both fields and they are defined in res.partner (view). I use _inherit=res.partner in my modell to add new elements. But those two fields both are untouched. I really would like to know why i can not write into child.website. Thanks for your reply.