interface enhancement portal_create_contact new field 'root'
tz_report_production: add hierarchical pos in column 2develop
							parent
							
								
									510a8826f0
								
							
						
					
					
						commit
						60a1c0706f
					
				| 
						 | 
				
			
			@ -231,8 +231,10 @@ class Partner(models.Model):
 | 
			
		|||
            vals['active'] = False
 | 
			
		||||
        vals['is_company'] = True
 | 
			
		||||
        vals['portal_pending'] = True
 | 
			
		||||
        if not vals.get('root'):
 | 
			
		||||
            vals['root'] = True
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        # send mail activity to usergroup(with group 'informieren bei neuem Portalkunden, if new company was created
 | 
			
		||||
        recordset = self.create(vals)
 | 
			
		||||
        users = self.env.ref('dp_custom.group_inform_on_new_company').users
 | 
			
		||||
| 
						 | 
				
			
			@ -476,7 +478,7 @@ class Partner(models.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', 'property_product_pricelist_id', 'portal_managed_pricelist']
 | 
			
		||||
                       'property_product_pricelist', 'property_product_pricelist_id', 'portal_managed_pricelist','root']
 | 
			
		||||
        if self.env.context.get('sst_1', False):
 | 
			
		||||
            common_list.extend(['name', 'name2', 'info_kundennr', 'info_uid', 'comment', 'retail_partner_id'])
 | 
			
		||||
            return common_list
 | 
			
		||||
| 
						 | 
				
			
			@ -487,7 +489,7 @@ class Partner(models.Model):
 | 
			
		|||
                 'is_retailer', 'name2', 'carrier_id', 'collective_bill', 'fiscal_position', 'partner_flash'])
 | 
			
		||||
            return common_list
 | 
			
		||||
        elif self.env.context.get('sst_14', False):
 | 
			
		||||
            common_list = ['firstname', 'lastname', 'midname', 'email', 'company_odoo_id', 'portal_id', 'opt_out', 'property_product_pricelist']
 | 
			
		||||
            common_list = ['firstname', 'lastname', 'midname', 'email', 'company_odoo_id', 'portal_id', 'opt_out', 'property_product_pricelist','root']
 | 
			
		||||
            return common_list
 | 
			
		||||
        elif self.env.context.get('sst_16', False):
 | 
			
		||||
            common_list = ['company_odoo_id', 'portal_id', 'portal_managed_pricelist','property_product_pricelist','property_product_pricelist_id']
 | 
			
		||||
| 
						 | 
				
			
			@ -581,6 +583,7 @@ class Partner(models.Model):
 | 
			
		|||
            'customer_id': lPortal_id,
 | 
			
		||||
            'pricelist_id': pricelist.id,
 | 
			
		||||
            'pricelist_name': pricelist.name,
 | 
			
		||||
            'portal_prefix': self.env.user.company_id.portal_prefix,
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        portal_url = tools.config.get('portal_url')
 | 
			
		||||
| 
						 | 
				
			
			@ -602,6 +605,9 @@ class Partner(models.Model):
 | 
			
		|||
 | 
			
		||||
    @api.multi
 | 
			
		||||
    def write(self, vals):
 | 
			
		||||
        if not self.company_id and self.user_ids and self.env.uid != 1:
 | 
			
		||||
            raise ValidationError(_('Dieser Datensatz gehört zu einem Benutzer und darf nur vom System-Administrator bearbeitet werden!'))
 | 
			
		||||
 | 
			
		||||
        fields_to_check = ['ref', 'portal_id']
 | 
			
		||||
        for field in fields_to_check:
 | 
			
		||||
            if field in vals and vals[field] == '':
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -118,7 +118,7 @@
 | 
			
		|||
                    <thead class="table-header">
 | 
			
		||||
                        <tr>
 | 
			
		||||
                            <th class="text-center">Pos.</th>
 | 
			
		||||
                            <th class="text-right"/>
 | 
			
		||||
                            <th class="text-center">#</th>
 | 
			
		||||
                            <th class="text-left">Artikel</th>
 | 
			
		||||
<!--
 | 
			
		||||
                            <th class="text-right"/>
 | 
			
		||||
| 
						 | 
				
			
			@ -140,7 +140,11 @@
 | 
			
		|||
                                    <td class="text-center">
 | 
			
		||||
                                        <span t-esc="pos_nr"/>
 | 
			
		||||
                                    </td>
 | 
			
		||||
                                    <td class="text-right"/>
 | 
			
		||||
                                    <td class="text-center">
 | 
			
		||||
                                        <p t-if="order_line.lot_id">
 | 
			
		||||
                                            <span t-esc="order_line.lot_id.name.split('.',3)[-1]"/>
 | 
			
		||||
                                        </p>
 | 
			
		||||
                                    </td>
 | 
			
		||||
                                    <td rowspan="2" class="text-left">
 | 
			
		||||
                                        <t t-if="order_line.product_id.default_code and order_line.product_id.material_type_id.print_default_code">
 | 
			
		||||
                                            <strong>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue