diff --git a/contract_payment_mode/README.rst b/contract_payment_mode/README.rst index 19a458be..8b9bb46f 100644 --- a/contract_payment_mode/README.rst +++ b/contract_payment_mode/README.rst @@ -30,7 +30,7 @@ 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/110/10.0 + :target: https://runbot.odoo-community.org/runbot/110/11.0 Bug Tracker =========== diff --git a/contract_payment_mode/__init__.py b/contract_payment_mode/__init__.py index c8000a8a..801a8cbb 100644 --- a/contract_payment_mode/__init__.py +++ b/contract_payment_mode/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models diff --git a/contract_payment_mode/__manifest__.py b/contract_payment_mode/__manifest__.py index dea0e710..2f1655b1 100644 --- a/contract_payment_mode/__manifest__.py +++ b/contract_payment_mode/__manifest__.py @@ -1,15 +1,14 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Domatix () # Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa -# Copyright 2017 Tecnativa - Vicent Cubells # Copyright 2017 Tecnativa - David Vidal # Copyright 2017 Tecnativa - Carlos Dauden +# Copyright 2017-2018 Tecnativa - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Contract Payment Mode', 'summary': 'Payment mode in contracts and their invoices', - 'version': '10.0.1.0.1', + 'version': '11.0.1.0.0', 'author': 'Domatix, ' 'Tecnativa, ' 'Odoo Community Association (OCA)', diff --git a/contract_payment_mode/hooks.py b/contract_payment_mode/hooks.py index a1d2bae7..db75d33c 100644 --- a/contract_payment_mode/hooks.py +++ b/contract_payment_mode/hooks.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/contract_payment_mode/models/__init__.py b/contract_payment_mode/models/__init__.py index b82ea877..99a5468a 100644 --- a/contract_payment_mode/models/__init__.py +++ b/contract_payment_mode/models/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- from . import contract diff --git a/contract_payment_mode/models/contract.py b/contract_payment_mode/models/contract.py index 2a5d53ab..cdd58fd1 100644 --- a/contract_payment_mode/models/contract.py +++ b/contract_payment_mode/models/contract.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from odoo import api, fields, models @@ -13,8 +12,7 @@ class AccountAnalyticAccount(models.Model): @api.onchange('partner_id') def on_change_partner_id(self): - if self.partner_id.customer_payment_mode_id: - self.payment_mode_id = self.partner_id.customer_payment_mode_id.id + self.payment_mode_id = self.partner_id.customer_payment_mode_id.id @api.multi def _prepare_invoice(self): @@ -22,6 +20,6 @@ class AccountAnalyticAccount(models.Model): if self.payment_mode_id: invoice_vals['payment_mode_id'] = self.payment_mode_id.id invoice = self.env['account.invoice'].new(invoice_vals) - invoice.payment_mode_id_change() + invoice._onchange_payment_mode_id() invoice_vals = invoice._convert_to_write(invoice._cache) return invoice_vals diff --git a/contract_payment_mode/tests/__init__.py b/contract_payment_mode/tests/__init__.py index 3715e523..af96dda7 100644 --- a/contract_payment_mode/tests/__init__.py +++ b/contract_payment_mode/tests/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/contract_payment_mode/tests/test_contract_payment.py b/contract_payment_mode/tests/test_contract_payment.py index d5580081..5bbb46c0 100644 --- a/contract_payment_mode/tests/test_contract_payment.py +++ b/contract_payment_mode/tests/test_contract_payment.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Antiun Ingenieria S.L. - Antonio Espinosa # Copyright 2017 Tecnativa - Vicent Cubells # Copyright 2017 Tecnativa - David Vidal diff --git a/contract_payment_mode/views/contract_view.xml b/contract_payment_mode/views/contract_view.xml index 7be6a65e..4d046f5d 100644 --- a/contract_payment_mode/views/contract_view.xml +++ b/contract_payment_mode/views/contract_view.xml @@ -1,4 +1,4 @@ - + diff --git a/oca_dependencies.txt b/oca_dependencies.txt new file mode 100644 index 00000000..34f82ae9 --- /dev/null +++ b/oca_dependencies.txt @@ -0,0 +1 @@ +bank-payment