Browse Source

[14.0][IMP] Added the field 'color' to partner_id_category.

14.0
Chanakya Soni 3 years ago
parent
commit
1adf7bbcf6
  1. 6
      partner_identification/models/res_partner_id_category.py

6
partner_identification/models/res_partner_id_category.py

@ -8,6 +8,8 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from random import randint
from odoo import _, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo.tools.safe_eval import safe_eval
@ -18,6 +20,10 @@ class ResPartnerIdCategory(models.Model):
_description = "Partner ID Category"
_order = "name"
def _get_default_color(self):
return randint(1, 11)
color = fields.Integer(string="Color Index", default=_get_default_color)
code = fields.Char(
string="Code",
size=16,

Loading…
Cancel
Save