Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
95 changes: 95 additions & 0 deletions commission_formula_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
======================
Commission Formula OCA
======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e70d837650c3e901505cadd6358a30eebcc605e2a5583c55da2d2fcd770c63f8
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/18.0/commission_formula_oca
:alt: OCA/commission
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/commission-18-0/commission-18-0-commission_formula_oca
: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=18.0
:alt: Try me on Runboat

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

This module extends commission to introduce the use of formulas to
compute the agent commissions.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

- Go to Commission > Configuration > Commission Types, and create a
commission with type formula

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_formula_oca%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.

Credits
=======

Authors
-------

* Abstract

Contributors
------------

- Davide Corio <[email protected]>
- Nicola Malcontenti <[email protected]>
- Duc, Dao Dong <[email protected]>
(https://komit-consulting.com)
- `NextERP Romania <https://www.nexterp.ro>`__:

- Fekete Mihai <[email protected]>

- `Sygel <https://www.sygel.es>`__:

- Alberto Martínez <[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/18.0/commission_formula_oca>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions commission_formula_oca/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2016 Nicola Malcontenti - Agile Business Group
# Copyright 2016 Davide Corio - Abstract
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html

from . import models
22 changes: 22 additions & 0 deletions commission_formula_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2016 Nicola Malcontenti - Agile Business Group
# Copyright 2016 Davide Corio - Abstract
# Copyright 2021 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Commission Formula OCA",
"version": "18.0.1.0.0",
"category": "Commission",
"license": "AGPL-3",
"summary": "Commissions computed by formulas",
"author": "Abstract,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/commission",
"depends": ["commission_oca", "account"],
"data": ["views/commission_view.xml"],
"demo": ["demo/commission_demo.xml"],
"assets": {
"web.assets_backend": [
"commission_formula_oca/static/src/css/commission_formula_oca.css",
],
},
"installable": True,
}
24 changes: 24 additions & 0 deletions commission_formula_oca/demo/commission_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="commission_5perc10extra" model="commission">
<field name="name">5% + 10% extra</field>
<field name="commission_type">formula</field>
<field name="active">True</field>
<field name="formula">if line._name == 'sale.order.line':
partial = (line.price_subtotal / 100)*5
result = partial + (partial / 100)*10
if line._name == 'account.move.line':
partial = (line.price_subtotal / 100)*5
result = partial + (partial / 100)*10
</field>
</record>

<record id="agent1" model="res.partner">
<field name="name">Agent 1</field>
<field name="is_company">True</field>
<field name="agent">True</field>
<field name="supplier_rank">1</field>
<field name="customer_rank">0</field>
<field name="commission_id" ref="commission_5perc10extra" />
</record>
</odoo>
148 changes: 148 additions & 0 deletions commission_formula_oca/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_commission_formula
#
# Translators:
# OCA Transbot <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-14 15:14+0000\n"
"PO-Revision-Date: 2024-02-13 20:34+0000\n"
"Last-Translator: \"Dept. Técnico\" <[email protected]>\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: commission_formula
#: model_terms:ir.ui.view,arch_db:commission_formula.commission_form
msgid ""
"<span class=\"instructions\">\n"
" Use 'line' to access all the line fields.\n"
" As field names may vary, you should differentiate the\n"
" formulas for sale.order.line and account.move.line.\n"
" You can, for instance, use line._name == 'sale.order.line'\n"
" or line._name == 'account.move.line'.\n"
"\n"
" Use 'result' to return the commission amount.\n"
" </span>"
msgstr ""
"<span class=\"instructions\">\n"
" Utilitzi 'line' per accedir a tots els camps de la línia.\n"
" Com que els noms dels camps poden variar, hauria d'identificar\n"
" les formules per sale.order.line i per account.invoice.line.\n"
" Pot, per exemple, utilitza line._name == 'sale.order.line'\n"
" o line._name == 'account.invoice.line'.\n"
"\n"
" Utilitzi 'result'per obtenir l'import de la comissió.\n"
" </span>"

#. module: commission_formula
#: model_terms:ir.ui.view,arch_db:commission_formula.commission_form
msgid "Account Move Line common fields"
msgstr "Camps comuns de las línies de factura"

#. module: commission_formula
#: model:ir.model,name:commission_formula.model_commission
msgid "Commission"
msgstr "Comissió"

#. module: commission_formula
#: model_terms:ir.ui.view,arch_db:commission_formula.commission_form
msgid "Discount (%)"
msgstr "Descompte (%)"

#. module: commission_formula
#: model_terms:ir.ui.view,arch_db:commission_formula.commission_form
msgid "Field"
msgstr "Camp"

#. module: commission_formula
#: model:ir.model.fields,field_description:commission_formula.field_commission__formula
#: model:ir.model.fields.selection,name:commission_formula.selection__commission__commission_type__formula
msgid "Formula"
msgstr "Fórmula"

#. module: commission_formula
#: model_terms:ir.ui.view,arch_db:commission_formula.commission_form
msgid "Instructions"
msgstr "Instruccions"

#. module: commission_formula
#: model_terms:ir.ui.view,arch_db:commission_formula.commission_form
msgid "Label"
msgstr "Etiqueta"

#. module: commission_formula
#: model:ir.model,name:commission_formula.model_commission_line_mixin
msgid ""
"Mixin model for having commission agent lines in any object inheriting from "
"this one"
msgstr ""
"Model mixin per tenir línies d'agent de comissions en qualsevol objecta "
"heretant de aquest"

#. module: commission_formula
#: model_terms:ir.ui.view,arch_db:commission_formula.commission_form
msgid "Quantity"
msgstr "Quantitat"

#. module: commission_formula
#: model_terms:ir.ui.view,arch_db:commission_formula.commission_form
msgid "Sale Oder Line common fields"
msgstr "Camps comuns de la línia de comanda de venda"

#. module: commission_formula
#: model:ir.model.fields,help:commission_formula.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\"."
msgstr ""
"Selecciona el temps de ponenteja de la comissió:\n"
"* \"Ponenteja fixa\":totes les comissions es compten com un ponenteja fix. "
"Pot omplir el ponenteja en el camp \"Ponenteja fixa\".\n"
"* 'Per trams': el percentatge varia en funció dels intervals d'import. Pot "
"omplir els intervals i percentatge en l'apartat \"Definició de la tarifa\"."

#. module: commission_formula
#: model_terms:ir.ui.view,arch_db:commission_formula.commission_form
msgid "Subtotal"
msgstr "Subtotal"

#. module: commission_formula
#: model:ir.model.fields,field_description:commission_formula.field_commission__commission_type
msgid "Type"
msgstr "Tipus"

#. module: commission_formula
#: model_terms:ir.ui.view,arch_db:commission_formula.commission_form
msgid "Unit Price"
msgstr "Preu unitari"

#~ msgid "discount"
#~ msgstr "Descompte"

#~ msgid "price_subtotal"
#~ msgstr "price_subtotal"

#~ msgid "price_unit"
#~ msgstr "price_unit"

#~ msgid "product_uom_qty"
#~ msgstr "product_uom_qty"

#~ msgid "quantity"
#~ msgstr "quantitat"

#, fuzzy
#~| msgid "Instructions"
#~ msgid "By sections"
#~ msgstr "Instruccions"
Loading