account_payment_purchase: set correctly payment mode in purchases created from procurement.

This commit is contained in:
jesusVMayor
2016-08-04 10:36:44 +02:00
committed by David Ramia
parent b3c160823b
commit 59f1c30f9e
9 changed files with 432 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-01 18:13+0000\n"
"PO-Revision-Date: 2016-04-06 00:16+0000\n"
"Last-Translator: <>\n"
"Language-Team: Spanish (Mexico) (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/es_MX/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es_MX\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_payment_purchase
#: field:purchase.order,payment_mode_id:0
msgid "Payment Mode"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_stock_picking
msgid "Picking List"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_procurement_order
msgid "Procurement"
msgstr "Contratación"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_purchase_order
msgid "Purchase Order"
msgstr ""
#. module: account_payment_purchase
#: help:purchase.order,supplier_partner_bank_id:0
msgid ""
"Select the bank account of your supplier on which your company should send "
"the payment. This field is copied from the partner and will be copied to the"
" supplier invoice."
msgstr ""
#. module: account_payment_purchase
#: field:purchase.order,supplier_partner_bank_id:0
msgid "Supplier Bank Account"
msgstr ""

View File

@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-03 11:43+0000\n"
"PO-Revision-Date: 2016-04-06 00:16+0000\n"
"Last-Translator: <>\n"
"Language-Team: Finnish (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/fi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fi\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_payment_purchase
#: field:purchase.order,payment_mode_id:0
msgid "Payment Mode"
msgstr "Maksutapa"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_stock_picking
msgid "Picking List"
msgstr "Keräilylista"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_procurement_order
msgid "Procurement"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_purchase_order
msgid "Purchase Order"
msgstr "Ostotilaus"
#. module: account_payment_purchase
#: help:purchase.order,supplier_partner_bank_id:0
msgid ""
"Select the bank account of your supplier on which your company should send "
"the payment. This field is copied from the partner and will be copied to the"
" supplier invoice."
msgstr ""
#. module: account_payment_purchase
#: field:purchase.order,supplier_partner_bank_id:0
msgid "Supplier Bank Account"
msgstr ""

View File

@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-21 01:10+0000\n"
"PO-Revision-Date: 2016-04-06 00:16+0000\n"
"Last-Translator: <>\n"
"Language-Team: French (France) (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/fr_FR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr_FR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: account_payment_purchase
#: field:purchase.order,payment_mode_id:0
msgid "Payment Mode"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_stock_picking
msgid "Picking List"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_procurement_order
msgid "Procurement"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_purchase_order
msgid "Purchase Order"
msgstr "Bon de commande"
#. module: account_payment_purchase
#: help:purchase.order,supplier_partner_bank_id:0
msgid ""
"Select the bank account of your supplier on which your company should send "
"the payment. This field is copied from the partner and will be copied to the"
" supplier invoice."
msgstr ""
#. module: account_payment_purchase
#: field:purchase.order,supplier_partner_bank_id:0
msgid "Supplier Bank Account"
msgstr ""

View File

@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-21 10:50+0000\n"
"PO-Revision-Date: 2016-04-06 00:16+0000\n"
"Last-Translator: <>\n"
"Language-Team: Croatian (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/hr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: hr\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: account_payment_purchase
#: field:purchase.order,payment_mode_id:0
msgid "Payment Mode"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_stock_picking
msgid "Picking List"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_procurement_order
msgid "Procurement"
msgstr "Nabava"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_purchase_order
msgid "Purchase Order"
msgstr ""
#. module: account_payment_purchase
#: help:purchase.order,supplier_partner_bank_id:0
msgid ""
"Select the bank account of your supplier on which your company should send "
"the payment. This field is copied from the partner and will be copied to the"
" supplier invoice."
msgstr ""
#. module: account_payment_purchase
#: field:purchase.order,supplier_partner_bank_id:0
msgid "Supplier Bank Account"
msgstr ""

View File

@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-21 10:50+0000\n"
"PO-Revision-Date: 2016-04-06 00:16+0000\n"
"Last-Translator: <>\n"
"Language-Team: Italian (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_payment_purchase
#: field:purchase.order,payment_mode_id:0
msgid "Payment Mode"
msgstr "Modo di pagamento"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_stock_picking
msgid "Picking List"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_procurement_order
msgid "Procurement"
msgstr "Approvvigionamento"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_purchase_order
msgid "Purchase Order"
msgstr ""
#. module: account_payment_purchase
#: help:purchase.order,supplier_partner_bank_id:0
msgid ""
"Select the bank account of your supplier on which your company should send "
"the payment. This field is copied from the partner and will be copied to the"
" supplier invoice."
msgstr ""
#. module: account_payment_purchase
#: field:purchase.order,supplier_partner_bank_id:0
msgid "Supplier Bank Account"
msgstr ""

View File

@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-31 01:24+0000\n"
"PO-Revision-Date: 2016-04-06 00:16+0000\n"
"Last-Translator: <>\n"
"Language-Team: Portuguese (Portugal) (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/pt_PT/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt_PT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_payment_purchase
#: field:purchase.order,payment_mode_id:0
msgid "Payment Mode"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_stock_picking
msgid "Picking List"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_procurement_order
msgid "Procurement"
msgstr "Aquisições"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_purchase_order
msgid "Purchase Order"
msgstr ""
#. module: account_payment_purchase
#: help:purchase.order,supplier_partner_bank_id:0
msgid ""
"Select the bank account of your supplier on which your company should send "
"the payment. This field is copied from the partner and will be copied to the"
" supplier invoice."
msgstr ""
#. module: account_payment_purchase
#: field:purchase.order,supplier_partner_bank_id:0
msgid "Supplier Bank Account"
msgstr ""

View File

@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-31 01:24+0000\n"
"PO-Revision-Date: 2016-04-06 00:16+0000\n"
"Last-Translator: <>\n"
"Language-Team: Turkish (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/tr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: tr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: account_payment_purchase
#: field:purchase.order,payment_mode_id:0
msgid "Payment Mode"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_stock_picking
msgid "Picking List"
msgstr "Toplama Listesi"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_procurement_order
msgid "Procurement"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_purchase_order
msgid "Purchase Order"
msgstr ""
#. module: account_payment_purchase
#: help:purchase.order,supplier_partner_bank_id:0
msgid ""
"Select the bank account of your supplier on which your company should send "
"the payment. This field is copied from the partner and will be copied to the"
" supplier invoice."
msgstr ""
#. module: account_payment_purchase
#: field:purchase.order,supplier_partner_bank_id:0
msgid "Supplier Bank Account"
msgstr ""

View File

@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: bank-payment (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-31 01:24+0000\n"
"PO-Revision-Date: 2016-04-06 00:16+0000\n"
"Last-Translator: <>\n"
"Language-Team: Turkish (Turkey) (http://www.transifex.com/oca/OCA-bank-payment-8-0/language/tr_TR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: tr_TR\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: account_payment_purchase
#: field:purchase.order,payment_mode_id:0
msgid "Payment Mode"
msgstr ""
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_stock_picking
msgid "Picking List"
msgstr "Seçim listesi"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_procurement_order
msgid "Procurement"
msgstr "Satın alma"
#. module: account_payment_purchase
#: model:ir.model,name:account_payment_purchase.model_purchase_order
msgid "Purchase Order"
msgstr ""
#. module: account_payment_purchase
#: help:purchase.order,supplier_partner_bank_id:0
msgid ""
"Select the bank account of your supplier on which your company should send "
"the payment. This field is copied from the partner and will be copied to the"
" supplier invoice."
msgstr ""
#. module: account_payment_purchase
#: field:purchase.order,supplier_partner_bank_id:0
msgid "Supplier Bank Account"
msgstr ""

View File

@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# (c) 2015 Serv. Tecnol. Avanzados - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import api, models
class ProcurementOrder(models.Model):
_inherit = "procurement.order"
@api.model
def create_procurement_purchase_order(self, procurement, po_vals,
line_vals):
"""Propagate payment mode on MTO/drop shipping."""
if po_vals.get('partner_id'):
partner = self.env['res.partner'].browse(po_vals['partner_id'])
po_vals['payment_mode_id'] = partner.with_context(
force_company=procurement.company_id.id).\
supplier_payment_mode.id
po_vals['supplier_partner_bank_id'] = (
self.env['purchase.order']._get_default_supplier_partner_bank(
partner))
return super(ProcurementOrder, self).create_procurement_purchase_order(
procurement, po_vals, line_vals)