forked from OCA/commission
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] contract_commission: Migration to 12.0
- Loading branch information
1 parent
9760ed1
commit 150cfa2
Showing
16 changed files
with
586 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,40 @@ | ||
.. 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 | ||
|
||
======================= | ||
Commission in contracts | ||
======================= | ||
================================ | ||
Commissions in contract invoices | ||
================================ | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! 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/12.0/contract_commission | ||
: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-contract_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/12.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module allows to get default commissions for partner in the recurring | ||
invoices generated from contracts. | ||
|
||
Installation | ||
============ | ||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
This module is auto-installed when you have *contract* and *sale_commission* | ||
modules installed. | ||
|
@@ -21,55 +45,44 @@ Usage | |
When invoicing contracts, the agents assigned to the partner of the contract | ||
will now be assigned to the generated invoices. | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/110/9.0 | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
* Allow to set specific commissions for each contract instead of taking the | ||
ones set at partner level. | ||
|
||
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 <https://github.com/OCA/commission/issues/new?body=module:%20contract_commission%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 | ||
======= | ||
|
||
Images | ||
------ | ||
Authors | ||
~~~~~~~ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
* Tecnativa | ||
|
||
Contributors | ||
------------ | ||
~~~~~~~~~~~~ | ||
|
||
* Pedro M. Baeza <[email protected]> | ||
* Vicent Cubells <[email protected]> | ||
* Marcel Savegnago <[email protected]> | ||
|
||
Icon | ||
---- | ||
* http://commons.wikimedia.org/wiki/File:Percent_18e.svg | ||
* https://openclipart.org/detail/43969/pile-of-golden-coins-by-j_alves | ||
* Subicon made by `Freepik from www.flaticon.com | ||
<http://www.flaticon.com/authors/freepik>`_ | ||
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/12.0/contract_commission>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
contract_commission/__openerp__.py → contract_commission/__manifest__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2015 Tecnativa - Pedro M. Baeza | ||
# Copyright 2017 Tecnativa - Vicent Cubells | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
{ | ||
'name': 'Commissions in contract invoices', | ||
'version': '9.0.1.0.0', | ||
'version': '12.0.1.0.0', | ||
'author': 'Tecnativa, ' | ||
'Odoo Community Association (OCA)', | ||
"website": "https://www.tecnativa.com/", | ||
"category": "Generic Modules/Sales & Purchases", | ||
'website': 'https://www.tecnativa.com/', | ||
'category': 'Generic Modules/Sales & Purchases', | ||
'images': ['static/description/banner.png'], | ||
'license': 'AGPL-3', | ||
'depends': [ | ||
'contract', | ||
'sale_commission', | ||
], | ||
"installable": True, | ||
"auto_install": True, | ||
'installable': True, | ||
'auto_install': True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2015 Tecnativa - Pedro M. Baeza | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from . import analytic | ||
from . import contract_line |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2015 Tecnativa - Pedro M. Baeza | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from odoo import api, models | ||
|
||
|
||
class ContractLine(models.Model): | ||
_inherit = 'contract.line' | ||
|
||
@api.model | ||
def _prepare_invoice_line(self, invoice_id=False, invoice_values=False): | ||
vals = super(ContractLine, self)._prepare_invoice_line( | ||
invoice_id=invoice_id, invoice_values=invoice_values) | ||
invoice_line_model = self.env['account.invoice.line'].with_context({ | ||
'partner_id': self.contract_id.partner_id.id | ||
}) | ||
vals = {} if vals is None else vals | ||
vals['agents'] = invoice_line_model._default_agents() | ||
return vals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This module is auto-installed when you have *contract* and *sale_commission* | ||
modules installed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* Pedro M. Baeza <[email protected]> | ||
* Vicent Cubells <[email protected]> | ||
* Marcel Savegnago <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This module allows to get default commissions for partner in the recurring | ||
invoices generated from contracts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
When invoicing contracts, the agents assigned to the partner of the contract | ||
will now be assigned to the generated invoices. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.