forked from OCA/account-invoicing
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] Add account_invoice_merge_payment module
- Loading branch information
1 parent
a38bc3a
commit 729d06a
Showing
5 changed files
with
122 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,38 @@ | ||
Account Invoice Merge Payment | ||
============================= | ||
|
||
This module was written to extend the functionality of Account Invoice Merge | ||
module to support fields added in Account Payment Partner from OCA/bank-payment | ||
|
||
Installation | ||
============ | ||
|
||
To install this module, you need to: | ||
|
||
* Click on install button | ||
|
||
For further information, please visit: | ||
|
||
* https://www.odoo.com/forum/help-1 | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Stéphane Bidoul <[email protected]> | ||
* Adrien Peiffer <[email protected]> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: http://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: http://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 http://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,2 @@ | ||
# -*- coding: utf-8 -*- | ||
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,40 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# This file is part of account_invoice_merge_payment, | ||
# an Odoo module. | ||
# | ||
# Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) | ||
# | ||
# account_invoice_merge_payment is free software: | ||
# you can redistribute it and/or modify it under the terms of the GNU | ||
# Affero General Public License as published by the Free Software | ||
# Foundation,either version 3 of the License, or (at your option) any | ||
# later version. | ||
# | ||
# account_invoice_merge_payment is distributed | ||
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | ||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
# PURPOSE. See the GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with account_invoice_merge_payment. | ||
# If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
{ | ||
'name': "account_invoice_merge_payment", | ||
'summary': """ | ||
Use invoice merge regarding fields on Account Payment Partner""", | ||
'author': "ACSONE SA/NV", | ||
'website': "http://acsone.eu", | ||
'category': 'Invoicing & Payments', | ||
'version': '0.1', | ||
'license': 'AGPL-3', | ||
'depends': [ | ||
'account_invoice_merge', | ||
'account_payment_partner', | ||
], | ||
'data': [], | ||
'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,2 @@ | ||
# -*- coding: utf-8 -*- | ||
from . import account_invoice |
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,40 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# This file is part of account_invoice_merge_payment, | ||
# an Odoo module. | ||
# | ||
# Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) | ||
# | ||
# account_invoice_merge_payment is free software: | ||
# you can redistribute it and/or modify it under the terms of the GNU | ||
# Affero General Public License as published by the Free Software | ||
# Foundation,either version 3 of the License, or (at your option) any | ||
# later version. | ||
# | ||
# account_invoice_merge_payment is distributed | ||
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | ||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
# PURPOSE. See the GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with account_invoice_merge_payment. | ||
# If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
from openerp import models, api | ||
from openerp.addons.account_invoice_merge.invoice import INVOICE_KEY_COLS | ||
|
||
|
||
INVOICE_KEY_COLS.append('payment_mode_id') | ||
|
||
|
||
class AccountInvoice(models.Model): | ||
_inherit = 'account.invoice' | ||
|
||
@api.model | ||
def _get_first_invoice_fields(self, invoice): | ||
res = super(AccountInvoice, self)._get_first_invoice_fields(invoice) | ||
res.update({'payment_mode_id': invoice.payment_mode_id.id}) | ||
return res |