[IMP] account_partner_account_code : changes on field account_number

rename field account_number to account_code
field is now unique
This commit is contained in:
clementthomas
2023-06-09 09:44:46 +02:00
parent 5074244aa6
commit 2d799eaf8c
5 changed files with 33 additions and 22 deletions

View File

@@ -4,4 +4,10 @@ from odoo import fields, models, _
class ResPartner(models.Model):
_inherit = "res.partner"
account_number = fields.Char('Account number')
account_code = fields.Char('Account code')
_sql_constraints = [
('account_coder_unique',
'unique(account_code)',
'Choose another value of account code - it has to be unique!')
]