[MIG] partner_statement: Migration to 15.0

pull/859/head
mariadforgeflow 2022-02-04 15:59:23 +01:00
parent 852da664f7
commit d50d8d1af7
6 changed files with 110 additions and 109 deletions

View File

@ -1,9 +1,9 @@
# Copyright 2018 ForgeFlow, S.L. (http://www.forgeflow.com)
# Copyright 2022 ForgeFlow, S.L. (http://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Partner Statement",
"version": "14.0.1.1.0",
"version": "15.0.1.0.0",
"category": "Accounting & Finance",
"summary": "OCA Financial Reports",
"author": "ForgeFlow, Odoo Community Association (OCA)",
@ -16,11 +16,15 @@
"security/statement_security.xml",
"views/activity_statement.xml",
"views/outstanding_statement.xml",
"views/assets.xml",
"views/aging_buckets.xml",
"views/res_config_settings.xml",
"wizard/statement_wizard.xml",
],
"assets": {
"web.report_assets_common": [
"/partner_statement/static/src/scss/layout_statement.scss",
],
},
"installable": True,
"application": False,
}

View File

@ -6,8 +6,8 @@ Users willing to access to this report should have proper Accounting & Finance r
To configure this module, you need to:
#. Go to *Configuration / Settings*
#. Under the *Followup Section* of *Accounting* option select either or both of OCA Activity or Outstanding Statement
#. Go to *Invoicing / Configuration / Settings*
#. Under the *Partner Statements* of *Accounting* option select either or both of OCA Activity or Outstanding Statement
#. Once selected, you may set default options for the reports.
#. Click *Save*

View File

@ -56,25 +56,31 @@ class TestActivityStatement(TransactionCase):
statement = wiz_id.button_export_pdf()
self.assertDictContainsSubset(
{
"type": "ir.actions.report",
"report_name": self.report_name,
"report_type": "qweb-pdf",
},
self.assertDictEqual(
statement,
{
**{
"type": "ir.actions.report",
"report_name": self.report_name,
"report_type": "qweb-pdf",
},
**statement,
},
"There was an error and the PDF report was not generated.",
)
statement_xlsx = wiz_id.button_export_xlsx()
self.assertDictContainsSubset(
{
"type": "ir.actions.report",
"report_name": self.report_name_xlsx,
"report_type": "xlsx",
},
self.assertDictEqual(
statement_xlsx,
{
**{
"type": "ir.actions.report",
"report_name": self.report_name_xlsx,
"report_type": "xlsx",
},
**statement_xlsx,
},
"There was an error and the PDF report was not generated.",
)

View File

@ -52,25 +52,31 @@ class TestOutstandingStatement(TransactionCase):
statement = wiz_id.button_export_pdf()
self.assertDictContainsSubset(
{
"type": "ir.actions.report",
"report_name": self.report_name,
"report_type": "qweb-pdf",
},
self.assertDictEqual(
statement,
{
**{
"type": "ir.actions.report",
"report_name": self.report_name,
"report_type": "qweb-pdf",
},
**statement,
},
"There was an error and the PDF report was not generated.",
)
statement_xlsx = wiz_id.button_export_xlsx()
self.assertDictContainsSubset(
{
"type": "ir.actions.report",
"report_name": self.report_name_xlsx,
"report_type": "xlsx",
},
self.assertDictEqual(
statement_xlsx,
{
**{
"type": "ir.actions.report",
"report_name": self.report_name_xlsx,
"report_type": "xlsx",
},
**statement_xlsx,
},
"There was an error and the PDF report was not generated.",
)

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 ForgeFlow, S.L. (https://www.forgeflow.com)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<template
id="report_assets_common"
name="oca_statements report assets"
inherit_id="web.report_assets_common"
>
<xpath expr="." position="inside">
<link
rel="stylesheet"
href="/partner_statement/static/src/scss/layout_statement.scss"
type="text/scss"
/>
</xpath>
</template>
</odoo>

View File

@ -7,76 +7,79 @@
<field name="inherit_id" ref="account.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath
expr="//field[@name='module_account_payment']/../.."
expr="//div[@name='main_currency_setting_container']"
position="after"
>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="group_activity_statement" />
</div>
<div class="o_setting_right_pane">
<label for="group_activity_statement" />
<div class="text-muted">
Activity Statements show all transactions between two dates.
<h2>Partner Statements</h2>
<div class="row mt16 o_settings_container" name="partner_statement">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="group_activity_statement" />
</div>
<div
class="content-group"
attrs="{'invisible': [('group_activity_statement', '=', False), ('group_outstanding_statement', '=', False)]}"
>
<div class="row mt16">
<label
for="default_aging_type"
class="col-lg-3 o_light_label"
/>
<field name="default_aging_type" />
<div class="o_setting_right_pane">
<label for="group_activity_statement" />
<div class="text-muted">
Activity Statements show all transactions between two dates.
</div>
<div>
<field
name="default_show_aging_buckets"
class="oe_inline"
/>
<label
for="default_show_aging_buckets"
class="o_light_label"
/>
</div>
<div>
<field
name="default_filter_partners_non_due"
class="oe_inline"
/>
<label
for="default_filter_partners_non_due"
class="o_light_label"
/>
</div>
<div>
<field
name="default_filter_negative_balances"
class="oe_inline"
/>
<label
for="default_filter_negative_balances"
class="o_light_label"
/>
<div
class="content-group"
attrs="{'invisible': [('group_activity_statement', '=', False), ('group_outstanding_statement', '=', False)]}"
>
<div class="row mt16">
<label
for="default_aging_type"
class="col-lg-3 o_light_label"
/>
<field name="default_aging_type" />
</div>
<div>
<field
name="default_show_aging_buckets"
class="oe_inline"
/>
<label
for="default_show_aging_buckets"
class="o_light_label"
/>
</div>
<div>
<field
name="default_filter_partners_non_due"
class="oe_inline"
/>
<label
for="default_filter_partners_non_due"
class="o_light_label"
/>
</div>
<div>
<field
name="default_filter_negative_balances"
class="oe_inline"
/>
<label
for="default_filter_negative_balances"
class="o_light_label"
/>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="group_outstanding_statement" />
</div>
<div class="o_setting_right_pane">
<label for="group_outstanding_statement" />
<div class="text-muted">
Outstanding Statements show all transactions up to a date.
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="group_outstanding_statement" />
</div>
<div
class="text-muted"
attrs="{'invisible': [('group_outstanding_statement', '=', False)]}"
>
Please set defaults under Activity Statements.
<div class="o_setting_right_pane">
<label for="group_outstanding_statement" />
<div class="text-muted">
Outstanding Statements show all transactions up to a date.
</div>
<div
class="text-muted"
attrs="{'invisible': [('group_outstanding_statement', '=', False)]}"
>
Please set defaults under Activity Statements.
</div>
</div>
</div>
</div>