Commit 3b9fd9ee by aa.gusti

alamat partner dan company

1 parent c727dcc2
......@@ -20,13 +20,17 @@ Menydiakan module untuk followup Wajib Pajak/Retribusi.
'images/journal_entries.jpeg'],
'depends': ['base_setup', 'account'],
'data': [
# 'data/res_district.xml',
'data/res.district.csv',
'data/res.district.sub.csv',
'data/res.district.village.csv',
'views/view_config.xml',
'views/partner.xml',
'views/objek_pajak.xml',
'views/district.xml',
'views/sub_district.xml',
'views/village.xml',
'views/sudut_pandang.xml',
'views/company.xml',
'views/pdl_kab_menus.xml',
'security/account_security.xml',
'security/ir.model.access.csv',
......
"id","state_id","name","code","typ"
ct_jb_19,JB,"Ciamis","19","kab"
ct_jb_71,JB,"Bogor","71","kota"
ct_jb_76,JB,"Depok","76","kota"
ct_jt_19,JT,"Cilacap","19","kab"
"id","district_id:id","name","code"
sub_jb_19_001,ct_jb_19,"Kawali","001"
sub_jt_19_001,ct_jt_19,"Cilacap","001"
"id","sub_district_id:id","name","code","typ"
vil_jb_19_001_001,sub_jb_19_001,"Kawali","001","desa"
vil_jb_19_002_001,sub_jb_19_001,"Kawali Mukti","002","desa"
vil_jt_19_001_001,sub_jt_19_001,"Cilacap","001","kelurahan"
vil_jt_19_001_002,sub_jt_19_001,"Cilacap Timur","002","kelurahan"
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="st_3276" model="res.district">
<record id="st_jb_76" model="res.district">
<field name="typ">kota</field>
<field name="name">Depok</field>
<field name="code">3276</field>
<field name="state_id" ref="32" />
<field name="state_id" ref="JB" />
</record>
</data>
</odoo>
\ No newline at end of file
......@@ -4,3 +4,4 @@ _logger = logging.getLogger(__name__)
from . import partner
from . import district
from . import pdl_sudut_pandang
from . import company
\ No newline at end of file
import logging
from odoo import models, fields, api
class Company(models.Model):
_name = 'res.company'
_inherit = 'res.company'
test = fields.Char()
district_id = fields.Many2one(
'res.district', compute='_compute_address', inverse='_inverse_district',
string="Kab/Kota", domain="[('state_id', '=?', state_id)]"
)
sub_district_id = fields.Many2one(
'res.district.sub', compute='_compute_address', inverse='_inverse_sub_district',
string="Kab/Kota", domain="[('district_id', '=?', district_id)]"
)
village_id = fields.Many2one(
'res.district.village', compute='_compute_address', inverse='_inverse_village',
string="Desa/Kelurahan", domain="[('sub_district_id', '=?', sub_district_id)]"
)
def _get_company_address_field_names(self):
""" Return a list of fields coming from the address partner to match
on company address fields. Fields are labeled same on both models. """
return ['street', 'street2', 'city', 'zip', 'state_id', 'country_id',
'district_id', 'sub_district_id', 'village_id']
def _inverse_district(self):
for company in self:
company.partner_id.district_id = company.district_id
def _inverse_sub_district(self):
for company in self:
company.partner_id.sub_district_id = company.sub_district_id
def _inverse_village(self):
for company in self:
company.partner_id.village_id = company.village_id
@api.onchange('village_id')
def _onchange_village(self):
if self.village_id.sub_district_id:
self.sub_district_id = self.village_id.sub_district_id
@api.onchange('sub_district_id')
def _onchange_sub_district(self):
if self.sub_district_id.district_id:
self.district_id = self.sub_district_id.district_id
@api.onchange('district_id')
def _onchange_district(self):
if self.district_id.state_id:
self.state_id = self.district_id.state_id
......@@ -5,6 +5,8 @@ from odoo.osv import expression
def get_selection_label(self, obj, field_name, field_value):
_logger.info(field_name)
_logger.info(field_value)
return dict(self.env[obj].fields_get(allfields=[field_name])[field_name]['selection'])[field_value]
......@@ -93,8 +95,9 @@ class District(models.Model):
def name_get(self):
result = []
for record in self:
# result.append((record.id, "{} {} ({})".format(record.typ, record.name, record.code)))
result.append((record.id, "{} {} ({}.{})".format(
get_selection_label(self, self._name, 'typ', self.typ), self.name,
get_selection_label(self, self._name, 'typ', record.typ), record.name,
record.state_id.code, record.code)))
return result
......@@ -136,18 +139,24 @@ class SubDistrict(models.Model):
district_id = fields.Many2one('res.district', string='Kabupaten/Kota', required=True)
code = fields.Char(string="Kode Kecamatan")
name = fields.Char(string="Nama Kecamatan", index=True)
# display_code = fields.Char(index=True) # compute='_compute_display_code', store=True,
# display_name = fields.Char(index=True) # compute='_compute_display_name', store=True,
_sql_constraints = [
('code_uniq', 'unique (district_id,code)', 'Kode Kecamatan Harus Unik !'),
('name_uniq', 'unique (district_id,name)', 'Nama Kecamatan Harus Unik !'),
]
def code_get(self):
result = []
for record in self:
result.append((record.id, "{}.{}.{}".format(
record.district_id.state_id.code, record.district_id.code,
record.code)))
return result
def name_get(self):
result = []
for record in self:
result.append((record.id, "{} ({}.{}.{})".format(
self.name, record.district_id.state_id.code,
record.name, record.district_id.state_id.code,
record.district_id.code, record.code)))
return result
......@@ -155,15 +164,14 @@ class SubDistrict(models.Model):
class Village(models.Model):
_name = 'res.district.village'
_description = "Desa/Keurahan"
sub_district_id = fields.Many2one('res.district.sub', string='Kecamatan', required=True)
sub_district_id = fields.Many2one('res.district.sub', string='Kecamatan',
required=True)
typ = fields.Selection([
('desa', 'Desa'),
('kelurahan', 'Kelurahan')],
string='Jenis')
code = fields.Char(string="Kode Desa/Kelurahan")
name = fields.Char(string="Nama Desa/Kelurahan", index=True)
# display_code = fields.Char(index=True) # compute='_compute_display_code', store=True,
# display_name = fields.Char(index=True) # compute='_compute_display_name', store=True,
_sql_constraints = [
('village_code_uniq', 'unique (sub_district_id,code)', 'Kode Kelurahan/Desa Harus Unik !'),
('village_name_uniq', 'unique (sub_district_id,typ,name)', 'Nama Kelurahan/Desa Harus Unik !'),
......@@ -182,7 +190,7 @@ class Village(models.Model):
result = []
for record in self:
result.append((record.id, "{} {} ({}.{}.{}.{})".format(
get_selection_label(self, self._name, 'typ', self.typ), self.name,
get_selection_label(self, self._name, 'typ', record.typ), record.name,
record.sub_district_id.district_id.state_id.code,
record.sub_district_id.district_id.code,
record.sub_district_id.code, record.code)))
......
import time
import logging
from odoo import fields, models, api
from psycopg2 import sql, DatabaseError
from odoo import api, fields, models, _
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
from odoo.exceptions import ValidationError
from odoo.addons.base.models.res_partner import WARNING_MESSAGE, WARNING_HELP
ADDRESS_FIELDS = ('street', 'street2', 'zip', 'city', 'state_id', 'country_id',
'village_id', 'sub_district_id', 'district_id')
class ResPartner(models.Model):
_name = 'res.partner'
_inherit = 'res.partner'
# is_hotel = fields.Boolean(string='Is a Hotel', default=False,
# help="Check if the contact is a hotel, otherwise it is non hotel")
district_id = fields.Many2one('res.district', string="Kabupaten/Kota")
sub_district_id = fields.Many2one('res.district.sub', string="Kecamatan")
village_id = fields.Many2one('res.district.village', string="Desa/Kelurahan")
@api.model
def _address_fields(self):
"""Returns the list of address fields that are synced from the parent."""
return list(ADDRESS_FIELDS)
@api.onchange('village_id')
def _onchange_village_id(self):
if self.village_id and self.village_id.sub_district_id != self.sub_district_id:
self.sub_district_id = self.village_id.sub_district_id
@api.onchange('sub_district_id')
def _onchange_sub_district_id(self):
if self.sub_district_id and self.sub_district_id.district_id != self.district_id:
self.district_id = self.sub_district_id.district_id
if not self.sub_district_id or self.sub_district_id != self.village_id.sub_district_id:
self.village_id = False
@api.onchange('district_id')
def _onchange_district_id(self):
if self.district_id and self.district_id.state_id != self.state_id:
self.state_id = self.district_id.state_id
if not self.district_id or self.district_id != self.sub_district_id.district_id:
self.sub_district_id = False
@api.onchange('state_id')
def _onchange_state_id(self):
if not self.state_id or self.state_id != self.district_id.state_id:
self.district_id = False
.o_form_view {
background-color: white;
}
.o_form_view .oe_form_box_info {
padding-top: 5px;
padding-right: 16px;
padding-bottom: 5px;
padding-left: 16px;
}
.o_form_view .oe_form_box_info > p {
margin: auto;
}
.o_form_view .oe_text_center {
text-align: center;
}
.o_form_view .oe_grey {
opacity: 0.5;
}
.o_form_view .oe_inline, .o_form_view .oe_right, .o_form_view .o_group.o_inner_group.oe_subtotal_footer, .o_form_view .oe_left {
width: auto !important;
}
@media (min-width: 475px) {
.o_form_view .oe_inline.o_inner_group, .o_form_view .o_inner_group.oe_right, .o_form_view .o_inner_group.o_group.oe_subtotal_footer, .o_form_view .o_inner_group.oe_left {
width: 1px !important;
}
}
.o_form_view .oe_left {
float: left !important;
}
.o_form_view .oe_right, .o_form_view .o_group.o_inner_group.oe_subtotal_footer {
float: right !important;
}
@media (min-width: 475px) {
.o_form_view .o_row {
align-items: baseline;
min-width: 50px;
margin: 0 -2.5px;
}
.o_form_view .o_row, .o_form_view .o_row.o_field_widget {
display: -webkit-box;
display: -webkit-flex;
display: flex;
width: auto !important;
}
.o_form_view .o_row > div, .o_form_view .o_row > span, .o_form_view .o_row > button, .o_form_view .o_row > label, .o_form_view .o_row > a, .o_form_view .o_row > input, .o_form_view .o_row > select {
-webkit-box-flex: 0;
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
width: auto !important;
margin-right: 2.5px;
margin-left: 2.5px;
}
.o_form_view .o_row > .o_row {
margin: 0;
}
.o_form_view .o_row > .btn {
padding-top: 0;
padding-bottom: 0;
}
.o_form_view .o_row > .o_field_boolean {
align-self: center;
}
}
.o_form_view .o_row > div > .o_field_widget {
width: 100%;
}
.o_form_view.o_form_readonly .oe_edit_only {
display: none !important;
}
.o_form_view.o_form_readonly .o_row:not(.o_row_readonly), .o_form_view.o_form_readonly .o_row:not(.o_row_readonly) > div {
display: inline-block;
}
.o_form_view.o_form_readonly .o_field_color_picker_preview > li > a {
cursor: default;
}
.o_form_view .o_form_uri {
display: inline-block;
color: #7C7BAD;
}
.o_form_view .o_form_uri:hover {
color: #555487;
}
.o_form_view .o_form_uri > span {
color: #4c4c4c;
}
.o_form_view .o_form_uri > span:hover {
color: #4c4c4c;
}
.o_form_view .o_form_uri > span:first-child {
color: #7C7BAD;
}
.o_form_view .o_form_uri > span:first-child:hover {
color: #555487;
}
.o_form_view.o_form_editable .oe_read_only {
display: none !important;
}
.o_form_view.o_form_editable .oe_title {
max-width: 688px;
}
@media (min-width: 475px) {
.o_form_view.o_form_editable .o_row > .o_field_widget, .o_form_view.o_form_editable .o_row > div {
-webkit-box-flex: 1;
-webkit-flex: 1 1 auto;
flex: 1 1 auto;
width: 0 !important;
}
.o_form_view.o_form_editable .o_row > .o_field_widget.o_field_boolean, .o_form_view.o_form_editable .o_row > .o_field_widget.o_priority, .o_form_view.o_form_editable .o_row > div.o_field_boolean, .o_form_view.o_form_editable .o_row > div.o_priority {
-webkit-box-flex: 0;
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
width: auto !important;
}
}
.o_form_view.o_form_nosheet {
display: block;
padding-top: 24px;
padding-right: 16px;
padding-bottom: 24px;
padding-left: 16px;
}
.o_form_view.o_form_nosheet .o_form_statusbar {
margin: -24px -16px 24px -16px;
}
.o_form_view .o_form_sheet_bg {
position: relative;
}
.o_form_view .o_form_statusbar {
position: relative;
display: -webkit-box;
display: -webkit-flex;
display: flex;
justify-content: space-between;
padding-left: 16px;
border-bottom: 1px solid #ced4da;
background-color: white;
}
.o_form_view .o_form_statusbar > .o_statusbar_buttons, .o_form_view .o_form_statusbar > .o_statusbar_status {
display: -webkit-box;
display: -webkit-flex;
display: flex;
align-items: center;
align-content: space-around;
}
.o_form_view .o_form_statusbar > .o_field_widget {
align-self: center;
margin-bottom: 0px;
}
.o_form_view .o_form_statusbar > .o_statusbar_buttons {
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
}
.o_form_view .o_form_statusbar > .o_statusbar_buttons > .btn {
min-height: 25px;
margin: 4px 3px 4px 0;
padding-top: 2px;
padding-bottom: 2px;
}
.o_form_view .o_form_statusbar > .o_statusbar_status {
margin-left: auto;
flex-flow: row-reverse wrap-reverse;
align-self: stretch;
align-items: stretch;
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button {
min-height: 33px;
font-size: 11px;
font-weight: bold;
position: relative;
padding-left: 22px;
color: #495057;
border-width: 0 0 0;
border-radius: 0;
transition: all 0.1s ease 0s;
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:first-child {
padding-right: 16px;
overflow-x: hidden;
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:last-child {
padding-left: 15px;
border-left: 1px solid #ced4da;
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:active {
box-shadow: none;
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button.disabled {
opacity: 1.0;
color: #adb5bd;
pointer-events: none;
border-left: 1px solid #dee2e6;
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:not(:first-child):before, .o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:not(:first-child):after {
content: " ";
display: block;
position: absolute;
top: 0;
left: auto;
bottom: auto;
right: -10px;
border-top: 16px solid transparent;
border-bottom: 17px solid transparent;
border-right: none;
border-left: 11px solid white;
transition: border 0.2s ease 0s;
-moz-transform: scale(0.9999);
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:not(.disabled):hover, .o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:not(.disabled):active, .o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:not(.disabled):focus {
color: #7C7BAD;
background-color: #e9ecef;
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:not(.disabled):hover:after, .o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:not(.disabled):active:after, .o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:not(.disabled):focus:after {
border-left-color: #e9ecef;
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:not(:first-child):before {
right: -11px;
border-left-color: #dee2e6;
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button.btn-primary.disabled {
color: #7C7BAD;
font-size: 11px;
background-color: #e9ecef;
cursor: default;
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button.btn-primary.disabled:after {
border-left-color: #e9ecef;
}
.o_form_view .o_form_statusbar > .o_statusbar_buttons > .btn-group > .dropdown-toggle:after, .o_form_view .o_form_statusbar > .o_statusbar_status > .dropdown-toggle:after {
content: "";
display: inline-block;
width: 0;
height: 0;
vertical-align: middle;
border-bottom: 0;
border-left: 0.3em solid transparent;
border-right: 0.3em solid transparent;
border-top: 0.3em solid;
-moz-transform: scale(0.9999);
margin-left: 5px;
}
.o_form_view .o_form_statusbar > .o_statusbar_buttons > .btn-group > .dropdown-menu, .o_form_view .o_form_statusbar > .o_statusbar_status > .dropdown-menu {
padding: 5px 0 2px 0;
min-width: 100px;
}
.o_form_view .o_form_statusbar > .o_statusbar_buttons > .btn-group > .dropdown-menu .dropdown-item.btn, .o_form_view .o_form_statusbar > .o_statusbar_status > .dropdown-menu .dropdown-item.btn {
min-width: 100%;
margin-bottom: 3px;
}
.o_form_view .oe_button_box {
position: relative;
display: block;
margin-bottom: 24px;
margin-top: -24px;
margin-left: -16px;
margin-right: -16px;
text-align: right;
box-shadow: inset 0 -1px 0 #ced4da;
}
@media (min-width: 992px) and (max-width: 1533.98px) {
.o_form_view .oe_button_box {
margin-left: -32px;
margin-right: -32px;
}
}
.o_form_view .oe_button_box.o_full .oe_stat_button:not(.o_invisible_modifier) ~ .oe_stat_button {
border-left: 1px solid #ced4da;
}
.o_form_view .oe_button_box.o_not_full .oe_stat_button {
border-left: 1px solid #ced4da;
}
.o_form_view .oe_button_box > .btn.oe_stat_button, .o_form_view .oe_button_box > .o_dropdown_more {
-webkit-box-flex: 0;
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
width: 33.33333333%;
}
@media (min-width: 768px) {
.o_form_view .oe_button_box > .btn.oe_stat_button, .o_form_view .oe_button_box > .o_dropdown_more {
width: 20%;
}
}
@media (min-width: 992px) {
.o_form_view .oe_button_box > .btn.oe_stat_button, .o_form_view .oe_button_box > .o_dropdown_more {
width: 14.28571429%;
}
}
@media (min-width: 1200px) {
.o_form_view .oe_button_box > .btn.oe_stat_button, .o_form_view .oe_button_box > .o_dropdown_more {
width: 12.5%;
}
}
.o_form_view .oe_button_box .btn.oe_stat_button {
color: #4c4c4c;
height: 44px;
padding: 0 6px 0 0 !important;
text-align: left;
white-space: nowrap;
background-color: transparent;
opacity: 0.8;
border-radius: 0px;
margin-bottom: 0;
}
.o_form_view .oe_button_box .btn.oe_stat_button:hover, .o_form_view .oe_button_box .btn.oe_stat_button:focus {
background-color: rgba(0, 0, 0, 0.03);
color: inherit;
opacity: 1;
}
.o_form_view .oe_button_box .btn.oe_stat_button > .o_button_icon {
margin-left: 6px;
display: inline-block;
vertical-align: middle;
line-height: 44px;
width: 30%;
}
.o_form_view .oe_button_box .btn.oe_stat_button > .o_button_icon:before {
font-size: 22px;
vertical-align: middle;
}
.o_form_view .oe_button_box .btn.oe_stat_button > .o_field_percent_pie {
margin-left: 6px;
}
.o_form_view .oe_button_box .btn.oe_stat_button > span {
display: block;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: top;
white-space: normal;
}
.o_form_view .oe_button_box .btn.oe_stat_button > .o_stat_info, .o_form_view .oe_button_box .btn.oe_stat_button > span {
display: inline-block;
vertical-align: middle;
font-weight: 500;
max-width: 70%;
padding-right: 6px;
line-height: 1.3;
}
.o_form_view .oe_button_box .btn.oe_stat_button > .o_stat_info > .o_stat_value, .o_form_view .oe_button_box .btn.oe_stat_button > .o_stat_info > .o_stat_text, .o_form_view .oe_button_box .btn.oe_stat_button > span > .o_stat_value, .o_form_view .oe_button_box .btn.oe_stat_button > span > .o_stat_text {
display: block;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: top;
}
.o_form_view .oe_button_box .btn.oe_stat_button > .o_stat_info .o_stat_value, .o_form_view .oe_button_box .btn.oe_stat_button > span .o_stat_value {
font-weight: 700;
color: #7C7BAD;
line-height: 1.2;
}
.o_form_view .oe_button_box .btn.oe_stat_button > .o_stat_info .o_stat_text, .o_form_view .oe_button_box .btn.oe_stat_button > span .o_stat_text {
line-height: 1.2;
}
.o_form_view .oe_button_box .btn.oe_stat_button:not(:hover) .o_stat_info > .o_hover {
display: none !important;
}
.o_form_view .oe_button_box .btn.oe_stat_button:hover .o_stat_info > .o_not_hover {
display: none !important;
}
.o_form_view .oe_button_box .btn.oe_stat_button.o_button_more {
text-align: center;
}
.o_form_view .oe_button_box .btn.oe_stat_button.o_button_more:after {
margin-left: 5px;
content: "";
display: inline-block;
width: 0;
height: 0;
vertical-align: middle;
border-bottom: 0;
border-left: 0.3em solid transparent;
border-right: 0.3em solid transparent;
border-top: 0.3em solid;
-moz-transform: scale(0.9999);
}
.o_form_view .oe_button_box .btn.oe_stat_button.o_button_more[aria-expanded="true"]:after {
margin-left: 5px;
content: "";
display: inline-block;
width: 0;
height: 0;
vertical-align: middle;
border-bottom: 0.3em solid;
border-left: 0.3em solid transparent;
border-right: 0.3em solid transparent;
border-top: 0;
-moz-transform: scale(0.9999);
}
.o_form_view .oe_button_box > .o_dropdown_more {
position: absolute;
top: 100%;
left: auto;
bottom: auto;
right: 0;
min-width: 0;
border: none;
border: 1px solid #dee2e6;
margin: 0;
padding: 0;
}
@media (max-width: 767.98px) {
.o_form_view .oe_button_box > .o_dropdown_more {
position: relative !important;
transform: none !important;
will-change: inherit !important;
margin-bottom: 20px;
width: 100%;
border-width: 0px;
}
}
.o_form_view .oe_button_box > .o_dropdown_more > .btn.oe_stat_button {
width: 100%;
border: none;
border-bottom: 1px solid #dee2e6;
}
@media (max-width: 767.98px) {
.o_form_view .oe_button_box > .o_dropdown_more > .btn.oe_stat_button {
display: inline-block;
width: 33.33333333%;
}
}
@media all and (-ms-high-contrast: none) {
.o_form_view .oe_button_box .btn.oe_stat_button.dropdown-item {
height: 44px !important;
padding: 5px 0 5px 0 !important;
border-left: none !important;
}
.o_form_view .oe_button_box .btn.oe_stat_button.dropdown-item > .o_button_icon {
line-height: normal;
}
}
@supports (display: -ms-grid) {
.o_form_view .oe_button_box .btn.oe_stat_button.dropdown-item {
height: 44px !important;
padding: 5px 0 5px 0 !important;
border-left: none !important;
}
.o_form_view .oe_button_box .btn.oe_stat_button.dropdown-item > .o_button_icon {
line-height: normal;
}
}
.o_form_view .oe_title > h1, .o_form_view .oe_title > h2, .o_form_view .oe_title > h3 {
width: 100%;
margin-top: 0;
margin-bottom: 0;
line-height: inherit;
}
.o_form_view .oe_title > h1.d-flex > .o_input, .o_form_view .oe_title > h2.d-flex > .o_input, .o_form_view .oe_title > h3.d-flex > .o_input {
height: max-content;
}
.o_form_view .oe_title .o_priority > .o_priority_star {
font-size: inherit;
}
.o_form_view .oe_avatar {
float: right;
margin-bottom: 10px;
}
.o_form_view .oe_avatar > img {
max-width: 90px;
max-height: 90px;
vertical-align: top;
border: 1px solid #a8a8a8;
}
.o_form_view .o_group {
display: inline-block;
width: 100%;
margin: 10px 0;
}
.o_form_view .o_group .o_group_col_1 {
display: inline-block;
width: 8%;
vertical-align: top;
}
.o_form_view .o_group .o_group_col_2 {
display: inline-block;
width: 16%;
vertical-align: top;
}
.o_form_view .o_group .o_group_col_3 {
display: inline-block;
width: 25%;
vertical-align: top;
}
.o_form_view .o_group .o_group_col_4 {
display: inline-block;
width: 33%;
vertical-align: top;
}
.o_form_view .o_group .o_group_col_5 {
display: inline-block;
width: 41%;
vertical-align: top;
}
.o_form_view .o_group .o_group_col_6 {
display: inline-block;
width: 50%;
vertical-align: top;
}
.o_form_view .o_group .o_group_col_7 {
display: inline-block;
width: 58%;
vertical-align: top;
}
.o_form_view .o_group .o_group_col_8 {
display: inline-block;
width: 66%;
vertical-align: top;
}
.o_form_view .o_group .o_group_col_9 {
display: inline-block;
width: 75%;
vertical-align: top;
}
.o_form_view .o_group .o_group_col_10 {
display: inline-block;
width: 83%;
vertical-align: top;
}
.o_form_view .o_group .o_group_col_11 {
display: inline-block;
width: 91%;
vertical-align: top;
}
.o_form_view .o_group .o_group_col_12 {
display: inline-block;
width: 100%;
vertical-align: top;
}
.o_form_view .o_group.o_inner_group {
display: inline-table;
}
.o_form_view .o_group.o_inner_group > tbody > tr > td {
vertical-align: top;
}
.o_form_view .o_group.o_inner_group > tbody > tr > td.o_td_label {
width: 0%;
padding: 0 15px 0 0;
min-width: 150px;
}
.o_form_view .o_group.o_inner_group > tbody > tr > td span.o_field_widget, .o_form_view .o_group.o_inner_group > tbody > tr > td .o_field_boolean.o_field_widget, .o_form_view .o_group.o_inner_group > tbody > tr > td .oe_avatar.o_field_widget, .o_form_view .o_group.o_inner_group > tbody > tr > td .o_form_uri.o_field_widget {
width: auto;
}
.o_form_view .o_group .o_form_label {
font-weight: normal;
}
.o_form_view .o_group .o_field_widget {
width: 100%;
}
.o_form_view .o_group .o_field_widget > .btn {
-webkit-box-flex: 0;
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
padding: 0 10px;
}
.o_form_view .o_group :not(.o_row):not(.o_data_cell) > .o_field_widget > .o_input_dropdown, .o_form_view .o_group .o_row > .o_field_widget:last-child > .o_input_dropdown {
-webkit-box-flex: 1;
-webkit-flex: 1 0 auto;
flex: 1 0 auto;
}
.o_form_view .o_group.o_label_nowrap .o_form_label {
white-space: nowrap;
}
.o_form_view .o_group .o_td_label .o_form_label {
font-weight: bold;
margin-right: 0px;
}
.o_form_view .o_horizontal_separator {
font-size: 1.625rem;
margin: 5px 0;
}
.o_form_view .o_horizontal_separator:empty {
height: 10px;
}
.o_form_view .o_notebook {
clear: both;
margin-top: 10px;
}
.o_form_view .o_notebook .tab-content > .tab-pane {
padding: 16px 0;
}
.o_form_view .o_form_label {
margin: 0 5px 0 0;
font-size: 1.08333333rem;
line-height: 1.5;
font-weight: bold;
}
.o_form_view .o_field_widget {
margin-bottom: 5px;
}
.o_form_view .o_field_widget .o_field_widget, .o_form_view .btn .o_field_widget {
margin-bottom: 0px;
}
.o_form_view span.o_field_translate {
padding: 0 5px 0 0 !important;
vertical-align: top;
position: relative;
margin-left: -35px;
width: 35px !important;
display: inline-block;
text-align: right;
border: none;
}
.o_form_view input.o_field_translate, .o_form_view textarea.o_field_translate {
padding-right: 25px;
}
.o_form_view iframe.wysiwyg_iframe + .o_field_translate {
right: 30px !important;
top: 7px !important;
}
.o_form_view .o_field_text.oe_inline, .o_form_view .o_field_text.oe_left, .o_form_view .o_field_text.oe_right, .o_form_view .o_field_text.o_group.o_inner_group.oe_subtotal_footer {
width: 100% !important;
}
@media (min-width: 475px) {
.o_form_view .o_field_text.oe_inline, .o_form_view .o_field_text.oe_left, .o_form_view .o_field_text.oe_right, .o_form_view .o_field_text.o_group.o_inner_group.oe_subtotal_footer {
width: 45% !important;
}
}
.o_form_view .o_field_widget.o_field_one2many, .o_form_view .o_field_widget.o_field_many2many {
width: 100%;
}
.o_form_view .o_field_widget.o_field_one2many > div, .o_form_view .o_field_widget.o_field_many2many > div {
width: 100%;
}
.o_form_view .o_group.o_inner_group.oe_subtotal_footer > tbody > tr > td {
padding: 0;
}
.o_form_view .o_group.o_inner_group.oe_subtotal_footer > tbody > tr > td.o_td_label {
text-align: right;
}
.o_form_view .o_group.o_inner_group.oe_subtotal_footer > tbody > tr > td .o_form_label {
padding-right: 20px;
min-width: 0;
white-space: nowrap;
}
.o_form_view .o_group.o_inner_group.oe_subtotal_footer > tbody > tr > td .o_form_label:after {
content: ":";
}
.o_form_view .o_group.o_inner_group.oe_subtotal_footer > tbody > tr > td .o_field_widget {
text-align: right;
-webkit-box-pack: end;
justify-content: flex-end;
width: 100%;
}
.o_form_view .o_group.o_inner_group.oe_subtotal_footer > tbody > tr:first-child > td {
padding-top: 4px;
}
.o_form_view .o_group.o_inner_group.oe_subtotal_footer .oe_subtotal_footer_separator {
width: 100%;
text-align: right;
border-top: 1px solid #dee2e6;
font-weight: bold;
font-size: 1.3em;
}
.o_form_view .o_address_format {
width: 100%;
}
.o_form_view .o_address_format .o_address_street, .o_form_view .o_address_format .o_address_country {
display: -webkit-box;
display: -webkit-flex;
display: flex;
}
.o_form_view .o_address_format .o_address_city {
margin-right: 2%;
}
.o_form_view .o_address_format .o_address_state {
margin-right: 2%;
}
.o_form_view .o_address_format.o_zip_city .o_address_zip {
margin-right: 2%;
}
.o_form_view .o_address_format.o_zip_city .o_address_city {
margin-right: 0;
}
.o_form_view .o_address_format.o_zip_city .o_address_state {
display: block;
margin-right: 0;
}
.o_form_view .o_address_format.o_city_state .o_address_state {
margin-right: 0;
}
.o_form_view .o_address_format.o_city_state .o_address_zip {
display: block;
margin-right: 0;
}
.o_form_view .o_address_format > span.o_field_widget {
width: auto;
}
.o_form_view.o_form_editable .o_address_format .o_address_city {
width: 48%;
}
.o_form_view.o_form_editable .o_address_format div.o_address_state {
width: 48%;
}
.o_form_view.o_form_editable .o_address_format input.o_address_zip {
width: 25%;
}
.o_form_view.o_form_editable .o_address_format.o_zip_city .o_address_zip {
width: 38%;
}
.o_form_view.o_form_editable .o_address_format.o_zip_city .o_address_city {
width: 60%;
}
.o_form_view.o_form_editable .o_address_format.o_zip_city .o_address_state {
width: 100%;
}
.o_form_view.o_form_editable .o_address_format.o_city_state .o_address_city {
width: 50%;
}
.o_form_view.o_form_editable .o_address_format.o_city_state .o_address_state {
width: 48%;
}
.o_form_view.o_form_editable .o_address_format.o_city_state .o_address_zip {
width: 100%;
}
.o_form_view .o_field_boolean {
margin-right: 5px;
}
.o_form_view .o_tz_warning {
color: #dc3545;
cursor: help;
position: absolute;
margin-left: 10px;
margin-top: 5px;
}
.o_form_view .o_field_widget .o_kanban_view.o_kanban_ungrouped {
padding: 0;
}
.o_form_view .o_field_widget .o_kanban_view.o_kanban_ungrouped .o_kanban_record {
box-shadow: none;
}
.o_form_view .o_field_widget .o_list_view {
margin-bottom: 10px;
}
.o_form_view .o_field_widget .o_list_view > tfoot > tr > td {
padding: 3px;
color: #4c4c4c;
}
.o_form_view.o_form_readonly .o_field_widget .o_list_view .o_row_handle {
display: none;
}
.o_form_view .o_field_widget.o_readonly_modifier .o_list_view .o_row_handle {
display: none;
}
.o_form_view.oe_form_configuration .o_group .o_form_label {
white-space: nowrap;
}
.o_form_view.oe_form_configuration h2 {
margin-top: 32px !important;
}
.o_form_view.o_company_document_layout .report_layout_container {
display: inline-block;
}
.o_form_view.o_company_document_layout .report_layout_container div {
display: inline-block;
}
.o_form_view.o_company_document_layout .report_layout_container div img {
margin-left: 0 !important;
}
.o_form_view.o_company_document_layout img[name="logo"] {
max-height: 100px;
max-width: 300px;
}
.modal .modal-dialog .o_form_view .o_statusbar_buttons > .btn {
margin-top: 2px;
margin-bottom: 2px;
}
.modal .modal-dialog .o_form_view .o_form_sheet_bg {
padding: 0;
}
.modal .modal-dialog .o_form_view .o_form_sheet_bg > .o_form_statusbar, .modal .modal-dialog .o_form_view .o_form_sheet_bg > .alert {
margin-left: 0;
margin-right: 0;
}
.modal .modal-dialog .o_form_view .o_form_sheet_bg > .o_form_sheet {
box-shadow: none;
width: 100%;
margin: 0 auto;
max-width: none;
border: none;
}
.modal .modal-dialog:not(.modal-lg) .o_form_view .o_group {
width: 100%;
}
.modal .modal-dialog .o_onboarding_payment_acquirer_wizard a[type="action"] {
color: #7C7BAD;
cursor: pointer;
}
@media print {
.oe_button_box, .o_form_statusbar {
display: none !important;
}
}
.o_control_panel .o_form_buttons_view > button:first-child {
float: left;
margin-right: 4px;
}
.o_form_view.o_xxs_form_view .oe_title {
word-break: break-all;
}
.o_form_view.o_xxs_form_view .o_group.o_inner_group {
display: block;
margin-bottom: 20px;
}
.o_form_view.o_xxs_form_view .o_group.o_inner_group > tbody {
display: block;
}
.o_form_view.o_xxs_form_view .o_group.o_inner_group > tbody > tr {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
}
.o_form_view.o_xxs_form_view .o_group.o_inner_group > tbody > tr > td {
-webkit-box-flex: 1;
-webkit-flex: 1 0 auto;
flex: 1 0 auto;
display: block;
max-width: 100%;
padding: 0;
width: auto !important;
}
.o_form_view.o_xxs_form_view .o_group.o_inner_group > tbody > tr > td.o_td_label {
width: 94% !important;
line-height: 0.8;
}
.o_form_view.o_xxs_form_view .o_group.o_inner_group > tbody > tr > td .o_field_widget {
margin-bottom: 10px;
}
.o_form_view.o_xxs_form_view .o_group.o_inner_group > tbody > tr > td .o_field_widget > .o_field_widget {
margin-bottom: 0;
}
.o_form_view.o_xxs_form_view .o_group.o_inner_group > tbody > tr > td .o_field_widget.o_field_boolean {
margin-right: 0;
}
.o_form_view.o_xxs_form_view .o_group.o_inner_group > tbody > tr > td .o_input_dropdown {
width: auto;
max-width: 100%;
}
.o_settings_container {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-flex: 0;
-webkit-flex: 0 1 auto;
flex: 0 1 auto;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
}
.o_settings_container .o_form_label.o_light_label, .o_settings_container .o_light_label .o_form_label {
font-weight: normal;
}
.o_settings_container .o_setting_box:visible:nth-child(odd) {
clear: left;
}
.o_settings_container .text-muted {
color: #aaaaaa;
}
.o_settings_container .o_setting_box {
margin-bottom: 8px;
margin-top: 8px;
}
.o_settings_container .o_setting_box .o_setting_left_pane {
width: 24px;
float: left;
}
.o_settings_container .o_setting_box .o_setting_left_pane .o_enterprise_label {
position: absolute;
top: 0px;
right: 40px;
}
.o_settings_container .o_setting_box .o_setting_right_pane {
margin-left: 30px;
border-left: 1px solid #bbbbbb;
padding-left: 10px;
}
.o_settings_container .o_setting_box .o_setting_right_pane .o_input_dropdown > .o_input {
width: 100%;
}
.o_settings_container .o_setting_box .o_setting_right_pane .o_field_widget {
width: 50%;
-webkit-box-flex: 0;
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
}
.o_settings_container .o_setting_box .o_setting_right_pane .o_field_widget.o_field_many2manytags > .o_field_widget {
flex: 1 0 50px;
}
.o_settings_container .o_setting_box .o_setting_right_pane button.btn-link:first-child {
padding: 0;
}
.o_settings_container .o_setting_box .o_setting_right_pane a.oe-link {
font-size: 12px;
}
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_company_form_pdl_kab" model="ir.ui.view">
<field name="name">res.company.form.inherit.pdl.kab</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="account.view_company_form"/>
<field name="priority">4</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='city']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='city']" position="after">
<field name="village_id" class="o_address_state" placeholder="Desa/Kel"
options='{"no_open": True}'/>
<field name="sub_district_id" class="o_address_state" placeholder="Kecamatan"
options='{"no_open": True}'/>
<field name="district_id" class="o_address_state" placeholder="Kab/Kota"
options='{"no_open": True}'/>
</xpath>
</field>
</record>
<record id="action_company_config_pdl_kab" model="ir.actions.act_window">
<field name="name">Lembaga/Organisasi</field>
<field name="res_model">res.company</field>
<field name="view_mode">kanban,tree,form</field>
<field name="view_id" ref="base.view_company_tree"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Lembaga/Organisasi
</p>
</field>
</record>
</data>
</odoo>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="action_partner_config_pdl_kab" model="ir.actions.act_window">
<field name="name">Partner</field>
<field name="res_model">res.partner</field>
<field name="view_mode">kanban,tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Partner
</p>
</field>
</record>
<record id="partner_form_pdl_kab" model="ir.ui.view">
<field name="name">partner.form.pdl.kab.inherit</field>
<field name="model">res.partner</field>
<field name="priority">4</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='city']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='state_id']" position="before">
<field name="village_id" class="o_address_state" placeholder="Desa/Kel"
options='{"no_open": True}'
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="sub_district_id" class="o_address_state" placeholder="Kecamatan"
options='{"no_open": True}'
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="district_id" class="o_address_state" placeholder="Kab/Kota"
options='{"no_open": True}'
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
</xpath>
</field>
</record>
</data>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="op_hotel_template_tree" model="ir.ui.view">
<field name="name">op.hotel.template.tree</field>
<field name="model">product.template</field>
<field name="arch" type="xml">
<tree string="Objek Pajak Hotel" sample="1">
<field name="default_code" string="NOPD"/>
<field name="name" string="Nama Objek"/>
<field name="lst_price" string="Min Omset"/>
<field name="taxes_id" widget="many2many_tags" string="Pajak"/>
<field name="activity_exception_decoration" widget="activity_exception"/>
</tree>
</field>
</record>
<record id="action_pendataan_hotel_pdl_kab" model="ir.actions.act_window">
<field name="name">Objek Pajak Hotel</field>
<field name="res_model">product.template</field>
<field name="view_mode">kanban,tree,form</field>
<field name="view_id" ref="op_hotel_template_tree"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Pendataan Objek Pajak Hotel
</p>
</field>
</record>
<record id="op_hotel_template_form" model="ir.ui.view">
<field name="name">op.hotel.template.form.inherit</field>
<field name="model">product.template</field>
<field name="priority">4</field>
<field name="inherit_id" ref="account.product_template_form_view"/>
<field name="arch" type="xml">
<!-- <xpath expr="//page[@name='general_information']" position="replace"/>-->
<xpath expr="//page[@name='inventory']" position="replace"/>
<xpath expr="//page[@name='sales']" position="replace"/>
<xpath expr="//page[@name='purchase']" position="replace"/>
<!-- <xpath expr="//div[@name='options']" position="after">-->
<!-- Menambah field setelah pricing -->
<!-- <field name="active" invisible=""/>-->
<!-- <field name="categ_id" invisible="0"/>-->
<!-- </xpath>-->
<!-- <xpath expr="//div[@name='default_code']" position="attribute">-->
<!-- <field name="string" string="NOPD"/>-->
<!-- </xpath>-->
</field>
</record>
</data>
</odoo>
\ No newline at end of file
......@@ -49,32 +49,47 @@
parent="config_pdl_kab_menu"
action="action_tax_config_pdl_kab"
sequence="2"/>
<menuitem id="wilayah_config_pdl_kab_menu"
name="Wilayah"
parent="config_pdl_kab_menu"
sequence="2"/>
<menuitem id="state_config_pdl_kab_menu"
name="Provinsi"
parent="config_pdl_kab_menu"
parent="wilayah_config_pdl_kab_menu"
action="action_state_config_pdl_kab"
sequence="2"/>
<menuitem id="district_config_pdl_kab_menu"
name="Kabupaten/Kota"
parent="config_pdl_kab_menu"
parent="wilayah_config_pdl_kab_menu"
action="action_district_config_pdl_kab"
sequence="2"/>
<menuitem id="sub_district_config_pdl_kab_menu"
name="Kecamatan"
parent="config_pdl_kab_menu"
action="action_sub_district_config_pdl_kab"
sequence="2"/>
<menuitem id="village_config_pdl_kab_menu"
name="Desa/Kelurahan"
parent="config_pdl_kab_menu"
action="action_village_config_pdl_kab"
sequence="2"/>
<menuitem id="sub_district_config_pdl_kab_menu"
name="Kecamatan"
parent="wilayah_config_pdl_kab_menu"
action="action_sub_district_config_pdl_kab"
sequence="2"/>
<menuitem id="village_config_pdl_kab_menu"
name="Desa/Kelurahan"
parent="wilayah_config_pdl_kab_menu"
action="action_village_config_pdl_kab"
sequence="2"/>
<menuitem id="sudut_pandang_config_pdl_kab_menu"
name="Sudut Pandang"
parent="config_pdl_kab_menu"
action="action_pdl_sudut_pandang"
sequence="4"/>
<menuitem id="company_config_pdl_kab_menu"
name="Company"
parent="config_pdl_kab_menu"
action="action_company_config_pdl_kab"
sequence="4"/>
<menuitem id="partner_config_pdl_kab_menu"
name="Partner"
parent="config_pdl_kab_menu"
action="action_partner_config_pdl_kab"
sequence="4"/>
</odoo>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!