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

[15.0][MIG] commission, sale_commission : Migration to 15.0 #372

Closed
wants to merge 150 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
6d12e2e
sale_commissions: added module migrated to 6.1. (../../7.0-pexego_sal…
martiita Jul 13, 2012
d95ea26
sale_commission. Ported to version 7.0 (../../7.0-pexego_sale_commiss…
Feb 19, 2013
e8c7ed3
[FIX+IMP] sale_commission: 4 things
Dec 16, 2013
0fcf4ee
onchange_partner_id() got an unexpected keyword argument 'context'
Dec 23, 2013
7e61e2a
#1180743 + missing context
Jan 23, 2014
157de0e
Removed wrong bracket from L197 of the settled.py
tafaRU Feb 6, 2014
ebd6ce5
Launchpad automatic translations update.
Apr 21, 2013
20f694e
Improve partnert view
mileo Aug 28, 2014
d01ff8d
adapt QA files to 8.0
gurneyalex Sep 2, 2014
a016151
[MIG] sale_commission: Migration to 8.0
gborelli Nov 6, 2014
fcf1f7a
<hr_commission><sale_commission><stock_commission>.
Feb 17, 2015
49b6922
[RFR] sale_commission: Total refactorization of the modules
pedrobaeza Feb 19, 2015
60366ca
sale.commission.settlement access error opening res.partner form for …
pablocm-aserti Oct 26, 2015
6813dd2
"sale" journal type on making agent invoice
Oct 27, 2015
78c2f78
Created new field to specify the commission creation according to the…
mbcosta Nov 13, 2015
ad2ca14
sale_commission: base amount for computation selectable You can now s…
oihane Nov 30, 2015
03ad982
Fix singleton error
Dec 22, 2015
47b70e1
sale_commission: Fix tests
pedrobaeza Jan 26, 2016
3b46b0b
sale_commission: Refunds from invoices. Fixes #51
pedrobaeza Jan 20, 2016
272669d
Change visibility of agents field to only show when partner is a cust…
ivantodorovich Jan 25, 2016
f1252d5
sale_commission: Don't put supplier flag if not agent
pedrobaeza Jan 28, 2016
c7c818c
[IMP+FIX] sale_commission: 4 things:
ivantodorovich Jan 29, 2016
3ad26ad
add method to prepare agents
rgarnau Jul 13, 2017
57db3eb
sale_commission: : Migrated to 10.0
Mar 27, 2017
f1a1bd1
FIX sale_commission quaterly settlement
eLBati Jul 27, 2017
b730ce4
Tradução pt_BR
hendrixcosta Aug 29, 2017
bb41b03
[MIG] sale_commission: Migrationt to 11.0
etobella Oct 17, 2017
1180f19
[FIX] sale_commission: installation fails if en_US language is not in…
oihane Dec 13, 2017
034a585
OCA Transbot updated translations from Transifex
oca-transbot Dec 16, 2017
4f38c14
small fix
rgarnau Jan 23, 2018
a8ab2c4
OCA Transbot updated translations from Transifex
oca-transbot Mar 24, 2018
4734492
[IMP] Add hook on make invoice settlement
etobella May 16, 2018
6cef8a5
sale_commision: temporary fix until https://github.com/odoo/odoo/issu…
JordiBForgeFlow May 14, 2018
eaab5f5
OCA Transbot updated translations from Transifex
oca-transbot May 19, 2018
cde724d
Make Section Model Accessible By Everyone
lk-eska May 31, 2018
ba30c40
FIX sale_commission the following use case (#170)
eLBati Jul 13, 2018
d71aa75
Translated using Weblate (Spanish)
etobella Jul 13, 2018
0d2fa8b
Translated using Weblate (Portuguese (Brazil))
Aug 3, 2018
d7efac4
[IMP] sale_commission: Work on integration tests + improve invoice ge…
pedrobaeza Aug 15, 2018
c6fd728
[IMP] commission: Add two hooks on make settlements (#176)
etobella Sep 4, 2018
39dbe61
Translated using Weblate (German)
rschnapka Sep 21, 2018
356eb51
FIX taxes in settlement invoice creation
ljimenezsidoo Nov 5, 2018
6c3971c
Translated using Weblate (Italian)
dcorio Nov 4, 2018
ef1e541
[FIX]sale_commission: When creating agent from agents fields, on part…
javierjcf Nov 13, 2018
0828107
[IMP] sale_commission: Add hook on the create settlements (#189)
etobella Nov 21, 2018
5cccb3c
[FIX+IMP] sale_commission: Reworked module
pedrobaeza Nov 26, 2018
15aa0c7
[IMP] sale_commission: Adding graph view and settlement report
aitorbouzas Aug 7, 2018
9294f4b
[UPD] Update sale_commission.pot + Update translation files
oca-transbot Dec 7, 2018
ebf4008
Translated using Weblate (Spanish)
pedrobaeza Dec 11, 2018
d330af6
[MIG] sale_commission: Migration to 12.0
pedrobaeza Dec 14, 2018
c0bc956
[FIX] avoid KeyError
dcorio Feb 4, 2019
1adc6c8
[FIX] sale_commission: Strictly check commission type
SimoRubi Mar 11, 2019
89789b7
[REF] sale_commission: Use SavepointCase
pedrobaeza Feb 4, 2019
d0fa66b
[IMP] sale_commission: Agent propagation + tests
ernestotejeda Jan 19, 2019
f693757
Added translation using Weblate (Portuguese (Portugal))
rdc02271 May 5, 2019
fd4aa06
Update translation files
oca-travis May 21, 2019
2d4022e
[12.0][FIX] sale_commission: show agents field on partner form
rubencr7 Jun 17, 2019
dcb9dca
Translated using Weblate (Italian)
eLBati Jul 19, 2019
388b004
Translated using Weblate (Portuguese (Brazil))
marcelsavegnago Aug 2, 2019
2bb84a7
Added translation using Weblate (Portuguese)
pedrocs-exo Aug 14, 2019
0f613d0
[FIX] sale_commission: Add view context by code
pedrobaeza Aug 19, 2019
a16acb3
Added translation using Weblate (Chinese (Simplified))
liweijie0812 Sep 17, 2019
2d04541
Added translation using Weblate (Dutch)
thomaspot Dec 15, 2019
545e985
[UPD] Update sale_commission.pot + Update translation files
oca-travis Dec 30, 2019
761dc0c
[12.0][IMP] sale_commission: move check of the amount to the end (#204)
etobella Feb 28, 2019
826641d
Translated using Weblate (Italian)
SimoRubi Jan 16, 2020
8419aa3
[IMP] sale_commission: Show signed subtotal
SimoRubi Feb 13, 2020
ab6ded1
Translated using Weblate (Portuguese (Brazil))
marcelsavegnago Feb 20, 2020
f80f73a
[FIX] sale_commission: No commission should be populated on vendor bills
pedrobaeza Mar 24, 2020
a8eb0b6
[IMP] sale_commission: Multi-company record rules
pedrobaeza Jul 1, 2020
29aaa63
[IMP] : black, isort, prettier
May 11, 2020
1a428f5
[IMP] sale_commission: Migration to 13.0 (partial)
Mar 26, 2020
8187afc
[MIG+IMP] sale_commission: Switch to computed writable + finish migra…
pedrobaeza Apr 3, 2020
ed284f8
[UPD] Update sale_commission.pot
oca-travis Jul 6, 2020
438cd22
[MIG+FIX] sale_commission: Proper table name
pedrobaeza Jul 12, 2020
9105e48
Update translation files
oca-transbot Jul 12, 2020
a7935ed
Added translation using Weblate (Spanish (Argentina))
ibuioli Sep 12, 2020
0b52542
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 12, 2020
aba410d
Translated using Weblate (Spanish (Argentina))
ibuioli Oct 5, 2020
14c4c93
[FIX] sale_commission: Settlement report printing
pedrobaeza Oct 27, 2020
7f0f487
[MIG+FIX] sale_commission: Fix migration script
pedrobaeza Nov 13, 2020
01dea73
[FIX] sale_commission: Incorrect compute renaming
pedrobaeza Nov 13, 2020
6abad57
[13.0][FIX] sale_commission: fixing inheritance of view_res_partner_f…
dennybiasiolli Nov 16, 2020
8c8d35f
Update translation files
oca-travis Nov 16, 2020
0e51f33
[13.0][FIX] sale_commission: adding migration after renaming changed …
dennybiasiolli Nov 16, 2020
cdbdf00
[IMP] sale_commission: Remove required attribute in settlement field.…
sergio-teruel Dec 3, 2020
c89e90d
sale_commission 13.0.1.3.0
OCA-git-bot Dec 4, 2020
7f76c60
[FIX] sale_commission: Fix tests
joao-p-marques Feb 11, 2021
fce9560
sale_commission 13.0.1.3.1
OCA-git-bot Feb 11, 2021
7dbd5a1
[IMP] sale_commission: Add optional in commission_status field relate…
victoralmau Feb 17, 2021
ac0d24c
sale_commission 13.0.1.4.0
OCA-git-bot Feb 17, 2021
377356f
Translated using Weblate (Spanish)
anasuarez1 Mar 17, 2021
e70f7f4
FIX sale_commission: fix wrong constrain logic on settlement lines
SilvioGregorini Mar 17, 2021
5dc7e04
sale_commission 13.0.1.4.1
OCA-git-bot Mar 17, 2021
b04d811
[FIX] required only if partner is agent
renatonlima Apr 23, 2021
e3c9b23
sale_commission 13.0.1.5.0
OCA-git-bot Apr 23, 2021
6b7f1f7
Core context is not removed from invoice_line_ids
ao-landoo Feb 10, 2021
488fe11
sale_commission 13.0.1.5.1
OCA-git-bot May 4, 2021
a719260
[IMP] sale_commission: black, isort, prettier
fredzamoabg May 24, 2021
91a3baf
[MIG] sale_commission: Migration to 14.0
Dec 17, 2020
0031967
[UPD] Update sale_commission.pot
oca-travis May 29, 2021
5db3092
[UPD] README.rst
OCA-git-bot May 29, 2021
be3e9e8
Added translation using Weblate (French)
Yvesldff May 31, 2021
f7ab3ee
Translated using Weblate (French)
Yvesldff May 31, 2021
0b707d4
[14.0][IMP] sale_commission: Only show commission for customers
hildickethan Jun 2, 2021
368dcd8
Translated using Weblate (French)
Yvesldff Jun 3, 2021
cc01aff
sale_commission 14.0.1.1.0
OCA-git-bot Jun 7, 2021
ebac8bf
FIX sale_commission preventing to cancel invoice with settled commiss…
eLBati Jul 1, 2021
13d7baa
[UPD] Update sale_commission.pot
oca-travis Jul 8, 2021
15fd036
sale_commission 14.0.1.1.1
OCA-git-bot Jul 8, 2021
4b4f36b
Update translation files
oca-transbot Jul 8, 2021
098aab9
[FIX] sale_commission
max3903 Jul 22, 2021
6dacfe8
sale_commission 14.0.1.1.2
OCA-git-bot Jul 22, 2021
219ffdc
[FIX] sale_commission
max3903 Jul 23, 2021
251f53e
sale_commission 14.0.1.1.3
OCA-git-bot Jul 24, 2021
baefdeb
[14.0][FIX] sale_commission: amount compute
Zar21 Oct 14, 2021
32b91d1
sale_commission 14.0.1.1.4
OCA-git-bot Oct 14, 2021
9bfb1b9
Translated using Weblate (Italian)
francesco-ooops Nov 4, 2021
cfa7b04
Translated using Weblate (Italian)
francesco-ooops Dec 20, 2021
07c0f34
Translated using Weblate (Italian)
primes2h Dec 20, 2021
7bc1ea2
Translated using Weblate (Italian)
primes2h Dec 21, 2021
243ecce
Translated using Weblate (Italian)
primes2h Dec 21, 2021
1a01485
Translated using Weblate (Italian)
primes2h Dec 22, 2021
daa103f
Translated using Weblate (Italian)
primes2h Dec 23, 2021
cc02a07
Translated using Weblate (Italian)
MarcoCalcagni Dec 24, 2021
9b43920
Translated using Weblate (Italian)
primes2h Dec 24, 2021
14d4553
Translated using Weblate (Italian)
primes2h Dec 25, 2021
f1c8c89
[IMP] sale_commission allowing to filter sale orders and invoices by …
antoniospneto Feb 14, 2022
3c34345
[UPD] Update sale_commission.pot
oca-travis Feb 16, 2022
721dbb1
sale_commission 14.0.1.2.0
OCA-git-bot Feb 16, 2022
e6f6cce
Update translation files
oca-transbot Feb 16, 2022
aa1908a
[FIX] invoice_date
felipemotter Feb 17, 2022
9577679
sale_commission 14.0.1.2.1
OCA-git-bot Feb 18, 2022
f0d8c46
[IMP] update dotfiles [ci skip]
OCA-git-bot Mar 30, 2022
6cbb77b
[IMP] sale_commission: Allow to group invoices
etobella Jul 12, 2021
4d9eef6
[IMP] sale_commission: Add a hook
olgamarcocb Oct 27, 2021
1ad9cf7
[FIX] sale_commission: Convert field to write, this way it is checked…
etobella Oct 28, 2021
ee4b59c
[FIX] sale_commission: Switch at the end, in order to fix grouped inv…
etobella Nov 21, 2021
73f74bc
[IMP] sale_commission: New bi-weekly settlement period
pedrobaeza Apr 14, 2022
33e2dbc
[IMP] sale_commission: Adapt Forward-port to 14
olgamarcocb May 10, 2022
596d63b
[UPD] Update sale_commission.pot
oca-travis May 12, 2022
d173111
sale_commission 14.0.1.4.0
OCA-git-bot May 12, 2022
b515524
Update translation files
oca-transbot May 12, 2022
45196b9
[FIX] sale_commission: compute amount after changing commission, fixe…
oihane May 25, 2022
90ca04f
sale_commission 14.0.1.4.1
OCA-git-bot May 26, 2022
9994fe4
[14.0][IMP] sale_commission: show Group Invoices label
ilyasProgrammer Aug 30, 2022
dae8125
[14.0][ADD] sale_commission_queued
ilyasProgrammer Aug 29, 2022
a443212
sale_commission 14.0.1.5.0
OCA-git-bot Aug 30, 2022
7ea4569
[IMP] sale_commission: black, isort, prettier
AungKoKoLin1997 Sep 7, 2022
a4145e6
[MIG] commission and sale_commission: Migration to 15.0
AungKoKoLin1997 Sep 7, 2022
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
154 changes: 154 additions & 0 deletions commission/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
===========
Commissions
===========

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/15.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-15-0/commission-15-0-commission
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/165/15.0
:alt: Try me on Runbot

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

This module allows to define agents with their commissions and assign
them in customers.

You can define which base amount is going to be taken into account: net amount
(based on margin) or gross amount (line subtotal amount)

**Table of contents**

.. contents::
:local:

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

For adding commissions:

#. Go to *Sales > Commission Management > Commission types*.
#. Edit or create a new record.
#. Select a name for distinguishing that type.
#. 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".

#. Select the base amount for computing the percentage:

* **Gross Amount**: percentage is computed from the amount put on
sales order/invoice.
* **Net Amount**: percentage is computed from the profit only, taken the
cost from the product.

#. Select the invoice status for settling the commissions:

* **Invoice Based**: Commissions are settled when the invoice is issued.
* **Payment Based**: Commissions are settled when the invoice is paid.

For adding new agents:

#. Go to *Sales > Commission Management > Agents*. You can also access from
*Contacts > Contacts* or *Sales > Orders > Customers*.
#. Edit or create a new record.
#. On "Sales & Purchases" page, mark "Agent" check. It should be checked if
you have accessed from first menu option.
#. 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 "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.

Known issues / Roadmap
======================

* Make it totally multi-company aware.
* Be multi-currency aware for settlements.
* Allow to calculate and pay in other currency different from company one.
* 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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/commission/issues/new?body=module:%20commission%0Aversion:%2015.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
~~~~~~~

* Tecnativa

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>

* `Tecnativa <https://www.tecnativa.com>`__:

* Pedro M. Baeza
* Manuel Calero

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.

.. |maintainer-pedrobaeza| image:: https://github.com/pedrobaeza.png?size=40px
:target: https://github.com/pedrobaeza
:alt: pedrobaeza

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/15.0/commission>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions commission/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions commission/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Commissions",
"version": "15.0.1.0.0",
"author": "Tecnativa," "Odoo Community Association (OCA)",
"category": "Sales Management",
"license": "AGPL-3",
"depends": ["product", "sale_management"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"depends": ["product", "sale_management"],
"depends": ["product", "account"],

It shouldn't depend on sale_management. Menu items should be moved under invoicing.

"website": "https://github.com/OCA/commission",
"maintainers": ["pedrobaeza"],
"data": [
"security/ir.model.access.csv",
"views/commission_view.xml",
"views/commission_mixin_view.xml",
"views/product_template_view.xml",
"views/res_partner_view.xml",
],
"demo": ["demo/commission_and_agent_demo.xml"],
"installable": True,
}
41 changes: 41 additions & 0 deletions commission/demo/commission_and_agent_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" ?>
<odoo>
<!-- Create the Commission Types -->
<record id="demo_commission" model="commission">
<field name="name">10% fixed commission - Invoice Based</field>
<field name="fix_qty">10.0</field>
</record>
<record id="demo_commission_paid" model="commission">
<field name="name">20% fixed commission - Payment Based</field>
<field name="fix_qty">20.0</field>
<field name="invoice_state">paid</field>
</record>
<!-- Create de Agents -->
<record id="res_partner_pritesh_sale_agent" model="res.partner">
<field name="name">Pritesh Sales Agent</field>
<field name="city">Ahmedabad</field>
<field name="zip">380007</field>
<field name="country_id" model="res.country" search="[('name','=','India')]" />
<field name="street">56 Beijing street</field>
<field name="agent" eval="1" />
<field name="commission_id" ref="demo_commission_paid" />
</record>
<record id="res_partner_eiffel_sale_agent" model="res.partner">
<field name="name">Eiffel pvt ltd</field>
<field name="city">Ahmedabad</field>
<field name="zip">380007</field>
<field name="country_id" model="res.country" search="[('name','=','India')]" />
<field name="street">Wall Street 2</field>
<field name="agent" eval="1" />
<field name="commission_id" ref="demo_commission" />
</record>
<record id="res_partner_tiny_sale_agent" model="res.partner">
<field name="name">Tiny Belgium</field>
<field name="city">Belgium</field>
<field name="zip">2457</field>
<field name="country_id" model="res.country" search="[('name','=','India')]" />
<field name="street">Belgium Gao</field>
<field name="agent" eval="1" />
<field name="commission_id" ref="demo_commission" />
</record>
</odoo>
Loading