Skip to content

Commit

Permalink
Merge 540cef5 into 919881a
Browse files Browse the repository at this point in the history
  • Loading branch information
andhit-r committed Jul 2, 2017
2 parents 919881a + 540cef5 commit 93eb8aa
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion l10n_id_taxform_faktur_pajak_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 - Faktur Pajak Common Feature",
"version": "8.0.1.0.1",
"version": "8.0.2.0.0",
"license": "AGPL-3",
"author": "OpenSynergy Indonesia",
"website": "https://opensynergy-indonesia.com",
Expand Down
13 changes: 10 additions & 3 deletions l10n_id_taxform_faktur_pajak_common/models/faktur_pajak_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,14 @@ def _compute_allow_reverse(self):
for fp in self:
fp.allow_reverse = fp.type_id.allow_reverse

@api.depends(
"type_id",
)
@api.multi
def _compute_allow_multiple_reference(self):
for fp in self:
fp.allow_multiple_reference = fp.type_id.allow_multiple_reference

@api.depends(
"type_id",
)
Expand Down Expand Up @@ -415,9 +423,8 @@ def _default_buyer_partner(self):
)
allow_multiple_reference = fields.Boolean(
string="Allow Multiple Doc. References",
readonly=True,
states={
"draft": [("readonly", False)]},
compute="_compute_allow_multiple_reference",
store=False,
)
reference_id = fields.Many2one(
string="Doc. Reference",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,6 @@ class FakturPajakType(models.Model):
allow_creditable = fields.Boolean(
string="Allow to Creditable",
)
allow_multiple_reference = fields.Boolean(
string="Allow Multiple Doc. References",
)
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
domain="[('id','child_of',buyer_partner_id),('is_company','=',True)]"/>
</group>
<group name="group_main_3" string="Doc. Reference(s)" colspan="1" col="2">
<field name="allow_multiple_reference"/>
<field name="reference_id"
attrs="{'invisible':[('allow_multiple_reference','=',True)]}"/>
<field name="reference_ids"
Expand Down Expand Up @@ -159,6 +158,7 @@
<field name="enofa_jenis_transaksi"/>
<field name="enofa_fg_pengganti"/>
<field name="enofa_nomor_dokumen"/>
<field name="enofa_tanggal_dokumen"/>
<field name="enofa_masa_pajak"/>
<field name="enofa_tahun_pajak"/>
<field name="enofa_npwp"/>
Expand All @@ -176,6 +176,7 @@
<field name="fp_direction"/>
<field name="allowed_transaction_type_ids" widget="many2many_tags"/>
<field name="allowed_additional_flag_ids" widget="many2many_tags"/>
<field name="allow_multiple_reference"/>
<field name="allow_reverse"/>
<field name="allow_substitute"/>
<field name="allow_creditable"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<field name="name"/>
<field name="active"/>
<field name="description"/>
<field name="allow_multiple_reference"/>
<field name="allow_reverse"/>
<field name="allow_substitute"/>
<field name="allowed_transaction_type_ids"/>
Expand Down

0 comments on commit 93eb8aa

Please sign in to comment.