Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] sale_commission_product_criteria: print commission value on settlement report #569

Merged
merged 2 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions sale_commission_product_criteria/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,19 @@ promote its widespread use.
.. |maintainer-ilyasProgrammer| image:: https://github.com/ilyasProgrammer.png?size=40px
:target: https://github.com/ilyasProgrammer
:alt: ilyasProgrammer

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ilyasProgrammer|
.. |maintainer-aleuffre| image:: https://github.com/aleuffre.png?size=40px
:target: https://github.com/aleuffre
:alt: aleuffre
.. |maintainer-renda-dev| image:: https://github.com/renda-dev.png?size=40px
:target: https://github.com/renda-dev
:alt: renda-dev
.. |maintainer-PicchiSeba| image:: https://github.com/PicchiSeba.png?size=40px
:target: https://github.com/PicchiSeba
:alt: PicchiSeba

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ilyasProgrammer| |maintainer-aleuffre| |maintainer-renda-dev| |maintainer-PicchiSeba|

This module is part of the `OCA/commission <https://github.com/OCA/commission/tree/14.0/sale_commission_product_criteria>`_ project on GitHub.

Expand Down
3 changes: 2 additions & 1 deletion sale_commission_product_criteria/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
"summary": "Advanced commissions rules",
"version": "14.0.1.1.5",
"author": "Ilyas, Ooops404, Odoo Community Association (OCA)",
"maintainers": ["ilyasProgrammer"],
"maintainers": ["ilyasProgrammer", "aleuffre", "renda-dev", "PicchiSeba"],
"website": "https://github.com/OCA/commission",
"category": "Sales Management",
"license": "AGPL-3",
"depends": ["sale_commission", "web_domain_field"],
"data": [
"reports/report_settlement_template.xml",
"views/views.xml",
"security/ir.model.access.csv",
],
Expand Down
1 change: 0 additions & 1 deletion sale_commission_product_criteria/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
from . import commission
from . import sale
from . import account_move
from . import settlement
7 changes: 0 additions & 7 deletions sale_commission_product_criteria/models/settlement.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_settlement" inherit_id="sale_commission.report_settlement">
<xpath expr="//table/thead/tr/th[last()]" position="before">
<t
t-set="show_value_column"
t-value="any(l.agent_line.applied_commission_item_id for l in o.line_ids)"
/>
<t t-if="show_value_column">
<th>Value</th>
</t>
</xpath>
<xpath expr="//table/tbody/tr/td[last()]" position="before">
<t t-if="show_value_column">
<td>
<t
t-set="comm_item"
t-value="l.agent_line.applied_commission_item_id"
/>
<t t-if="comm_item.commission_type == 'fixed'">
<span
t-field="comm_item.fixed_amount"
t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"
/>
</t>
<t t-elif="comm_item.commission_type == 'percentage'">
<span t-field="comm_item.percent_amount" />%
</t>
</td>
</t>
</xpath>
</template>
</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>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.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/ilyasProgrammer"><img alt="ilyasProgrammer" src="https://github.com/ilyasProgrammer.png?size=40px" /></a></p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/ilyasProgrammer"><img alt="ilyasProgrammer" src="https://github.com/ilyasProgrammer.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/aleuffre"><img alt="aleuffre" src="https://github.com/aleuffre.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/renda-dev"><img alt="renda-dev" src="https://github.com/renda-dev.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/PicchiSeba"><img alt="PicchiSeba" src="https://github.com/PicchiSeba.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/commission/tree/14.0/sale_commission_product_criteria">OCA/commission</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
Expand Down
Loading