diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-10-07 10:06:40 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-10-07 10:06:40 +0700 |
| commit | fe6b304a65fd7e576382d871558b3c404b9dd40a (patch) | |
| tree | 1301291b90e9dc3f446cfc7a76a10734d6ba7744 | |
| parent | e02a330a586c83ea1a888e9544d3c450e30099fa (diff) | |
push
| -rw-r--r-- | indoteknik_api/controllers/api_v1/partner.py | 1 | ||||
| -rw-r--r-- | indoteknik_api/controllers/api_v1/user.py | 1 | ||||
| -rwxr-xr-x | indoteknik_custom/models/__init__.py | 1 | ||||
| -rw-r--r-- | indoteknik_custom/models/partner.py | 7 | ||||
| -rwxr-xr-x | indoteknik_custom/security/ir.model.access.csv | 1 | ||||
| -rwxr-xr-x | indoteknik_custom/views/vit_kota.xml | 2 |
6 files changed, 13 insertions, 0 deletions
diff --git a/indoteknik_api/controllers/api_v1/partner.py b/indoteknik_api/controllers/api_v1/partner.py index 833b3302..9d392c53 100644 --- a/indoteknik_api/controllers/api_v1/partner.py +++ b/indoteknik_api/controllers/api_v1/partner.py @@ -104,6 +104,7 @@ class Partner(controller.Controller): 'district_id': ['number', 'alias:kecamatan_id'], 'sub_district_id': ['number', 'alias:kelurahan_id', 'exclude_if_null'], 'zip': ['required'], + 'state_id': ['required'] }) if not params['valid']: diff --git a/indoteknik_api/controllers/api_v1/user.py b/indoteknik_api/controllers/api_v1/user.py index 6419c71c..c7bfe91a 100644 --- a/indoteknik_api/controllers/api_v1/user.py +++ b/indoteknik_api/controllers/api_v1/user.py @@ -155,6 +155,7 @@ class User(controller.Controller): 'name': name, 'login': email, 'mobile': phone, + 'phone': phone, 'password': password, 'active': False, 'sel_groups_1_9_10': 9 diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index a0064c06..7b41a5fe 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -129,3 +129,4 @@ from . import approval_date_doc from . import account_tax from . import approval_unreserve from . import vendor_approval +from . import partner diff --git a/indoteknik_custom/models/partner.py b/indoteknik_custom/models/partner.py new file mode 100644 index 00000000..46dc751a --- /dev/null +++ b/indoteknik_custom/models/partner.py @@ -0,0 +1,7 @@ +from odoo import fields, models, api, _ +from odoo.exceptions import AccessError, UserError, ValidationError + +class kota(models.Model): + _inherit = 'vit.kota' + + is_jabodetabek = fields.Boolean(string='Jabodetabek', default=False)
\ No newline at end of file diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv index 1cd7c1e9..408aae55 100755 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -140,3 +140,4 @@ access_approval_unreserve,access.approval.unreserve,model_approval_unreserve,,1, access_approval_unreserve_line,access.approval.unreserve.line,model_approval_unreserve_line,,1,1,1,1 access_vendor_approval,access.vendor.approval,model_vendor_approval,,1,1,1,1 access_vendor_approval_line,access.vendor.approval.line,model_vendor_approval_line,,1,1,1,1 +access_vit_kota,access.vit.kota,model_vit_kota,,1,1,1,1 diff --git a/indoteknik_custom/views/vit_kota.xml b/indoteknik_custom/views/vit_kota.xml index 97c7e66c..58c97eb4 100755 --- a/indoteknik_custom/views/vit_kota.xml +++ b/indoteknik_custom/views/vit_kota.xml @@ -9,6 +9,7 @@ <field name="name"/> <field name="jenis"/> <field name="state_id"/> + <field name="is_jabodetabek"/> </tree> </field> </record> @@ -28,6 +29,7 @@ <group> <field name="jenis"/> <field name="state_id"/> + <field name="is_jabodetabek"/> </group> <group/> </group> |
