diff --git a/odex25_base/partner_custom/models/models.py b/odex25_base/partner_custom/models/models.py
index 5246ba7e3..384174a7d 100644
--- a/odex25_base/partner_custom/models/models.py
+++ b/odex25_base/partner_custom/models/models.py
@@ -13,9 +13,9 @@ class ResPartner(models.Model):
('iqama', 'Iqama'),
('passport', 'Passport'),
('other', 'Other')], default='id',string='Identification Type')
- identification_number = fields.Char(string='Identification NUmber')
+ identification_number = fields.Char(string='Identification NUmber',copy=False)
identification_issue_date = fields.Date(string='Identification Issue Date')
- identification_expiry_date = fields.Date(string='Identification Expiry Date')
+ identification_expiry_date = fields.Date(string='Identification Expiry Date',copy=False)
issuer = fields.Char(string='Issuer')
copy_no = fields.Integer(string='Copy No')
@@ -23,9 +23,9 @@ class ResPartner(models.Model):
def check_expr_date(self):
for each in self:
if each.identification_expiry_date:
- exp_date = fields.Date.from_string(each.identification_expiry_date)
- if exp_date < date.today():
- raise Warning(_('Your Document Is Expired.'))
+ exp_date = fields.Date.from_string(each.identification_expiry_date)
+ if exp_date < date.today():
+ raise Warning(_('Your Document Is Expired.'))
if each.identification_type == 'id':
if each.identification_number and len(each.identification_number) != 10:
@@ -46,12 +46,12 @@ class ResPartner(models.Model):
if date.today() >= each.identification_expiry_date:
raise Warning(_("Error, the expiry date must be greater than the date of the day"))
- @api.constrains('phone')
- def _check_phone_length_and_digits(self):
- for record in self:
- if record.phone:
- if not record.phone.isdigit() or len(record.phone) != 10:
- raise ValidationError(_("The phone number must contain exactly 10 digits and no letters or symbols."))
+ # @api.constrains('mobile')
+ # def _check_phone_length_and_digits(self):
+ # for record in self:
+ # if record.mobile:
+ # if not record.mobile.isdigit() or len(record.mobile) != 10:
+ # raise ValidationError(_("The mobile number must contain exactly 10 digits and no letters or symbols."))
@api.constrains('email')
diff --git a/odex25_base/partner_custom/security/security.xml b/odex25_base/partner_custom/security/security.xml
index 6f313f019..3b3a1ef26 100644
--- a/odex25_base/partner_custom/security/security.xml
+++ b/odex25_base/partner_custom/security/security.xml
@@ -2,8 +2,8 @@
-
- Sale/Purchase Tab
+
+ Sale/Purchase
\ No newline at end of file
diff --git a/odex25_base/partner_custom/views/views.xml b/odex25_base/partner_custom/views/views.xml
index 0bb353268..d03b637b8 100644
--- a/odex25_base/partner_custom/views/views.xml
+++ b/odex25_base/partner_custom/views/views.xml
@@ -30,7 +30,7 @@
- partner_custom.sale_purchase_tab
+ partner_custom.sale_purchase_group