Skip to content

Commit

Permalink
porting sale_commission_pricelist to 11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eLBati committed Aug 17, 2018
1 parent a8428da commit 6e498ed
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 37 deletions.
68 changes: 42 additions & 26 deletions sale_commission_pricelist/README.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3

==============================
Sales commissions by pricelist
==============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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/11.0/sale_commission_pricelist
:alt: OCA/commission
.. |badge4| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/165/11.0
:alt: Try me on Runbot

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

This module extends the functionality of sale_commission to allow you set a
commission to pricelist item.

The commission is applied when the pricelist rule is applied, that is after changing product or quantity of sale order line.

**Table of contents**

.. contents::
:local:

Usage
=====

Expand All @@ -22,50 +45,43 @@ To use this module, you need to:
#. In the pricelist -> add a new item or open a new one
#. You will find the field commission in the pricelist item

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/165/10.0

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 smash it by providing detailed and welcomed feedback.
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.

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

Credits
=======

Images
------
Authors
~~~~~~~

* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.
* Tecnativa

Contributors
------------
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`_:
* Carlos Dauden
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>

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

Maintainer
----------
This module is maintained by the OCA.

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

This module is maintained by the OCA.

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.

To contribute to this module, please visit https://odoo-community.org.

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

.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 0 additions & 1 deletion sale_commission_pricelist/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# -*- coding: utf-8 -*-

from . import models
3 changes: 1 addition & 2 deletions sale_commission_pricelist/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Carlos Dauden - Tecnativa <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
'name': 'Sales commissions by pricelist',
'version': '10.0.1.0.0',
'version': '11.0.1.0.0',
'author': 'Tecnativa, '
'Odoo Community Association (OCA)',
'category': 'Sales',
Expand Down
1 change: 0 additions & 1 deletion sale_commission_pricelist/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-

from . import product_pricelist
from . import sale_order
1 change: 0 additions & 1 deletion sale_commission_pricelist/models/product_pricelist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Carlos Dauden - Tecnativa <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

Expand Down
1 change: 0 additions & 1 deletion sale_commission_pricelist/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Tecnativa - Carlos Dauden <carlos.dauden@tecnativa.com>
# Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
Expand Down
3 changes: 3 additions & 0 deletions sale_commission_pricelist/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Tecnativa <https://www.tecnativa.com>`_:
* Carlos Dauden
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
4 changes: 4 additions & 0 deletions sale_commission_pricelist/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This module extends the functionality of sale_commission to allow you set a
commission to pricelist item.

The commission is applied when the pricelist rule is applied, that is after changing product or quantity of sale order line.
9 changes: 9 additions & 0 deletions sale_commission_pricelist/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
To use this module, you need to:

#. Go to Sales -> Configuration -> Settings -> Pricing -> Sale Price and
activate: "Advanced pricing based on formulas (discounts, margins,
rounding)"
#. Go to Sales -> Configuration -> Price-list and edit an existing one or
create a new one
#. In the pricelist -> add a new item or open a new one
#. You will find the field commission in the pricelist item
1 change: 0 additions & 1 deletion sale_commission_pricelist/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# -*- coding: utf-8 -*-

from . import test_sale_commission_pricelist
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Carlos Dauden - Tecnativa <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

Expand Down Expand Up @@ -37,7 +36,6 @@ def setUpClass(cls):
(0, 0, {
'name': '10% discount and commission on Test product 2',
'applied_on': '1_product',
'sequence': 1,
'product_id': cls.product2.id,
'compute_price': 'formula',
'base': 'list_price',
Expand Down Expand Up @@ -86,7 +84,7 @@ def setUpClass(cls):
onchange_method(cls.so_line2)

def test_sale_commission_pricelist(self):
self.assertEquals(
self.assertEqual(
self.so_line1.agents[:1].commission, self.commission_1)
self.assertEquals(
self.assertEqual(
self.so_line2.agents[:1].commission, self.commission_2)

0 comments on commit 6e498ed

Please sign in to comment.