Skip to content

Commit

Permalink
[MIG] l10n_it_ricevute_bancarie: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyMasciI committed Mar 17, 2023
1 parent 373a080 commit 30690cd
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 32 deletions.
1 change: 1 addition & 0 deletions l10n_it_ricevute_bancarie/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"license": "AGPL-3",
"depends": [
"account",
"account_due_list",
"l10n_it_fatturapa_out",
"l10n_it_fiscalcode",
"base_iban",
Expand Down
6 changes: 3 additions & 3 deletions l10n_it_ricevute_bancarie/models/riba_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ class RibaConfiguration(models.Model):
"account.account",
"C/O Account",
help="Account used when C/O amount is credited by the bank.",
domain=[("internal_type", "!=", "liquidity")],
domain=[("account_type", "!=", "liability_credit_card")],
)
bank_account_id = fields.Many2one(
"account.account",
"A/C Bank Account",
domain=[("internal_type", "=", "liquidity")],
domain=[("account_type", "=", "asset_cash")],
)
bank_expense_account_id = fields.Many2one("account.account", "Bank Fees Account")
unsolved_journal_id = fields.Many2one(
Expand All @@ -70,7 +70,7 @@ class RibaConfiguration(models.Model):
overdue_effects_account_id = fields.Many2one(
"account.account",
"Past Due Bills Account",
domain=[("internal_type", "=", "receivable")],
domain=[("account_type", "=", "asset_receivable")],
)
protest_charge_account_id = fields.Many2one(
"account.account", "Protest Fee Account"
Expand Down
51 changes: 26 additions & 25 deletions l10n_it_ricevute_bancarie/views/account_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,56 +70,57 @@
<!-- Riba da emettere Filtro -->

<record id="riba_filter" model="ir.ui.view">
<field name="name">C/O filter</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<search string="Search Journal Items">
<filter
<field name="name">C/O filter</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account_due_list.view_payments_filter" />
<field name="arch" type="xml">
<xpath expr="//search" position="inside">
<filter
name="da_emettere"
string="To Issue"
string="RIBA To Issue"
domain="[('distinta_line_ids', '=', False)]"
/>
<filter
<filter
name="emesse"
string="Issued"
string="RIBA Issued"
domain="[('distinta_line_ids', '!=', False)]"
/>
<filter
<filter
name="reconciled"
string="Reconciled"
domain="[('reconciled', '!=', False)]"
/>
<filter
<filter
name="to_reconcile"
string="To Reconcile"
domain="[('reconciled', '=', False)]"
/>
<filter
<filter
name="unsolved"
string="Past Due"
domain="[('unsolved_invoice_ids', '!=', False)]"
/>
<filter
<filter
name="sale_journal"
string="Sale Journals"
domain="[('journal_id.type', '=', 'sale')]"
/>
<field name="account_id" />
<field name="partner_id" />
<field name="move_id" />
<!-- TODO: field name="invoice_origin"/-->
<field name="date_maturity" />
<group expand="0" string="Group By...">
<filter
<field name="account_id" />
<field name="partner_id" />
<field name="move_id" />
<!-- TODO: field name="invoice_origin"/-->
<field name="date_maturity" />
<group expand="0" string="Group By...">
<filter
name="filter_customer"
string="Group By Customer"
context="{'group_by':'partner_id'}"
/>
<!-- <filter name="filter_invoice" string="Group By Invoice" context="{'group_by':'stored_invoice_id'}"/> Matteo Boscolo-->
</group>
</search>
</field>
</record>
<!-- <filter name="filter_invoice" string="Group By Invoice" context="{'group_by':'stored_invoice_id'}"/> Matteo Boscolo-->
</group>
</xpath>
</field>
</record>

<!-- Riba da emettere Action -->

Expand All @@ -131,7 +132,7 @@
<field name="search_view_id" ref="riba_filter" />
<field
name="domain"
>['&amp;','|',('riba','=','True'),('unsolved_invoice_ids','!=',False),('account_id.internal_type','=','receivable')]</field>
>['&amp;','|',('riba','=','True'),('unsolved_invoice_ids','!=',False),('account_id.account_type','=','asset_receivable')]</field>
<field
name="context"
>{'search_default_da_emettere':1, 'search_default_to_reconcile':1}</field>
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_ricevute_bancarie/wizard/wizard_accreditation.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _get_accreditation_amount(self):
bank_account_id = fields.Many2one(
"account.account",
"A/C Bank Account",
domain=[("internal_type", "=", "liquidity")],
domain=[("account_type", "=", "asset_cash")],
default=_get_bank_account_id,
)
bank_amount = fields.Float("Paid Amount")
Expand Down
6 changes: 3 additions & 3 deletions l10n_it_ricevute_bancarie/wizard/wizard_unsolved.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _get_bank_expense_account_id(self):
effects_account_id = fields.Many2one(
"account.account",
"Bills Account",
domain=[("internal_type", "=", "receivable")],
domain=[("account_type", "=", "asset_receivable")],
default=_get_effects_account_id,
)
effects_amount = fields.Float("Bills Amount", default=_get_effects_amount)
Expand All @@ -77,7 +77,7 @@ def _get_bank_expense_account_id(self):
overdue_effects_account_id = fields.Many2one(
"account.account",
"Past Due Bills Account",
domain=[("internal_type", "=", "receivable")],
domain=[("account_type", "=", "asset_receivable")],
default=_get_overdue_effects_account_id,
)
overdue_effects_amount = fields.Float(
Expand All @@ -86,7 +86,7 @@ def _get_bank_expense_account_id(self):
bank_account_id = fields.Many2one(
"account.account",
"A/C Bank Account",
domain=[("internal_type", "=", "liquidity")],
domain=[("account_type", "=", "asset_cash")],
default=_get_bank_account_id,
)
bank_amount = fields.Float("Withdrawn Amount")
Expand Down

0 comments on commit 30690cd

Please sign in to comment.