diff --git a/account_invoice_margin/account_invoice.py b/account_invoice_margin/account_invoice.py index ab8a919..672e238 100644 --- a/account_invoice_margin/account_invoice.py +++ b/account_invoice_margin/account_invoice.py @@ -174,7 +174,9 @@ class AccountInvoiceLine(orm.Model): # We write standard_price_company_currency even on supplier invoice/refunds # because we don't have access to the 'type' of the invoice def create(self, cr, uid, vals, context=None): - if vals.get('product_id'): + if ( + vals.get('product_id') and + 'standard_price_company_currency' not in vals): pp = self.pool['product.product'].browse( cr, uid, vals['product_id'], context=context) std_price = pp.standard_price diff --git a/base_partner_always_multi_contacts/__init__.py b/base_partner_always_multi_contacts/__init__.py deleted file mode 100644 index 2098639..0000000 --- a/base_partner_always_multi_contacts/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Base Partner Always Multi Contacts module for OpenERP -# Copyright (C) 2014 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program 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. -# -# This program 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 this program. If not, see . -# -############################################################################## - - diff --git a/intrastat_product_type/intrastat_product_type.py b/intrastat_product_type/intrastat_product_type.py index 91a4953..d743293 100644 --- a/intrastat_product_type/intrastat_product_type.py +++ b/intrastat_product_type/intrastat_product_type.py @@ -30,12 +30,12 @@ class ProductTemplate(orm.Model): if pt.intrastat_type == 'product' and pt.type == 'service': raise orm.except_orm( _("Error"), - _("On the product %s, you cannot set Product Type to " + _("On the product '%s', you cannot set Product Type to " "'Service' and Intrastat Type to 'Product'.") % pt.name) if pt.intrastat_type == 'service' and pt.type == 'product': raise orm.except_orm( _("Error"), - _("On the product %s, you cannot set Intrastat Type to " + _("On the product '%s', you cannot set Intrastat Type to " "'Service' and Product Type to 'Stockable product' " "(but you can set Product Type to 'Consumable' or " "'Service').") % pt.name)