diff --git a/account_spread_contract/README.rst b/account_spread_contract/README.rst new file mode 100644 index 000000000..cd5e1508c --- /dev/null +++ b/account_spread_contract/README.rst @@ -0,0 +1,117 @@ +============================ +Cost-Revenue Spread Contract +============================ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github + :target: https://github.com/OCA/account-financial-tools/tree/11.0/account_spread_contract + :alt: OCA/account-financial-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-financial-tools-11-0/account-financial-tools-11-0-account_spread_contract + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/92/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to spread costs or revenues over a period defined in a contract. + +When creating recurring invoices, the cost/revenue spread functionality is enabled on the invoice lines. +The costs/revenues spread functionality is provided by module *account_spread_cost_revenue*. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +Under Invoicing -> Configuration -> Accounting -> Spread Templates, create a new spread template. + +* *Spread Type* +* *Spread Balance Sheet Account* +* *Journal* + +Usage +===== + +Create a contract that will generate recurring invoices. +On its lines, the spreading right-arrow icon are displayed in dark-grey color. + +Click on the spreading right-arrow icon. A wizard prompts to enter a *Spread Template*. + +Click on Confirm button: the selected Spread Template will be automatically displayed. + +Go back to the contract. The spreading functionality is now enabled on the contract line: +the spreading right-arrow icon is now displayed in green color. + +When generating an invoice from the contract, the spread table will be automatically created +and linked to the respective invoice line. + +Changelog +========= + +11.0.1.0.0 +~~~~~~~~~~ + +* [ADD] Module account_spread_contract. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Onestein + +Contributors +~~~~~~~~~~~~ + +* Andrea Stirpe + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-astirpe| image:: https://github.com/astirpe.png?size=40px + :target: https://github.com/astirpe + :alt: astirpe + +Current `maintainer `__: + +|maintainer-astirpe| + +This module is part of the `OCA/account-financial-tools `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_spread_contract/__init__.py b/account_spread_contract/__init__.py new file mode 100644 index 000000000..adc6207fd --- /dev/null +++ b/account_spread_contract/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models +from . import wizards diff --git a/account_spread_contract/__manifest__.py b/account_spread_contract/__manifest__.py new file mode 100644 index 000000000..b7e4b0ef1 --- /dev/null +++ b/account_spread_contract/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright 2018-2019 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Cost-Revenue Spread Contract", + "summary": "Spread costs and revenues from contracts", + "version": "11.0.1.0.0", + "development_status": "Beta", + "author": "Onestein,Odoo Community Association (OCA)", + "maintainers": ["astirpe"], + "license": "AGPL-3", + "website": "https://github.com/OCA/account-financial-tools/", + "category": "Accounting & Finance", + "depends": [ + "account_spread_cost_revenue", + "contract", + ], + "data": [ + "views/account_analytic_account.xml", + "views/account_spread_template.xml", + "wizards/account_spread_contract_line_link_wizard.xml", + ], + "installable": True, +} diff --git a/account_spread_contract/models/__init__.py b/account_spread_contract/models/__init__.py new file mode 100644 index 000000000..579ff0d71 --- /dev/null +++ b/account_spread_contract/models/__init__.py @@ -0,0 +1,5 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import account_analytic_account +from . import account_analytic_invoice_line +from . import account_spread_template diff --git a/account_spread_contract/models/account_analytic_account.py b/account_spread_contract/models/account_analytic_account.py new file mode 100644 index 000000000..0e1274726 --- /dev/null +++ b/account_spread_contract/models/account_analytic_account.py @@ -0,0 +1,110 @@ +# Copyright 2018-2019 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, api, models +from odoo.exceptions import UserError + + +class AccountAnalyticAccount(models.Model): + _inherit = 'account.analytic.account' + + @api.multi + def _create_invoice(self, invoice=False): + """ + :param invoice: If not False add lines to this invoice + :return: invoice created or updated + """ + self.ensure_one() + + line_template_map = {} + for line in self.recurring_invoice_line_ids: + if invoice and invoice.state == 'draft': + pass + else: + self._create_spread_by_template_map(line, line_template_map) + ctx = dict( + self.env.context, + contract_spread_template_map=line_template_map, + ) + res = super( + AccountAnalyticAccount, + self.with_context(ctx) + )._create_invoice(invoice) + for line in self.recurring_invoice_line_ids: + if line.id in line_template_map: + spread_id = line_template_map[line.id] + spread = self.env['account.spread'].browse(spread_id) + spread.compute_spread_board() + return res + + def _create_spread_by_template_map(self, line, line_template_map): + self.ensure_one() + if line.spread_template_id: + new_spread_vals = self._prepare_spread_vals(line) + new_spread = self.env['account.spread'].create(new_spread_vals) + line_template_map[line.id] = new_spread.id + + def _prepare_spread_vals(self, line): + self.ensure_one() + template = line.spread_template_id + new_spread_vals = template._prepare_spread_from_template() + invoice_type = 'out_invoice' + if self.contract_type == 'purchase': + invoice_type = 'in_invoice' + + fpos_id = self._prepare_invoice().get('fiscal_position_id') + fiscal_position = self.env['account.fiscal.position'].browse(fpos_id) + account = self.env['account.invoice.line'].get_invoice_line_account( + invoice_type, + line.product_id, + fiscal_position, + self.company_id + ) + if not account: + raise UserError(_("Unable to get the Invoice Line Account.")) + + if self.contract_type == 'purchase': + new_spread_vals['debit_account_id'] = account.id + else: + new_spread_vals['credit_account_id'] = account.id + + lang = self.env['res.lang'].search( + [('code', '=', self.partner_id.lang)]) + date_format = lang.date_format or '%m/%d/%Y' + invoice_line_name = self._insert_markers(line, date_format) + spread_name = _('Contract %s (%s) %s') % ( + self.name, + self.recurring_next_date, + invoice_line_name + ) + analytic_tags = [(4, tag.id, None) for tag in self.tag_ids] + + new_spread_vals.update({ + 'name': spread_name, + 'period_number': self.recurring_interval, + 'period_type': self._get_spread_period_type(), + 'spread_date': self.recurring_next_date, + 'account_analytic_id': self.id, + 'analytic_tag_ids': analytic_tags, + }) + return new_spread_vals + + def _get_spread_period_type(self): + self.ensure_one() + recurring_rule_type = self.recurring_rule_type + if recurring_rule_type not in ['monthly', 'monthlylastday', 'yearly']: + raise UserError( + _("Not implemented.")) + + if recurring_rule_type == 'yearly': + return 'year' + return 'month' + + @api.model + def _prepare_invoice_line(self, line, invoice_id): + template_map = self.env.context.get('contract_spread_template_map') + res = super()._prepare_invoice_line(line, invoice_id) + if line.id in template_map: + spread_id = template_map[line.id] + res['spread_id'] = spread_id + return res diff --git a/account_spread_contract/models/account_analytic_invoice_line.py b/account_spread_contract/models/account_analytic_invoice_line.py new file mode 100644 index 000000000..4362ca9ae --- /dev/null +++ b/account_spread_contract/models/account_analytic_invoice_line.py @@ -0,0 +1,64 @@ +# Copyright 2018-2019 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, api, fields, models + + +class AccountAnalyticInvoiceLine(models.Model): + _inherit = 'account.analytic.invoice.line' + + spread_template_id = fields.Many2one( + 'account.spread.template', + string='Spread Template', + copy=False) + spread_check = fields.Selection([ + ('linked', 'Linked'), + ('unlinked', 'Unlinked'), + ('unavailable', 'Unavailable') + ], compute='_compute_spread_check') + + @api.depends('spread_template_id') + def _compute_spread_check(self): + for line in self: + if line.spread_template_id: + line.spread_check = 'linked' + elif not line.analytic_account_id.create_invoice_visibility: + line.spread_check = 'unavailable' + else: + line.spread_check = 'unlinked' + + @api.multi + def spread_details(self): + """Button on the contract lines tree view of the contract + form to show the spread template form view.""" + if not self: + # In case the widget clicked before the creation of the line + return + + if self.spread_template_id: + return { + 'name': _('Spread Template Details'), + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'account.spread.template', + 'type': 'ir.actions.act_window', + 'target': 'current', + 'readonly': False, + 'res_id': self.spread_template_id.id, + 'context': {'force_contract_line_id': self.id}, + } + + ctx = dict( + self.env.context, + default_contract_line_id=self.id, + default_company_id=self.analytic_account_id.company_id.id, + ) + return { + 'name': _('Link Contract Line with Spread Template'), + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'account.spread.contract.line.link.wizard', + 'type': 'ir.actions.act_window', + 'target': 'new', + 'context': ctx, + } diff --git a/account_spread_contract/models/account_spread_template.py b/account_spread_contract/models/account_spread_template.py new file mode 100644 index 000000000..360e7bc3d --- /dev/null +++ b/account_spread_contract/models/account_spread_template.py @@ -0,0 +1,38 @@ +# Copyright 2018-2019 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + + +class AccountSpreadTemplate(models.Model): + _inherit = 'account.spread.template' + + contract_line_ids = fields.One2many( + 'account.analytic.invoice.line', + 'spread_template_id', + string='Contract Lines', + ) + + @api.constrains('contract_line_ids', 'spread_type') + def _check_spread_template_contract_type(self): + for template in self: + for line in template.contract_line_ids: + contract = line.analytic_account_id.contract_template_id + contract_type = contract.contract_type + if contract_type == 'sale' or not contract_type: + if template.spread_type != 'sale': + raise ValidationError(_( + 'The contract type (Sales) is not compatible ' + 'with selected Template Spread Type')) + elif contract_type == 'purchase': + if template.spread_type != 'purchase': + raise ValidationError(_( + 'The contract type (Purchases) is not compatible ' + 'with selected Template Spread Type')) + + @api.multi + def action_unlink_contract_line(self): + line_id = self.env.context.get('force_contract_line_id') + line = self.env['account.analytic.invoice.line'].browse(line_id) + line.spread_template_id = False diff --git a/account_spread_contract/readme/CONFIGURE.rst b/account_spread_contract/readme/CONFIGURE.rst new file mode 100644 index 000000000..d70ca6b7a --- /dev/null +++ b/account_spread_contract/readme/CONFIGURE.rst @@ -0,0 +1,5 @@ +Under Invoicing -> Configuration -> Accounting -> Spread Templates, create a new spread template. + +* *Spread Type* +* *Spread Balance Sheet Account* +* *Journal* diff --git a/account_spread_contract/readme/CONTRIBUTORS.rst b/account_spread_contract/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..4518218c8 --- /dev/null +++ b/account_spread_contract/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Andrea Stirpe diff --git a/account_spread_contract/readme/DESCRIPTION.rst b/account_spread_contract/readme/DESCRIPTION.rst new file mode 100644 index 000000000..10fba15ab --- /dev/null +++ b/account_spread_contract/readme/DESCRIPTION.rst @@ -0,0 +1,4 @@ +This module allows to spread costs or revenues over a period defined in a contract. + +When creating recurring invoices, the cost/revenue spread functionality is enabled on the invoice lines. +The costs/revenues spread functionality is provided by module *account_spread_cost_revenue*. diff --git a/account_spread_contract/readme/HISTORY.rst b/account_spread_contract/readme/HISTORY.rst new file mode 100644 index 000000000..9aba652f1 --- /dev/null +++ b/account_spread_contract/readme/HISTORY.rst @@ -0,0 +1,4 @@ +11.0.1.0.0 +~~~~~~~~~~ + +* [ADD] Module account_spread_contract. diff --git a/account_spread_contract/readme/USAGE.rst b/account_spread_contract/readme/USAGE.rst new file mode 100644 index 000000000..9737a563e --- /dev/null +++ b/account_spread_contract/readme/USAGE.rst @@ -0,0 +1,15 @@ +Create a contract that will generate recurring invoices. +On its lines, the spreading right-arrow icon are displayed in dark-grey color. + +Click on the spreading right-arrow icon. A wizard prompts to enter a *Spread Template*. + +Click on Confirm button: the selected Spread Template will be automatically displayed. + +Go back to the contract. The spreading functionality is now enabled on the contract line: +the spreading right-arrow icon is now displayed in green color. + +When generating an invoice from the contract, the spread table will be automatically created +and linked to the respective invoice line. +The spread date is the date from the next invoice date present in the contract. +The period of the contract is copied to the spread. So if the contract is 3 months, it will also set +the spread period to 3x1 months. diff --git a/account_spread_contract/static/description/index.html b/account_spread_contract/static/description/index.html new file mode 100644 index 000000000..ff59978da --- /dev/null +++ b/account_spread_contract/static/description/index.html @@ -0,0 +1,458 @@ + + + + + + +Cost-Revenue Spread Contract + + + +
+

Cost-Revenue Spread Contract

+ + +

Alpha License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

+

This module allows to spread costs or revenues over a period defined in a contract.

+

When creating recurring invoices, the cost/revenue spread functionality is enabled on the invoice lines. +The costs/revenues spread functionality is provided by module account_spread_cost_revenue.

+

Table of contents

+ +
+

Configuration

+

Under Invoicing -> Configuration -> Accounting -> Spread Templates, create a new spread template.

+
    +
  • Spread Type
  • +
  • Spread Balance Sheet Account
  • +
  • Journal
  • +
+
+
+

Usage

+

Create a contract that will generate recurring invoices. +On its lines, the spreading right-arrow icon are displayed in dark-grey color.

+

Click on the spreading right-arrow icon. A wizard prompts to enter a Spread Template.

+

Click on Confirm button: the selected Spread Template will be automatically displayed.

+

Go back to the contract. The spreading functionality is now enabled on the contract line: +the spreading right-arrow icon is now displayed in green color.

+

When generating an invoice from the contract, the spread table will be automatically created +and linked to the respective invoice line.

+
+
+

Changelog

+
+

11.0.1.0.0

+
    +
  • [ADD] Module account_spread_contract.
  • +
+
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Onestein
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

astirpe

+

This module is part of the OCA/account-financial-tools project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/account_spread_contract/tests/__init__.py b/account_spread_contract/tests/__init__.py new file mode 100644 index 000000000..445b19775 --- /dev/null +++ b/account_spread_contract/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import test_account_spread_contract diff --git a/account_spread_contract/tests/test_account_spread_contract.py b/account_spread_contract/tests/test_account_spread_contract.py new file mode 100644 index 000000000..bf7aef977 --- /dev/null +++ b/account_spread_contract/tests/test_account_spread_contract.py @@ -0,0 +1,105 @@ +# Copyright 2018-2019 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo.tools import convert_file +from odoo.modules.module import get_module_resource +from odoo.addons.contract.tests.test_contract import TestContractBase + + +class TestAccountSpreadContract(TestContractBase): + + def _load(self, module, *args): + convert_file( + self.cr, + 'account_spread_contract', + get_module_resource(module, *args), + {}, 'init', False, 'test', self.registry._assertion_report) + + def setUp(self): + super().setUp() + self._load('account', 'test', 'account_minimal_test.xml') + + self.contract.recurring_next_date = '2016-02-29' + self.contract.recurring_invoicing_type = 'pre-paid' + self.contract.recurring_rule_type = 'monthly' + + self.receivable_account = self.env['account.account'].search([( + 'user_type_id', + '=', + self.env.ref('account.data_account_type_receivable').id)], + limit=1) + self.sales_journal_journal_id = self.ref( + 'account_spread_contract.sales_journal') + + self.sale_template = self.env['account.spread.template'].create({ + 'name': 'test', + 'spread_type': 'sale', + 'spread_account_id': self.receivable_account.id, + 'spread_journal_id': self.sales_journal_journal_id, + }) + + def test_01_create_recurring_invoice_with_spread(self): + self.assertTrue(self.receivable_account) + + self.assertEqual(len(self.contract.recurring_invoice_line_ids), 1) + contract_line = self.contract.recurring_invoice_line_ids + self.assertEqual(contract_line.spread_check, 'unlinked') + + contract_line.spread_template_id = self.sale_template + self.assertEqual(contract_line.spread_check, 'linked') + + self.contract.recurring_create_invoice() + invoice_monthly = self.env['account.invoice'].search( + [('contract_id', '=', self.contract.id)]) + self.assertEqual(len(invoice_monthly), 1) + + self.assertEqual(len(invoice_monthly.invoice_line_ids), 1) + spread = invoice_monthly.invoice_line_ids.spread_id + self.assertTrue(spread) + self.assertEqual(spread.template_id, self.sale_template) + self.assertEqual(contract_line.spread_template_id, self.sale_template) + + def test_02_open_wizard(self): + + contract_line = self.contract.recurring_invoice_line_ids + + res_action = contract_line.spread_details() + self.assertTrue(isinstance(res_action, dict)) + self.assertFalse(res_action.get('res_id')) + self.assertTrue(res_action.get('context')) + + contract_line.spread_template_id = self.sale_template + + res_action = contract_line.spread_details() + self.assertTrue(isinstance(res_action, dict)) + self.assertTrue(res_action.get('res_id')) + self.assertTrue(res_action.get('context')) + + def test_03_wizard_create(self): + my_company = self.env.user.company_id + contract_line = self.contract.recurring_invoice_line_ids + self.assertFalse(contract_line.spread_template_id) + + Wizard = self.env['account.spread.contract.line.link.wizard'] + wizard = Wizard.with_context( + default_contract_line_id=contract_line.id, + default_company_id=my_company.id, + ).create({ + 'spread_template_id': self.sale_template.id, + }) + + self.assertEqual(wizard.contract_line_id, contract_line) + self.assertEqual(wizard.contract_id, self.contract) + self.assertEqual(wizard.contract_type, 'sale') + self.assertEqual(wizard.spread_template_id, self.sale_template) + self.assertEqual(wizard.company_id, my_company) + self.assertEqual(contract_line.spread_check, 'unlinked') + + wizard.confirm() + self.assertEqual(contract_line.spread_template_id, self.sale_template) + self.assertEqual(contract_line.spread_check, 'linked') + + ctx = {'force_contract_line_id': contract_line.id} + self.sale_template.with_context(ctx).action_unlink_contract_line() + self.assertFalse(contract_line.spread_template_id) + self.assertEqual(contract_line.spread_check, 'unlinked') diff --git a/account_spread_contract/views/account_analytic_account.xml b/account_spread_contract/views/account_analytic_account.xml new file mode 100644 index 000000000..85c7cdc80 --- /dev/null +++ b/account_spread_contract/views/account_analytic_account.xml @@ -0,0 +1,14 @@ + + + + + account.analytic.account + + + + + + + + + diff --git a/account_spread_contract/views/account_spread_template.xml b/account_spread_contract/views/account_spread_template.xml new file mode 100644 index 000000000..08f4e7647 --- /dev/null +++ b/account_spread_contract/views/account_spread_template.xml @@ -0,0 +1,14 @@ + + + + + account.spread.template + + +
+
+
+
+ +
diff --git a/account_spread_contract/wizards/__init__.py b/account_spread_contract/wizards/__init__.py new file mode 100644 index 000000000..8f22e026e --- /dev/null +++ b/account_spread_contract/wizards/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import account_spread_contract_line_link_wizard diff --git a/account_spread_contract/wizards/account_spread_contract_line_link_wizard.py b/account_spread_contract/wizards/account_spread_contract_line_link_wizard.py new file mode 100644 index 000000000..cb10ca358 --- /dev/null +++ b/account_spread_contract/wizards/account_spread_contract_line_link_wizard.py @@ -0,0 +1,48 @@ +# Copyright 2018-2019 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, api, fields, models + + +class AccountSpreadContractLineLinkWizard(models.TransientModel): + _name = 'account.spread.contract.line.link.wizard' + _description = 'Account Spread Contract Line Link Wizard' + + contract_line_id = fields.Many2one( + 'account.analytic.invoice.line', + string='Contract Line', + readonly=True, + required=True) + contract_id = fields.Many2one( + related='contract_line_id.analytic_account_id', + readonly=True) + contract_type = fields.Selection( + related='contract_line_id.analytic_account_id.contract_type', + readonly=True) + spread_template_id = fields.Many2one( + 'account.spread.template', + string='Spread Template', + required=True) + company_id = fields.Many2one( + 'res.company', + string='Company', + required=True) + + @api.multi + def confirm(self): + self.ensure_one() + + if not self.contract_line_id.spread_template_id: + self.contract_line_id.spread_template_id = self.spread_template_id + + if self.spread_template_id: + return { + 'name': _('Spread Template Details'), + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'account.spread.template', + 'type': 'ir.actions.act_window', + 'target': 'current', + 'readonly': False, + 'res_id': self.spread_template_id.id, + } diff --git a/account_spread_contract/wizards/account_spread_contract_line_link_wizard.xml b/account_spread_contract/wizards/account_spread_contract_line_link_wizard.xml new file mode 100644 index 000000000..edc141932 --- /dev/null +++ b/account_spread_contract/wizards/account_spread_contract_line_link_wizard.xml @@ -0,0 +1,27 @@ + + + + + account.spread.contract.line.link.wizard + +
+ + + + + + + + + + + + +
+
+
+ +