|
|
@ -1,7 +1,7 @@ |
|
|
|
# Copyright 2017 Grant Thornton Spain - Ismael Calvo <ismael.calvo@es.gt.com> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
|
|
|
|
from odoo import api, models, _ |
|
|
|
from odoo import _, api, fields, models |
|
|
|
from odoo.exceptions import ValidationError |
|
|
|
from odoo.tools import config |
|
|
|
|
|
|
@ -9,6 +9,8 @@ from odoo.tools import config |
|
|
|
class ResPartner(models.Model): |
|
|
|
_inherit = 'res.partner' |
|
|
|
|
|
|
|
vat = fields.Char(copy=False) |
|
|
|
|
|
|
|
@api.constrains('vat') |
|
|
|
def _check_vat_unique(self): |
|
|
|
for record in self: |
|
|
|