Skip to content

Commit

Permalink
Merge 3a8055e into f376cce
Browse files Browse the repository at this point in the history
  • Loading branch information
serpentcs-dev1 committed May 22, 2017
2 parents f376cce + 3a8055e commit 2dce85c
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 0 deletions.
54 changes: 54 additions & 0 deletions account_invoice_merge_operating_unit/README.rst
@@ -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.
6 changes: 6 additions & 0 deletions account_invoice_merge_operating_unit/__init__.py
@@ -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
19 changes: 19 additions & 0 deletions account_invoice_merge_operating_unit/__openerp__.py
@@ -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,
}
6 changes: 6 additions & 0 deletions account_invoice_merge_operating_unit/models/__init__.py
@@ -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 account_invoice_merge_operating_unit/models/account_invoice.py
@@ -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
1 change: 1 addition & 0 deletions oca_dependencies.txt
@@ -0,0 +1 @@
account-invoicing

0 comments on commit 2dce85c

Please sign in to comment.