forked from OCA/sale-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] sale_discount_display_amount: add total without discount in report
- Loading branch information
Showing
10 changed files
with
79 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ Sale Discount Display Amount | |
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:e21382b902ec20c35d54796dca6229acfcbe884bcbc853d57db157dd8da17742 | ||
!! source digest: sha256:b8f5751d5a54623c56c41d0264ef8c3764328fa33af00e1c26294068740d9b39 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
|
@@ -44,6 +44,7 @@ Configuration | |
To configure this module, you need to: | ||
|
||
#. Go to Sales/Settings and check "Allow discounts on sales order lines" | ||
#. Also check "Display Total without discount in report" in order to add this field to report. | ||
|
||
Usage | ||
===== | ||
|
@@ -80,6 +81,8 @@ Contributors | |
* Abraham Anes <[email protected]> | ||
* Chafique Delli <[email protected]> | ||
* Manuel Regidor <[email protected]> | ||
* PyTech srl <[email protected]> | ||
* Ooops404 <[email protected]> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
from . import sale_order | ||
from . import sale_order_line | ||
from . import res_company | ||
from . import res_config_settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class ResCompany(models.Model): | ||
_inherit = "res.company" | ||
|
||
report_total_without_discount = fields.Boolean("Report Total Without Discount") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class ResConfigSettings(models.TransientModel): | ||
_inherit = "res.config.settings" | ||
|
||
report_total_without_discount = fields.Boolean( | ||
related="company_id.report_total_without_discount", readonly=False | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
To configure this module, you need to: | ||
|
||
#. Go to Sales/Settings and check "Allow discounts on sales order lines" | ||
#. Also check "Display Total without discount in report" in order to add this field to report. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
* Abraham Anes <[email protected]> | ||
* Chafique Delli <[email protected]> | ||
* Manuel Regidor <[email protected]> | ||
* PyTech SRL <[email protected]> | ||
* Ooops404 <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
sale_discount_display_amount/views/res_config_settings_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
|
||
<record id="res_config_settings_view_form" model="ir.ui.view"> | ||
<field name="name">res.config.settings.view.form.inherit.sale</field> | ||
<field name="model">res.config.settings</field> | ||
<field name="priority" eval="10" /> | ||
<field name="inherit_id" ref="sale.res_config_settings_view_form" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//div[@id='proforma_configuration']" position="after"> | ||
<div | ||
class="col-12 col-lg-6 o_setting_box" | ||
id="report_total_without_discount_configuration" | ||
> | ||
<div class="o_setting_left_pane"> | ||
<field name="report_total_without_discount" /> | ||
</div> | ||
<div class="o_setting_right_pane"> | ||
<label for="report_total_without_discount" /> | ||
<div class="text-muted"> | ||
Display "Total without discount" in report | ||
</div> | ||
</div> | ||
</div> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |