|
|
@ -25,6 +25,12 @@ class Partner(models.Model): |
|
|
|
def _on_change_name(self): |
|
|
|
self.name = concat_names(self.first_name, self.last_name) |
|
|
|
|
|
|
|
@api.one |
|
|
|
@api.constrains('country_id') |
|
|
|
def _check_country(self): |
|
|
|
if len(self.country_id) == 0: |
|
|
|
raise ValidationError(_('Country is mandatory')) |
|
|
|
|
|
|
|
@api.one |
|
|
|
@api.depends('parent_eater_id', 'parent_eater_id.barcode', 'eater', 'member_card_ids') |
|
|
|
def _get_bar_code(self): |
|
|
|