Skip to content

Commit

Permalink
Merge pull request #318 from OCA/12.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/commission (12.0)
  • Loading branch information
bt-admin authored Sep 11, 2023
2 parents cf11985 + 1885844 commit fe683fa
Show file tree
Hide file tree
Showing 26 changed files with 1,178 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ addon | version | maintainers | summary
[sale_commission_delegated_partner](sale_commission_delegated_partner/) | 12.0.1.0.0 | | Allow to delegate the invoices of agent to a delegate partner
[sale_commission_formula](sale_commission_formula/) | 12.0.1.1.0 | | Sale commissions computed by formulas
[sale_commission_pricelist](sale_commission_pricelist/) | 12.0.1.0.0 | | Sales commissions by pricelist
[sale_commission_product_based](sale_commission_product_based/) | 12.0.1.0.0 | | Create commissions based on product
[sale_commission_salesman](sale_commission_salesman/) | 12.0.1.0.0 | | Sales commissions from salesman
[sale_commission_settlement_partial_invoice](sale_commission_settlement_partial_invoice/) | 12.0.2.0.0 | [![eLBati](https://github.com/eLBati.png?size=30px)](https://github.com/eLBati) | Allow to generate partial agent invoice from settlement

Expand Down
5 changes: 5 additions & 0 deletions sale_commission/i18n/sale_commission.pot
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ msgstr ""
msgid "Base"
msgstr ""

#. module: sale_commission
#: selection:sale.commission,commission_type:0
msgid "Based on Product with Fallback Percentage"
msgstr ""

#. module: sale_commission
#: selection:sale.commission,commission_type:0
msgid "By sections"
Expand Down
5 changes: 5 additions & 0 deletions sale_commission_formula/i18n/sale_commission_formula.pot
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ msgstr ""
msgid "Account Invoice Line common fields"
msgstr ""

#. module: sale_commission_formula
#: selection:sale.commission,commission_type:0
msgid "Based on Product with Fallback Percentage"
msgstr ""

#. module: sale_commission_formula
#: selection:sale.commission,commission_type:0
msgid "By sections"
Expand Down
99 changes: 99 additions & 0 deletions sale_commission_product_based/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
==================================
Sales commissions based on product
==================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:61ebf7fff418e596d5b52111150fdeb64202ef732d063251ac5414446b38815a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
: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/12.0/sale_commission_product_based
:alt: OCA/commission
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/commission-12-0/commission-12-0-sale_commission_product_based
: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=12.0
:alt: Try me on Runboat

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

This module allows to have commissions based on a product or a product category.

In the commission, it will be possible to configure a set of rules that refer to a product or a product category, and a fallback percentage.

**Table of contents**

.. contents::
:local:

Configuration
=============

In order to create a commission based on products, set "Commission type" to "Based on Product with Fallback Percentage".

Configure then the "Product rules" and the "Fallback Percentage" as desired.

Each rule is evaluated based on its sequence.

A rule is matched when the product involved is the product of the rule, or has the rule's category.

The commission percentage is the "Percentage" of the matching rule, if any, or the "Fallback Percentage".

Usage
=====

1. Create a commission having "Commission type" set to "Based on Product with Fallback Percentage", see `Configuration` for further details.
2. Create a sale order using that commission, see the module "Sales commissions" for the instructions on how to do that

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:%20sale_commission_product_based%0Aversion:%2012.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.

Credits
=======

Authors
~~~~~~~

* TAKOBI

Contributors
~~~~~~~~~~~~

* `TAKOBI <https://takobi.online>`_:

* Simone Rubino <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions sale_commission_product_based/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
19 changes: 19 additions & 0 deletions sale_commission_product_based/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2022 Simone Rubino - TAKOBI
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
'name': "Sales commissions based on product",
'summary': "Create commissions based on product",
'author': "TAKOBI, Odoo Community Association (OCA)",
'website': "https://github.com/OCA/commission",
'license': "AGPL-3",
'category': 'Sales',
'version': '12.0.1.0.0',
'depends': [
'sale_commission',
],
'data': [
'security/ir.model.access.csv',
'views/sale_commission_views.xml',
],
}
142 changes: 142 additions & 0 deletions sale_commission_product_based/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_commission_product_based
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-03 14:01+0000\n"
"PO-Revision-Date: 2022-08-03 14:01+0000\n"
"Last-Translator: Simone Rubino <[email protected]>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: sale_commission_product_based
#: selection:sale.commission,commission_type:0
msgid "Based on Product with Fallback Percentage"
msgstr "Percentuale basata su prodotto con alternativa"

#. module: sale_commission_product_based
#: selection:sale.commission,commission_type:0
msgid "By sections"
msgstr "Per Sezioni"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission_product_rule__commission_id
msgid "Commission"
msgstr "Provvigione"

#. module: sale_commission_product_based
#: model:ir.model,name:sale_commission_product_based.model_sale_commission
msgid "Commission in sales"
msgstr "Provvigione in vendite"

#. module: sale_commission_product_based
#: model:ir.model,name:sale_commission_product_based.model_sale_commission_product_rule
msgid "Commission rule for product"
msgstr "Regola per commissioni di prodotto"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission_product_rule__create_uid
msgid "Created by"
msgstr "Creato da"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission_product_rule__create_date
msgid "Created on"
msgstr "Creato il"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission_product_rule__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: sale_commission_product_based
#: sql_constraint:sale.commission.product_rule:0
msgid "Exactly one of 'Product' and 'Product Category' must have a value."
msgstr ""
"Esattamente uno tra 'Prodotto' e 'Categoria prodotto' deve avere un valore."

#. module: sale_commission_product_based
#: model_terms:ir.ui.view,arch_db:sale_commission_product_based.sale_commission_form
msgid "Fallback Percentage"
msgstr "Percentuale alternativa"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission__product_fallback_amount
msgid "Fallback Percentage for Product"
msgstr "Percentuale alternativa per prodotto"

#. module: sale_commission_product_based
#: selection:sale.commission,commission_type:0
msgid "Fixed percentage"
msgstr "Percentuale Fissa"

#. module: sale_commission_product_based
#: selection:sale.commission,commission_type:0
msgid "Formula"
msgstr ""

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission_product_rule__id
msgid "ID"
msgstr ""

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission_product_rule____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission_product_rule__write_uid
msgid "Last Updated by"
msgstr "Ultimo aggiornamento di"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission_product_rule__write_date
msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"

#. module: sale_commission_product_based
#: model:ir.model,name:sale_commission_product_based.model_sale_commission_line_mixin
msgid ""
"Mixin model for having commission agent lines in any object inheriting from "
"this one"
msgstr ""
"Modello Mixin per avere righe di commissione per agenti in qualsiasi oggetto "
"che erediti da questo"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission_product_rule__amount
msgid "Percentage"
msgstr "Percentuale"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission_product_rule__product_id
msgid "Product"
msgstr "Prodotto"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission_product_rule__product_category_id
msgid "Product Category"
msgstr "Categoria prodotto"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission__product_rule_ids
msgid "Product rules"
msgstr "Regole prodotto"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission_product_rule__sequence
msgid "Sequence"
msgstr "Sequenza"

#. module: sale_commission_product_based
#: model:ir.model.fields,field_description:sale_commission_product_based.field_sale_commission__commission_type
msgid "Type"
msgstr "Tipologia"
Loading

0 comments on commit fe683fa

Please sign in to comment.