[MIG] contract_payment_mode: Migration to 11.0

This commit is contained in:
cubells
2018-05-17 13:33:19 +02:00
committed by sygel
parent 7bd09e6dfb
commit 5eb80c2589
9 changed files with 6 additions and 14 deletions

View File

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

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models

View File

@@ -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)',

View File

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

View File

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

View File

@@ -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

View File

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

View File

@@ -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

View File

@@ -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">