Browse Source

[MIG] contract_payment_mode: Migration to 11.0

pull/236/head
cubells 7 years ago
committed by sbejaoui
parent
commit
91564547fd
  1. 2
      contract_payment_mode/README.rst
  2. 1
      contract_payment_mode/__init__.py
  3. 5
      contract_payment_mode/__manifest__.py
  4. 1
      contract_payment_mode/hooks.py
  5. 1
      contract_payment_mode/models/__init__.py
  6. 4
      contract_payment_mode/models/contract.py
  7. 1
      contract_payment_mode/tests/__init__.py
  8. 1
      contract_payment_mode/tests/test_contract_payment.py
  9. 2
      contract_payment_mode/views/contract_view.xml

2
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
===========

1
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

5
contract_payment_mode/__manifest__.py

@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
# Copyright 2015 Domatix (<www.domatix.com>)
# Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa
# Copyright 2017 Tecnativa - Vicent Cubells
# Copyright 2017 Tecnativa - David Vidal
# Copyright 2017 Tecnativa - Carlos Dauden <carlos.dauden@tecnativa.com>
# Copyright 2017-2018 Tecnativa - Vicent Cubells <vicent.cubells@tecnativa.com>
# 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)',

1
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).

1
contract_payment_mode/models/__init__.py

@ -1,2 +1 @@
# -*- coding: utf-8 -*-
from . import contract

4
contract_payment_mode/models/contract.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models
@ -13,7 +12,6 @@ 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
@api.multi
@ -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

1
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).

1
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

2
contract_payment_mode/views/contract_view.xml

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="account_analytic_account_payment_form" model="ir.ui.view">

Loading…
Cancel
Save