Skip to content

Commit

Permalink
[MIG] account_interests: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ica-adhoc committed May 22, 2023
1 parent 374458c commit b49777e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions account_interests/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Interests Management',
'version': "15.0.1.0.0",
'version': "16.0.1.0.0",
'category': 'Accounting',
'sequence': 14,
'summary': 'Calculate interests for selected partners',
Expand All @@ -34,6 +34,6 @@
'data/ir_cron_data.xml',
'security/ir.model.access.csv',
],
'installable': False,
'installable': True,
'application': False,
}
6 changes: 3 additions & 3 deletions account_interests/models/res_company_interest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ class ResCompanyInterest(models.Model):
string='Cuentas a Cobrar',
help='Cuentas a Cobrar que se tendrán en cuenta para evaular la deuda',
required=True,
domain=lambda self: [('user_type_id.type', '=', 'receivable'),
domain=lambda self: [('account_type', '=', 'asset_receivable'),
('company_id', '=', self._context.get('default_company_id') or self.env.company.id)],
)
interest_product_id = fields.Many2one(
'product.product',
'Interest Product',
required=True,
)
analytic_account_id = fields.Many2one(
analytic_line_ids = fields.Many2one(
'account.analytic.account',
'Analytic account',
)
Expand Down Expand Up @@ -228,7 +228,7 @@ def _prepare_interest_invoice(self, partner, debt, to_date, journal):
"price_unit": self.rate * debt,
"partner_id": partner.id,
"name": self.interest_product_id.name + '.\n' + comment,
"analytic_account_id": self.analytic_account_id.id,
"analytic_line_ids": self.analytic_line_ids.id,
"tax_ids": [(6, 0, tax_id.ids)]
})],
}
Expand Down
4 changes: 2 additions & 2 deletions account_interests/views/res_company_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<field name="company_id" invisible="1" required="0"/>
<field name="receivable_account_ids" widget="many2many_tags"/>
<field name="interest_product_id"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<field name="analytic_line_ids" groups="analytic.group_analytic_accounting"/>
<field name="rate"/>
<field name="automatic_validation"/>
<field name="interval"/>
Expand All @@ -29,7 +29,7 @@
<field name="company_id" invisible="1" required="0"/>
<field name="receivable_account_ids" widget="many2many_tags"/>
<field name="interest_product_id"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<field name="analytic_line_ids" groups="analytic.group_analytic_accounting"/>
</group>
<group>
<field name="rate"/>
Expand Down

0 comments on commit b49777e

Please sign in to comment.