Update SST-01 & SST-16
parent
c7849069fa
commit
1ffc1290c6
|
|
@ -354,15 +354,18 @@ class Partner(models.Model):
|
||||||
_("Die Zahlungsbedingung mit dem Code \'%s\' kann nicht zugeordnet werden") % vals[
|
_("Die Zahlungsbedingung mit dem Code \'%s\' kann nicht zugeordnet werden") % vals[
|
||||||
'property_payment_term_id'])
|
'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(
|
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:
|
if product_pricelist:
|
||||||
vals['property_product_pricelist'] = vals['property_product_pricelist_id']
|
vals['property_product_pricelist'] = vals['property_product_pricelist_id']
|
||||||
del vals['property_product_pricelist_id']
|
del vals['property_product_pricelist_id']
|
||||||
else:
|
else:
|
||||||
raise ValidationError(_("Die Preisliste \'%s\' mit der ID \'%s\' ist nicht vorhanden") %
|
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):
|
elif vals.get('property_product_pricelist', False):
|
||||||
product_pricelist = self.env['product.pricelist'].search(
|
product_pricelist = self.env['product.pricelist'].search(
|
||||||
[('currency_id.name', '=', vals['property_product_pricelist'])])
|
[('currency_id.name', '=', vals['property_product_pricelist'])])
|
||||||
|
|
@ -437,7 +440,8 @@ class Partner(models.Model):
|
||||||
@api.model
|
@api.model
|
||||||
def _get_specified_fields(self):
|
def _get_specified_fields(self):
|
||||||
common_list = ['street', 'street2', 'zip', 'city', 'country_id', 'fax', 'phone', 'mobile',
|
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):
|
if self.env.context.get('sst_1', False):
|
||||||
common_list.extend(['name', 'name2', 'info_kundennr', 'info_uid', 'comment', 'retail_partner_id'])
|
common_list.extend(['name', 'name2', 'info_kundennr', 'info_uid', 'comment', 'retail_partner_id'])
|
||||||
return common_list
|
return common_list
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue