Skip to content

Commit

Permalink
Merge pull request #525 from OCA/16.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/commission (16.0)
  • Loading branch information
bt-admin authored Feb 25, 2025
2 parents 93a9866 + 63daf11 commit 3f93944
Show file tree
Hide file tree
Showing 13 changed files with 113 additions and 46 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Available addons
addon | version | maintainers | summary
--- | --- | --- | ---
[account_commission](account_commission/) | 16.0.2.4.1 | [![pedrobaeza](https://github.com/pedrobaeza.png?size=30px)](https://github.com/pedrobaeza) | Account commissions
[commission](commission/) | 16.0.2.3.0 | [![pedrobaeza](https://github.com/pedrobaeza.png?size=30px)](https://github.com/pedrobaeza) | Commissions
[commission](commission/) | 16.0.2.4.0 | [![pedrobaeza](https://github.com/pedrobaeza.png?size=30px)](https://github.com/pedrobaeza) | Commissions
[commission_delegated_partner](commission_delegated_partner/) | 16.0.1.0.1 | | Allow to delegate the invoices of agent to a delegate partner
[commission_formula](commission_formula/) | 16.0.1.0.0 | | Commissions computed by formulas
[hr_commission](hr_commission/) | 16.0.1.0.0 | | HR commissions
Expand Down
2 changes: 1 addition & 1 deletion commission/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Commissions
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a6a9729b4ac92891ac83e654ab6bfb486274befeb545606bf89298465a437432
!! source digest: sha256:4be0b3f4fe8059969e18154cd0f593f6f92dedf3ae1e6e77cd8e1f215a87f632
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion commission/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2014-2022 Tecnativa - Pedro M. Baeza
{
"name": "Commissions",
"version": "16.0.2.3.0",
"version": "16.0.2.4.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"category": "Invoicing",
"license": "AGPL-3",
Expand Down
5 changes: 5 additions & 0 deletions commission/i18n/commission.pot
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ msgstr ""
msgid "<strong>From:</strong>"
msgstr ""

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>Global commission amount:</strong>"
msgstr ""

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>To:</strong>"
Expand Down
5 changes: 5 additions & 0 deletions commission/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ msgstr ""
msgid "<strong>From:</strong>"
msgstr "<strong>De:</strong>"

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>Global commission amount:</strong>"
msgstr ""

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>To:</strong>"
Expand Down
27 changes: 18 additions & 9 deletions commission/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ msgstr "1 agent de commission"
#: model_terms:ir.ui.view,arch_db:commission.view_settled_wizard
msgid ""
"<span>\n"
" No automatic settlements can be made. Install any extra\n"
" No automatic settlements can be made. Install any "
"extra\n"
" commission module for having this feature enabled.\n"
" </span>"
msgstr ""
Expand All @@ -55,6 +56,11 @@ msgstr ""
msgid "<strong>From:</strong>"
msgstr "<strong>De :</strong>"

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>Global commission amount:</strong>"
msgstr ""

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>To:</strong>"
Expand Down Expand Up @@ -495,8 +501,7 @@ msgstr "Messages"

#. module: commission
#: model:ir.model,name:commission.model_commission_mixin
msgid ""
"Mixin model for applying to any object that wants to handle commissions"
msgid "Mixin model for applying to any object that wants to handle commissions"
msgstr ""
"Modèle abstrait pour mettre sur tous les objets voulus la gestion des "
"commissions"
Expand Down Expand Up @@ -621,8 +626,10 @@ msgstr ""
#: model:ir.model.fields,help:commission.field_commission__amount_base_type
msgid ""
"Select the base amount for computing the percentage:\n"
"* 'Sale/Invoice Amount': percentage is computed from the amount put on sales order/invoice.\n"
"* 'Margin (Amount - Cost)': percentage is computed from the profit only, taken the cost from the product."
"* 'Sale/Invoice Amount': percentage is computed from the amount put on sales "
"order/invoice.\n"
"* 'Margin (Amount - Cost)': percentage is computed from the profit only, "
"taken the cost from the product."
msgstr ""

#. module: commission
Expand All @@ -634,8 +641,10 @@ msgstr ""
#: model:ir.model.fields,help:commission.field_commission__commission_type
msgid ""
"Select the percentage type of the commission:\n"
"* 'Fixed percentage': all commissions are computed with a fixed percentage. You can fill the percentage in the field \"Fixed percentage\".\n"
"* 'By sections': percentage varies depending amount intervals. You can fill intervals and percentages in the section \"Rate definition\"."
"* 'Fixed percentage': all commissions are computed with a fixed percentage. "
"You can fill the percentage in the field \"Fixed percentage\".\n"
"* 'By sections': percentage varies depending amount intervals. You can fill "
"intervals and percentages in the section \"Rate definition\"."
msgstr ""

#. module: commission
Expand Down Expand Up @@ -762,8 +771,8 @@ msgstr ""
#. module: commission
#: model:ir.model.fields,help:commission.field_commission_settlement__settlement_type
msgid ""
"The source of the settlement, e.g. 'Sales invoice', 'Sales order', 'Purchase"
" order'..."
"The source of the settlement, e.g. 'Sales invoice', 'Sales order', 'Purchase "
"order'..."
msgstr ""

#. module: commission
Expand Down
5 changes: 5 additions & 0 deletions commission/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ msgstr ""
msgid "<strong>From:</strong>"
msgstr "<strong>Da:</strong>"

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>Global commission amount:</strong>"
msgstr ""

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>To:</strong>"
Expand Down
5 changes: 5 additions & 0 deletions commission/i18n/ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ msgstr ""
msgid "<strong>From:</strong>"
msgstr "<strong>開始:</strong>"

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>Global commission amount:</strong>"
msgstr ""

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>To:</strong>"
Expand Down
5 changes: 5 additions & 0 deletions commission/i18n/pt.po
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ msgstr ""
msgid "<strong>From:</strong>"
msgstr "<strong>De:</strong>"

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>Global commission amount:</strong>"
msgstr ""

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>To:</strong>"
Expand Down
5 changes: 5 additions & 0 deletions commission/i18n/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ msgstr ""
msgid "<strong>From:</strong>"
msgstr "<strong> De:</strong>"

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>Global commission amount:</strong>"
msgstr ""

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>To:</strong>"
Expand Down
31 changes: 20 additions & 11 deletions commission/i18n/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:commission.view_settled_wizard
msgid ""
"<span>\n"
" No automatic settlements can be made. Install any extra\n"
" No automatic settlements can be made. Install any "
"extra\n"
" commission module for having this feature enabled.\n"
" </span>"
msgstr ""
Expand All @@ -54,6 +55,11 @@ msgstr ""
msgid "<strong>From:</strong>"
msgstr "<strong>Tarafından:</strong>"

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>Global commission amount:</strong>"
msgstr ""

#. module: commission
#: model_terms:ir.ui.view,arch_db:commission.report_settlement_document
msgid "<strong>To:</strong>"
Expand Down Expand Up @@ -494,8 +500,7 @@ msgstr "Mesajlar"

#. module: commission
#: model:ir.model,name:commission.model_commission_mixin
msgid ""
"Mixin model for applying to any object that wants to handle commissions"
msgid "Mixin model for applying to any object that wants to handle commissions"
msgstr ""
"Komisyonları işlemek isteyen herhangi bir nesneye uygulamak için mixin modeli"

Expand Down Expand Up @@ -621,8 +626,10 @@ msgstr "Bölümler"
#: model:ir.model.fields,help:commission.field_commission__amount_base_type
msgid ""
"Select the base amount for computing the percentage:\n"
"* 'Sale/Invoice Amount': percentage is computed from the amount put on sales order/invoice.\n"
"* 'Margin (Amount - Cost)': percentage is computed from the profit only, taken the cost from the product."
"* 'Sale/Invoice Amount': percentage is computed from the amount put on sales "
"order/invoice.\n"
"* 'Margin (Amount - Cost)': percentage is computed from the profit only, "
"taken the cost from the product."
msgstr ""
"Yüzdeyi hesaplamak için baz tutarı seçin:\n"
" * 'Satış / Fatura Tutarı': yüzde, satış siparişi / faturaya konulan "
Expand All @@ -639,8 +646,10 @@ msgstr "Anlaşmayı yapmak istediğiniz tarihi seçin:"
#: model:ir.model.fields,help:commission.field_commission__commission_type
msgid ""
"Select the percentage type of the commission:\n"
"* 'Fixed percentage': all commissions are computed with a fixed percentage. You can fill the percentage in the field \"Fixed percentage\".\n"
"* 'By sections': percentage varies depending amount intervals. You can fill intervals and percentages in the section \"Rate definition\"."
"* 'Fixed percentage': all commissions are computed with a fixed percentage. "
"You can fill the percentage in the field \"Fixed percentage\".\n"
"* 'By sections': percentage varies depending amount intervals. You can fill "
"intervals and percentages in the section \"Rate definition\"."
msgstr ""
"Komisyonun oran tipini seçin:\n"
"* 'Sabit Oran': Tüm komisyonlar sabit oranla hesaplanır. Oranı \\\"Sabit "
Expand Down Expand Up @@ -777,8 +786,8 @@ msgstr ""
#. module: commission
#: model:ir.model.fields,help:commission.field_commission_settlement__settlement_type
msgid ""
"The source of the settlement, e.g. 'Sales invoice', 'Sales order', 'Purchase"
" order'..."
"The source of the settlement, e.g. 'Sales invoice', 'Sales order', 'Purchase "
"order'..."
msgstr ""
"Anlaşmanın kaynağı, ör. 'Satış faturası', 'Satış siparişi', 'Alış '\n"
"'siparişi'..."
Expand All @@ -790,8 +799,8 @@ msgid ""
"This is the default commission used in the sales where this agent is "
"assigned. It can be changed on each operation if needed."
msgstr ""
"Satışa bu temsilci atandığında kullanılacak varsayılan komisyon. İstenilirse "
"\n"
"Satışa bu temsilci atandığında kullanılacak varsayılan komisyon. "
"İstenilirse \n"
" her işlemde değiştirilebilir."

#. module: commission
Expand Down
52 changes: 34 additions & 18 deletions commission/reports/report_settlement_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,21 @@
<div class="mt-5">
<div class="page">
<h2>Settlement</h2>
<div id="informations" class="row mt-4 mb-4">
<div class="col-auto col-3 mw-100 mb-2" t-if="o.date_from">
<t t-if="show_doc_total">
<div class="col-md-12 text-end">
<strong>Global commission amount:</strong>
<span
t-esc="sum(docs.mapped('total'))"
t-options="{'widget': 'monetary', 'display_currency': docs[0].currency_id}"
/>
</div>
</t>
<div id="informations" class="row mt-2">
<div class="col-auto col-3 mw-80 mb-2" t-if="o.date_from">
<strong>From:</strong>
<p t-field="o.date_from" />
</div>
<div class="col-auto col-3 mw-100 mb-2" t-if="o.date_to">
<div class="col-auto col-3 mw-100" t-if="o.date_to">
<strong>To:</strong>
<p t-field="o.date_to" />
</div>
Expand Down Expand Up @@ -52,25 +61,28 @@
</tr>
</tbody>
</table>
<div class="mb-4">
<div id="total" class="row">
<div
t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ms-auto"
>
<table
class="table table-sm table-borderless"
style="page-break-inside: avoid;"
>
<div
class="clearfix"
name="commission_total_summary"
style="page-break-inside: avoid;"
>
<div id="total" class="row" name="total">
<div class="col-6 ms-auto text-end">
<table class="table table-sm align-right">
<tr class="border-black o_total">
<td>
<strong>Total</strong>
</td>
<td class="text-end">
<span
<td name="td_amount_total_label">
<strong>Total</strong>
<span style="white-space: nowrap;"> (<span
t-field="o.date_from"
/> - <span
t-field="o.date_to"
/>)</span>
<span
class="ms-6 text-right"
t-field="o.total"
t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"
/>
</td>
</td>
</tr>
</table>
</div>
Expand All @@ -83,6 +95,10 @@

<template id="report_settlement">
<t t-call="web.html_container">
<t
t-set="show_doc_total"
t-value="len(docs) > 1 and len(docs.mapped('currency_id')) == 1"
/>
<t t-foreach="docs" t-as="o">
<t
t-call="commission.report_settlement_document"
Expand Down
13 changes: 8 additions & 5 deletions commission/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -366,7 +367,7 @@ <h1 class="title">Commissions</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a6a9729b4ac92891ac83e654ab6bfb486274befeb545606bf89298465a437432
!! source digest: sha256:4be0b3f4fe8059969e18154cd0f593f6f92dedf3ae1e6e77cd8e1f215a87f632
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/commission/tree/16.0/commission"><img alt="OCA/commission" src="https://img.shields.io/badge/github-OCA%2Fcommission-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/commission-16-0/commission-16-0-commission"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/commission&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module provides the base functions for commission operations to enable the
Expand Down Expand Up @@ -520,7 +521,9 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<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>
Expand Down

0 comments on commit 3f93944

Please sign in to comment.