-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2016 OpenSynergy Indonesia | ||
# Copyright 2016-2019 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2019 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import res_partner |
66 changes: 66 additions & 0 deletions
66
partner_identification_sim_indonesia/models/res_partner.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2019 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from openerp import models, fields | ||
|
||
|
||
class ResPartner(models.Model): | ||
_inherit = "res.partner" | ||
|
||
sim_a_umum_number = fields.Char( | ||
string="# SIM A Umum", | ||
compute=lambda s: s._compute_identification( | ||
"sim_a_umum_number", "sim_A_umum"), | ||
search=lambda s, *a: s._search_identification( | ||
"sim_A_umum", *a), | ||
) | ||
sim_a_number = fields.Char( | ||
string="# SIM A", | ||
compute=lambda s: s._compute_identification( | ||
"sim_a_number", "sim_A"), | ||
search=lambda s, *a: s._search_identification( | ||
"sim_A", *a), | ||
) | ||
sim_b1_umum_number = fields.Char( | ||
string="# SIM B1 Umum", | ||
compute=lambda s: s._compute_identification( | ||
"sim_b1_umum_number", "sim_B1_umum"), | ||
search=lambda s, *a: s._search_identification( | ||
"sim_B1_umum", *a), | ||
) | ||
sim_b1_number = fields.Char( | ||
string="# SIM B1", | ||
compute=lambda s: s._compute_identification( | ||
"sim_b1_number", "sim_B1"), | ||
search=lambda s, *a: s._search_identification( | ||
"sim_B1", *a), | ||
) | ||
sim_b2_umum_number = fields.Char( | ||
string="# SIM B2 Umum", | ||
compute=lambda s: s._compute_identification( | ||
"sim_b2_umum_number", "sim_B2_umum"), | ||
search=lambda s, *a: s._search_identification( | ||
"sim_B2_umum", *a), | ||
) | ||
sim_b2_number = fields.Char( | ||
string="# SIM B2", | ||
compute=lambda s: s._compute_identification( | ||
"sim_b2_number", "sim_B2"), | ||
search=lambda s, *a: s._search_identification( | ||
"sim_B2", *a), | ||
) | ||
sim_c_number = fields.Char( | ||
string="# SIM C", | ||
compute=lambda s: s._compute_identification( | ||
"sim_c_number", "sim_C"), | ||
search=lambda s, *a: s._search_identification( | ||
"sim_C", *a), | ||
) | ||
sim_d_number = fields.Char( | ||
string="# SIM D", | ||
compute=lambda s: s._compute_identification( | ||
"sim_d_number", "sim_D"), | ||
search=lambda s, *a: s._search_identification( | ||
"sim_D", *a), | ||
) |