File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ def _compute_student_links(self):
96
96
# al hacerlo con mode tree nos simplfica bastante la herencia de vista porque no tenemos que agregar en el quick
97
97
# create tantas cosas
98
98
student_ids = fields .One2many ('res.partner' , 'parent_id' )
99
+ company_id = fields .Many2one (compute = '_compute_company_id' , store = True )
99
100
# company_type = fields.Selection(selection_add=[('family', 'Family')])
100
101
# is_family = fields.Boolean()
101
102
@@ -147,3 +148,8 @@ def quickly_create_portal_user(self):
147
148
active_model = 'res.partner' ).create ({})
148
149
wizard .user_ids .write ({'in_portal' : True })
149
150
wizard .action_apply ()
151
+
152
+ @api .depends ('partner_type' )
153
+ def _compute_company_id (self ):
154
+ self .company_id = self .env .company if self .partner_type else False
155
+
You can’t perform that action at this time.
0 commit comments