Minor update
This commit is contained in:
@@ -174,7 +174,9 @@ class AccountInvoiceLine(orm.Model):
|
|||||||
# We write standard_price_company_currency even on supplier invoice/refunds
|
# We write standard_price_company_currency even on supplier invoice/refunds
|
||||||
# because we don't have access to the 'type' of the invoice
|
# because we don't have access to the 'type' of the invoice
|
||||||
def create(self, cr, uid, vals, context=None):
|
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(
|
pp = self.pool['product.product'].browse(
|
||||||
cr, uid, vals['product_id'], context=context)
|
cr, uid, vals['product_id'], context=context)
|
||||||
std_price = pp.standard_price
|
std_price = pp.standard_price
|
||||||
|
|||||||
@@ -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 <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# 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 <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
|
|
||||||
@@ -30,12 +30,12 @@ class ProductTemplate(orm.Model):
|
|||||||
if pt.intrastat_type == 'product' and pt.type == 'service':
|
if pt.intrastat_type == 'product' and pt.type == 'service':
|
||||||
raise orm.except_orm(
|
raise orm.except_orm(
|
||||||
_("Error"),
|
_("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)
|
"'Service' and Intrastat Type to 'Product'.") % pt.name)
|
||||||
if pt.intrastat_type == 'service' and pt.type == 'product':
|
if pt.intrastat_type == 'service' and pt.type == 'product':
|
||||||
raise orm.except_orm(
|
raise orm.except_orm(
|
||||||
_("Error"),
|
_("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' "
|
"'Service' and Product Type to 'Stockable product' "
|
||||||
"(but you can set Product Type to 'Consumable' or "
|
"(but you can set Product Type to 'Consumable' or "
|
||||||
"'Service').") % pt.name)
|
"'Service').") % pt.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user