Skip to content

Commit

Permalink
Merge PR #274 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by alexis-via
  • Loading branch information
OCA-git-bot committed Nov 7, 2023
2 parents c47ae67 + c1adfd3 commit 00df766
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions account_cutoff_base/models/account_cutoff_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class AccountCutoffLine(models.Model):
_description = "Account Cut-off Line"

parent_id = fields.Many2one("account.cutoff", string="Cut-off", ondelete="cascade")
cutoff_type = fields.Selection(related="parent_id.cutoff_type")
company_id = fields.Many2one(
"res.company", related="parent_id.company_id", store=True
)
Expand Down
5 changes: 3 additions & 2 deletions account_cutoff_base/views/account_cutoff_line.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
invisible="not context.get('account_cutoff_line_main_view', False)"
/>
<field name="partner_id" />
<field name="cutoff_type" invisible="1" />
<field name="company_id" invisible="1" />
<field name="name" widget="text" />
<field name="quantity" />
Expand All @@ -43,9 +44,9 @@
<group
name="tax"
string="Cut-off Taxes Lines"
invisible="'accrued' not in context.get('cutoff_type', '-')"
attrs="{'invisible': [('cutoff_type', 'not in', ('accrued_expense', 'accrued_revenue'))]}"
>
<field name="tax_line_ids" nolabel="1" colspan="2" />
<field name="tax_line_ids" nolabel="1" colspan="2" />
</group>
<group name="notes" string="Notes">
<field name="notes" nolabel="1" colspan="2" />
Expand Down

0 comments on commit 00df766

Please sign in to comment.