Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
108 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.. image:: https://img.shields.io/badge/license-LGPLv3-blue.svg | ||
:target: https://www.gnu.org/licenses/lgpl.html | ||
:alt: License: LGPL-3 | ||
|
||
===================================== | ||
Account Invoice Merge Operating Units | ||
===================================== | ||
|
||
This module adds operating unit to the invoices line list to merge invoices. | ||
|
||
|
||
Usage | ||
===== | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/213/9.0 | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/operating-unit/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. | ||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
|
||
Contributors | ||
------------ | ||
|
||
* Eficent Business and IT Consulting Services S.L. <contact@eficent.com> | ||
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. 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 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,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2017 Eficent Business and IT Consulting Services S.L. - | ||
# Jordi Ballester Alomar | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import models |
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 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2017 Eficent Business and IT Consulting Services S.L. - | ||
# Jordi Ballester Alomar | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
'name': "Account Invoice Merge Operating Unit", | ||
'author': "Eficent Business and IT Consulting Services, S.L.," | ||
"Odoo Community Association (OCA)", | ||
'website': "http://www.eficent.com", | ||
'category': 'Finance', | ||
'version': '9.0.1.0.0', | ||
'license': 'AGPL-3', | ||
'depends': [ | ||
'account_invoice_merge', | ||
'account_operating_unit', | ||
], | ||
'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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2017 Eficent Business and IT Consulting Services S.L. - | ||
# Jordi Ballester Alomar | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import account_invoice |
22 changes: 22 additions & 0 deletions
22
account_invoice_merge_operating_unit/models/account_invoice.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2017 Eficent Business and IT Consulting Services S.L. - | ||
# Jordi Ballester Alomar | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
from openerp import api, models | ||
|
||
|
||
class AccountInvoice(models.Model): | ||
_inherit = 'account.invoice' | ||
|
||
@api.model | ||
def _get_invoice_line_key_cols(self): | ||
res = super(AccountInvoice, self)._get_invoice_line_key_cols() | ||
res.append('operating_unit_id') | ||
return res | ||
|
||
@api.model | ||
def _get_first_invoice_fields(self, invoice): | ||
res = super(AccountInvoice, self)._get_first_invoice_fields(invoice) | ||
res.update({'operating_unit_id': invoice.operating_unit_id.id}) | ||
return res |
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 @@ | ||
account-invoicing |