Skip to content

Commit

Permalink
[8.0.2.0.0] l10n_id_taxform_bukti_potong_pph_common
Browse files Browse the repository at this point in the history
  • Loading branch information
andhit-r committed Jun 18, 2017
1 parent 7a35c69 commit 1579539
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
4 changes: 2 additions & 2 deletions l10n_id_taxform_bukti_potong_pph_common/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Indonesia - Common Feature for Bukti Potong",
"version": "8.0.1.1.0",
"version": "8.0.2.0.0",
"category": "localization",
"website": "https://opensynergy-indonesia.com/",
"author": "OpenSynergy Indonesia",
Expand All @@ -12,7 +12,7 @@
"installable": True,
"depends": [
"mail",
"l10n_id_taxform",
"l10n_id_taxform_period",
],
"data": [
"security/ir.model.access.csv",
Expand Down
19 changes: 19 additions & 0 deletions l10n_id_taxform_bukti_potong_pph_common/models/bukti_potong_pph.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,25 @@ def _compute_policy(self):
],
}
)

@api.multi
@api.depends(
"date",
)
def _compute_tax_period(self):
obj_tax_period = self.env["l10n_id.tax_period"]
for bukpot in self:
try:
bukpot.tax_period_id = obj_tax_period._find_period(bukpot.date)
except:
bukpot.tax_period_id = False

tax_period_id = fields.Many2one(
string="Tax Period",
comodel_name="l10n_id.tax_period",
compute="_compute_tax_period",
store=True,
)
period_id = fields.Many2one(
string="Period",
comodel_name="account.period",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<field name="company_id"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="tax_period_id"/>
<field name="wajib_pajak_id"/>
<field name="pemotong_pajak_id"/>
<field name="ttd_id"/>
Expand All @@ -35,6 +36,7 @@
<field name="company_id"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="tax_period_id"/>
<field name="wajib_pajak_id"/>
<field name="pemotong_pajak_id"/>
<field name="ttd_id"/>
Expand All @@ -48,6 +50,7 @@
<group name="group_main" string="Group By..">
<filter name="filter_grp_journal" string="Journal" context="{'group_by':'journal_id'}"/>
<filter name="filter_grp_period" string="Period" context="{'group_by':'period_id'}"/>
<filter name="filter_grp_tax_period" string="Tax Period" context="{'group_by':'tax_period_id'}"/>
<filter name="filter_grp_wp" string="Wajib Pajak" context="{'group_by':'wajib_pajak_id'}"/>
<filter name="filter_grp_pp" string="Pemotong Pajak" context="{'group_by':'pemotong_pajak_id'}"/>
<filter name="filter_grp_ttd" string="TTD" context="{'group_by':'ttd_id'}"/>
Expand Down Expand Up @@ -81,6 +84,7 @@
<field name="name"/>
<field name="date"/>
<field name="period_id"/>
<field name="tax_period_id"/>
<field name="company_id"/>
<field name="journal_id" domain="[('id', 'in', allowed_journal_ids[0][2])]"/>
<field name="account_id" domain="[('id', 'in', allowed_account_ids[0][2])]"/>
Expand Down

0 comments on commit 1579539

Please sign in to comment.