Update SST-01 & SST-16

develop
Andreas Osim 2020-03-18 13:09:11 +01:00
parent c7849069fa
commit 1ffc1290c6
1 changed files with 8 additions and 4 deletions

View File

@ -354,15 +354,18 @@ class Partner(models.Model):
_("Die Zahlungsbedingung mit dem Code \'%s\' kann nicht zugeordnet werden") % vals[
'property_payment_term_id'])
if self.env.context.get('sst_16', False):
# if self.env.context.get('sst_1', False) or self.env.context.get('sst_16', False):
if vals.get('property_product_pricelist_id', False):
# product_pricelist = self.env['product.pricelist'].search(
# [('name', '=', vals['property_product_pricelist']),('id', '=', vals['property_product_pricelist_id'])])
product_pricelist = self.env['product.pricelist'].search(
[('name', '=', vals['property_product_pricelist']),('id', '=', vals['property_product_pricelist_id'])])
[('id', '=', vals['property_product_pricelist_id'])])
if product_pricelist:
vals['property_product_pricelist'] = vals['property_product_pricelist_id']
del vals['property_product_pricelist_id']
else:
raise ValidationError(_("Die Preisliste \'%s\' mit der ID \'%s\' ist nicht vorhanden") %
vals['property_product_pricelist'],vals['property_product_pricelist'])
(vals['property_product_pricelist'],vals['property_product_pricelist_id']))
elif vals.get('property_product_pricelist', False):
product_pricelist = self.env['product.pricelist'].search(
[('currency_id.name', '=', vals['property_product_pricelist'])])
@ -437,7 +440,8 @@ class Partner(models.Model):
@api.model
def _get_specified_fields(self):
common_list = ['street', 'street2', 'zip', 'city', 'country_id', 'fax', 'phone', 'mobile',
'endkunde', 'line_ids', 'lang', 'portal_id', 'email', 'opt_out', 'property_product_pricelist', 'portal_managed_pricelist']
'endkunde', 'line_ids', 'lang', 'portal_id', 'email', 'opt_out',
'property_product_pricelist', 'property_product_pricelist_id', 'portal_managed_pricelist']
if self.env.context.get('sst_1', False):
common_list.extend(['name', 'name2', 'info_kundennr', 'info_uid', 'comment', 'retail_partner_id'])
return common_list