Skip to content

Commit

Permalink
[IMP] commission: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mb-andema committed Nov 12, 2024
1 parent d0002ba commit e659aee
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 72 deletions.
90 changes: 45 additions & 45 deletions commission/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ Commissions
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcommission-lightgray.png?logo=github
:target: https://github.com/OCA/commission/tree/17.0/commission
:target: https://github.com/OCA/commission/tree/18.0/commission
:alt: OCA/commission
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/commission-17-0/commission-17-0-commission
:target: https://translation.odoo-community.org/projects/commission-18-0/commission-18-0-commission
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/commission&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/commission&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module provides the base functions for commission operations to
enable the following:

- Define agents with their commissions
- Assign agents to partners
- Create settlements to summarize commissions for certain periods
- Define agents with their commissions
- Assign agents to partners
- Create settlements to summarize commissions for certain periods

You can define which base amount is going to be taken into account: net
amount (based on margin) or gross amount (line subtotal amount).
Expand All @@ -53,19 +53,19 @@ For adding commissions:
3. Select a name for distinguishing that type.
4. Select the percentage type of the commission:

- **Fixed percentage**: all commissions are computed with a fixed
percentage. You can fill the percentage in the field "Fixed
percentage".
- **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".
- **By sections**: percentage varies depending amount intervals. You
can fill intervals and percentages in the section "Rate
definition".

5. Select the base amount for computing the percentage:

- **Sale/Invoice Amount**: percentage is computed from the amount
put on sales order/invoice.
- **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.
- **Margin (Amount - Cost)**: percentage is computed from the profit
only, taken the cost from the product.

For adding new agents:

Expand All @@ -80,12 +80,12 @@ For adding new agents:
4. There's a new page called "Agent information". In it, you can set
following data:

- The agent type, being in this base module "External agent" the
only existing configuration. It can be extended with hr_commission
module for setting an "Employee" agent type.
- The associated commission type.
- The settlement period, where you can select "Bi-weekly",
"Monthly", "Quaterly", "Semi-annual" or "Annual".
- The agent type, being in this base module "External agent" the only
existing configuration. It can be extended with hr_commission
module for setting an "Employee" agent type.
- The associated commission type.
- The settlement period, where you can select "Bi-weekly", "Monthly",
"Quaterly", "Semi-annual" or "Annual".

You will also be able to see the settlements that have been made to
this agent from this page.
Expand Down Expand Up @@ -117,17 +117,17 @@ For settling the commissions to agents:
Known issues / Roadmap
======================

- Make it totally multi-company aware.
- Set agent popup window with a kanban view with richer information and
mobile friendly.
- Make it totally multi-company aware.
- Set agent popup window with a kanban view with richer information and
mobile friendly.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/commission/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/commission/issues/new?body=module:%20commission%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/commission/issues/new?body=module:%20commission%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand All @@ -142,29 +142,29 @@ Authors
Contributors
------------

- Pexego.
- Davide Corio <davide.corio@domsense.com>
- Joao Alfredo Gama Batista <joao.gama@savoirfairelinux.com>
- Sandy Carter <sandy.carter@savoirfairelinux.com>
- Giorgio Borelli <giorgio.borelli@abstract.it>
- Daniel Campos <danielcampos@avanzosc.es>
- Oihane Crucelaegui <oihanecruce@gmail.com>
- Nicola Malcontenti <nicola.malcontenti@agilebg.com>
- Aitor Bouzas <aitor.bouzas@adaptivecity.com>
- Alexei Rivera <arivera@archeti.com>
- `Tecnativa <https://www.tecnativa.com>`__:
- Pexego.
- Davide Corio <davide.corio@domsense.com>
- Joao Alfredo Gama Batista <joao.gama@savoirfairelinux.com>
- Sandy Carter <sandy.carter@savoirfairelinux.com>
- Giorgio Borelli <giorgio.borelli@abstract.it>
- Daniel Campos <danielcampos@avanzosc.es>
- Oihane Crucelaegui <oihanecruce@gmail.com>
- Nicola Malcontenti <nicola.malcontenti@agilebg.com>
- Aitor Bouzas <aitor.bouzas@adaptivecity.com>
- Alexei Rivera <arivera@archeti.com>
- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- Manuel Calero
- Pedro M. Baeza
- Manuel Calero

- `Quartile <https://www.quartile.co>`__:
- `Quartile <https://www.quartile.co>`__:

- Aung Ko Ko Lin
- Yoshi Tashiro
- Aung Ko Ko Lin
- Yoshi Tashiro

- `Studio73 <https://www.studio73.es>`__:
- `Studio73 <https://www.studio73.es>`__:

- Ethan Hildick
- Ethan Hildick

Maintainers
-----------
Expand All @@ -187,6 +187,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-pedrobaeza|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
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": "17.0.1.1.0",
"version": "18.0.1.1.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"category": "Invoicing",
"license": "AGPL-3",
Expand Down
2 changes: 1 addition & 1 deletion commission/reports/commission_settlement_report.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="action_report_settlement" model="ir.actions.report">
<record id="action_report_settlement" model="ir.actions.report">
<field name="name">Settlement report</field>
<field name="model">commission.settlement</field>
<field name="report_type">qweb-pdf</field>
Expand Down
1 change: 0 additions & 1 deletion commission/reports/report_settlement_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,4 @@
</t>
</t>
</template>

</odoo>
2 changes: 1 addition & 1 deletion commission/security/commission_security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- Copyright 2020-2022 Tecnativa - Pedro M. Baeza
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<data>
<data>
<record id="module_category_commission" model="ir.module.category">
<field name="name">Commissions</field>
<field name="description">Allows to handle commission related stuff.</field>
Expand Down
29 changes: 16 additions & 13 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 (goodger@python.org)
: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 @@ -368,7 +369,7 @@ <h1 class="title">Commissions</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0f54149f86b86660382708274a8cb05ec4cabea68b0ede1531e0147bb309d5ab
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/17.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-17-0/commission-17-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=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<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/18.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-18-0/commission-18-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=18.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 following:</p>
<ul class="simple">
Expand Down Expand Up @@ -410,8 +411,8 @@ <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
</ul>
</li>
<li>Select the base amount for computing the percentage:<ul>
<li><strong>Sale/Invoice Amount</strong>: percentage is computed from the amount
put on sales order/invoice.</li>
<li><strong>Sale/Invoice Amount</strong>: percentage is computed from the amount put
on sales order/invoice.</li>
<li><strong>Margin (Amount - Cost)</strong>: percentage is computed from the profit
only, taken the cost from the product.</li>
</ul>
Expand All @@ -430,12 +431,12 @@ <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<li><p class="first">There’s a new page called “Agent information”. In it, you can set
following data:</p>
<ul class="simple">
<li>The agent type, being in this base module “External agent” the
only existing configuration. It can be extended with hr_commission
<li>The agent type, being in this base module “External agent” the only
existing configuration. It can be extended with hr_commission
module for setting an “Employee” agent type.</li>
<li>The associated commission type.</li>
<li>The settlement period, where you can select “Bi-weekly”,
Monthly”, “Quaterly”, “Semi-annual” or “Annual”.</li>
<li>The settlement period, where you can select “Bi-weekly”, “Monthly”,
“Quaterly”, “Semi-annual” or “Annual”.</li>
</ul>
<p>You will also be able to see the settlements that have been made to
this agent from this page.</p>
Expand Down Expand Up @@ -479,7 +480,7 @@ <h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/commission/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/commission/issues/new?body=module:%20commission%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/commission/issues/new?body=module:%20commission%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -522,13 +523,15 @@ <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>
<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/pedrobaeza"><img alt="pedrobaeza" src="https://github.com/pedrobaeza.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/commission/tree/17.0/commission">OCA/commission</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/commission/tree/18.0/commission">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>
</div>
Expand Down
20 changes: 10 additions & 10 deletions commission/wizards/commission_make_settle_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@
</group>
<footer>
<button
name="action_settle"
string="Make settlements"
type="object"
class="oe_highlight"
/>
name="action_settle"
string="Make settlements"
type="object"
class="oe_highlight"
/>
or
<button
name="action_cancel"
string="Cancel"
class="oe_link"
special="cancel"
/>
name="action_cancel"
string="Cancel"
class="oe_link"
special="cancel"
/>
</footer>
</form>
</field>
Expand Down

0 comments on commit e659aee

Please sign in to comment.