[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). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{ {
"name": "Partner Statement", "name": "Partner Statement",
"version": "14.0.1.1.0", "version": "15.0.1.0.0",
"category": "Accounting & Finance", "category": "Accounting & Finance",
"summary": "OCA Financial Reports", "summary": "OCA Financial Reports",
"author": "ForgeFlow, Odoo Community Association (OCA)", "author": "ForgeFlow, Odoo Community Association (OCA)",
@ -16,11 +16,15 @@
"security/statement_security.xml", "security/statement_security.xml",
"views/activity_statement.xml", "views/activity_statement.xml",
"views/outstanding_statement.xml", "views/outstanding_statement.xml",
"views/assets.xml",
"views/aging_buckets.xml", "views/aging_buckets.xml",
"views/res_config_settings.xml", "views/res_config_settings.xml",
"wizard/statement_wizard.xml", "wizard/statement_wizard.xml",
], ],
"assets": {
"web.report_assets_common": [
"/partner_statement/static/src/scss/layout_statement.scss",
],
},
"installable": True, "installable": True,
"application": False, "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: To configure this module, you need to:
#. Go to *Configuration / Settings* #. Go to *Invoicing / Configuration / Settings*
#. Under the *Followup Section* of *Accounting* option select either or both of OCA Activity or Outstanding Statement #. 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. #. Once selected, you may set default options for the reports.
#. Click *Save* #. Click *Save*

View File

@ -56,25 +56,31 @@ class TestActivityStatement(TransactionCase):
statement = wiz_id.button_export_pdf() statement = wiz_id.button_export_pdf()
self.assertDictContainsSubset( self.assertDictEqual(
{
"type": "ir.actions.report",
"report_name": self.report_name,
"report_type": "qweb-pdf",
},
statement, 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.", "There was an error and the PDF report was not generated.",
) )
statement_xlsx = wiz_id.button_export_xlsx() statement_xlsx = wiz_id.button_export_xlsx()
self.assertDictContainsSubset( self.assertDictEqual(
{
"type": "ir.actions.report",
"report_name": self.report_name_xlsx,
"report_type": "xlsx",
},
statement_xlsx, 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.", "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() statement = wiz_id.button_export_pdf()
self.assertDictContainsSubset( self.assertDictEqual(
{
"type": "ir.actions.report",
"report_name": self.report_name,
"report_type": "qweb-pdf",
},
statement, 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.", "There was an error and the PDF report was not generated.",
) )
statement_xlsx = wiz_id.button_export_xlsx() statement_xlsx = wiz_id.button_export_xlsx()
self.assertDictContainsSubset( self.assertDictEqual(
{
"type": "ir.actions.report",
"report_name": self.report_name_xlsx,
"report_type": "xlsx",
},
statement_xlsx, 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.", "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="inherit_id" ref="account.res_config_settings_view_form" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath <xpath
expr="//field[@name='module_account_payment']/../.." expr="//div[@name='main_currency_setting_container']"
position="after" position="after"
> >
<div class="col-12 col-lg-6 o_setting_box"> <h2>Partner Statements</h2>
<div class="o_setting_left_pane"> <div class="row mt16 o_settings_container" name="partner_statement">
<field name="group_activity_statement" /> <div class="col-12 col-lg-6 o_setting_box">
</div> <div class="o_setting_left_pane">
<div class="o_setting_right_pane"> <field name="group_activity_statement" />
<label for="group_activity_statement" />
<div class="text-muted">
Activity Statements show all transactions between two dates.
</div> </div>
<div <div class="o_setting_right_pane">
class="content-group" <label for="group_activity_statement" />
attrs="{'invisible': [('group_activity_statement', '=', False), ('group_outstanding_statement', '=', False)]}" <div class="text-muted">
> Activity Statements show all transactions between two dates.
<div class="row mt16">
<label
for="default_aging_type"
class="col-lg-3 o_light_label"
/>
<field name="default_aging_type" />
</div> </div>
<div> <div
<field class="content-group"
name="default_show_aging_buckets" attrs="{'invisible': [('group_activity_statement', '=', False), ('group_outstanding_statement', '=', False)]}"
class="oe_inline" >
/> <div class="row mt16">
<label <label
for="default_show_aging_buckets" for="default_aging_type"
class="o_light_label" class="col-lg-3 o_light_label"
/> />
</div> <field name="default_aging_type" />
<div> </div>
<field <div>
name="default_filter_partners_non_due" <field
class="oe_inline" name="default_show_aging_buckets"
/> class="oe_inline"
<label />
for="default_filter_partners_non_due" <label
class="o_light_label" for="default_show_aging_buckets"
/> class="o_light_label"
</div> />
<div> </div>
<field <div>
name="default_filter_negative_balances" <field
class="oe_inline" name="default_filter_partners_non_due"
/> class="oe_inline"
<label />
for="default_filter_negative_balances" <label
class="o_light_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> </div>
</div> <div class="col-12 col-lg-6 o_setting_box">
<div class="col-12 col-lg-6 o_setting_box"> <div class="o_setting_left_pane">
<div class="o_setting_left_pane"> <field name="group_outstanding_statement" />
<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> </div>
<div <div class="o_setting_right_pane">
class="text-muted" <label for="group_outstanding_statement" />
attrs="{'invisible': [('group_outstanding_statement', '=', False)]}" <div class="text-muted">
> Outstanding Statements show all transactions up to a date.
Please set defaults under Activity Statements. </div>
<div
class="text-muted"
attrs="{'invisible': [('group_outstanding_statement', '=', False)]}"
>
Please set defaults under Activity Statements.
</div>
</div> </div>
</div> </div>
</div> </div>