Schnittstellen bug fixes
							parent
							
								
									1d4d2cfb25
								
							
						
					
					
						commit
						bfc605f86f
					
				|  | @ -8,7 +8,7 @@ db_port = 5432 | ||||||
| db_user = False | db_user = False | ||||||
| db_password = False | db_password = False | ||||||
| 
 | 
 | ||||||
| addons_path = ext/odoo/addons,ext/3rd-party-addons,ext/custom-addons,dmi/run1 | addons_path = ext/odoo/addons,ext/3rd-party-addons,ext/custom-addons | ||||||
| ; For enterprise use the addons path bellow | ; For enterprise use the addons path bellow | ||||||
| ; addons_path = ext/enterprise-addons,ext/odoo/addons,ext/3rd-party-addons,ext/custom-addons,dmi/run1 | ; addons_path = ext/enterprise-addons,ext/odoo/addons,ext/3rd-party-addons,ext/custom-addons,dmi/run1 | ||||||
| timezone = Europe/Vienna | timezone = Europe/Vienna | ||||||
|  |  | ||||||
|  | @ -21,7 +21,7 @@ values = { | ||||||
|     "portal_delivery_id": "222222", |     "portal_delivery_id": "222222", | ||||||
|     "delivery_firstname": "Ahmed", |     "delivery_firstname": "Ahmed", | ||||||
|     "delivery_lastname": "Aly", |     "delivery_lastname": "Aly", | ||||||
|     "delivery_midname": False, |     "delivery_lastname2": False, | ||||||
|     "delivery_street": "Zeilergasse 7-11", |     "delivery_street": "Zeilergasse 7-11", | ||||||
|     "delivery_street2": False, |     "delivery_street2": False, | ||||||
|     "delivery_zip": "1170", |     "delivery_zip": "1170", | ||||||
|  |  | ||||||
|  | @ -44,4 +44,4 @@ class AbstractHelper(models.AbstractModel): | ||||||
|     @api.model |     @api.model | ||||||
|     def _get_specified_fields(self): |     def _get_specified_fields(self): | ||||||
|         raise ValidationError( |         raise ValidationError( | ||||||
|             _('Method \'%s\' isn\'t Implemented in model \'%s\'', (self._get_specified_fields.__name__, self._name))) |             _('Method \'%s\' isn\'t Implemented in model \'%s\'' % (self._get_specified_fields.__name__, self._name))) | ||||||
|  |  | ||||||
|  | @ -51,6 +51,7 @@ class ProductTemplate(models.Model): | ||||||
|     xcat_id = fields.Many2one(comodel_name='product.xcategory', string='X-Kategorie') |     xcat_id = fields.Many2one(comodel_name='product.xcategory', string='X-Kategorie') | ||||||
|     material_type_id = fields.Many2one(comodel_name='material.type', string='Materialtyp') |     material_type_id = fields.Many2one(comodel_name='material.type', string='Materialtyp') | ||||||
|     assembly_line_ids = fields.Many2many(comodel_name='res.line', string='Produktionslinien') |     assembly_line_ids = fields.Many2many(comodel_name='res.line', string='Produktionslinien') | ||||||
|  |     notes = fields.Text(string='Notizen') | ||||||
| 
 | 
 | ||||||
|     @api.model |     @api.model | ||||||
|     def create_product(self, vals): |     def create_product(self, vals): | ||||||
|  |  | ||||||
|  | @ -39,12 +39,13 @@ class Partner(models.Model): | ||||||
|     active = fields.Boolean(track_visibility='onchange') |     active = fields.Boolean(track_visibility='onchange') | ||||||
| 
 | 
 | ||||||
|     _sql_constraints = [ |     _sql_constraints = [ | ||||||
|         ('ref_uniq', 'unique(ref)', 'Die Interne Referenz muss eindeutig sein') |         ('ref_uniq', 'unique(ref)', 'Die Interne Referenz muss eindeutig sein'), | ||||||
|  |         ('portal_id_uniq', 'unique(portal_id)', 'Die Portal-ID muss eindeutig sein') | ||||||
|     ] |     ] | ||||||
| 
 | 
 | ||||||
|     @api.model |     @api.model | ||||||
|     def portal_create_partner(self, vals): |     def portal_create_partner(self, vals): | ||||||
|         vals = self.remove_not_specified_fields(vals) |         vals = self.with_context(sst_1=True).remove_not_specified_fields(vals) | ||||||
|         vals = self.correct_values(vals) |         vals = self.correct_values(vals) | ||||||
|         if not vals.get('active', False): |         if not vals.get('active', False): | ||||||
|             vals['active'] = False |             vals['active'] = False | ||||||
|  | @ -52,12 +53,13 @@ class Partner(models.Model): | ||||||
| 
 | 
 | ||||||
|     @api.model |     @api.model | ||||||
|     def pg_create_company(self, vals): |     def pg_create_company(self, vals): | ||||||
|         vals = self.remove_not_specified_fields(vals) |         vals = self.with_context(sst_11=True).remove_not_specified_fields(vals) | ||||||
|         vals = self.correct_values(vals) |         vals = self.correct_values(vals) | ||||||
|         partner = self.with_context(active_test=False).search([('ref', '=', vals['ref'])]) |         partner = self.with_context(active_test=False).search([('ref', '=', vals['ref'])]) | ||||||
|         if partner: |         if partner: | ||||||
|             if not partner.is_company: |             if not partner.is_company: | ||||||
|                 raise ValidationError(_("Der Partner mit der Internen Referenz '%s' ist kein Unternehmen" % vals['ref'])) |                 raise ValidationError( | ||||||
|  |                     _("Der Partner mit der Internen Referenz '%s' ist kein Unternehmen" % vals['ref'])) | ||||||
|             partner = self.write(vals) |             partner = self.write(vals) | ||||||
|         else: |         else: | ||||||
|             if not vals.get('is_company', False): |             if not vals.get('is_company', False): | ||||||
|  | @ -83,7 +85,7 @@ class Partner(models.Model): | ||||||
|                 vals['line_ids'] = [(6, 0, line_ids.ids)] |                 vals['line_ids'] = [(6, 0, line_ids.ids)] | ||||||
|             else: |             else: | ||||||
|                 raise ValidationError( |                 raise ValidationError( | ||||||
|                     _("Die Produktionslinie mit dem Code \'%s\' kann nicht zugeordnet werden", vals['line_ids'])) |                     _("Die Produktionslinie mit dem Code \'%s\' kann nicht zugeordnet werden" % vals['line_ids'])) | ||||||
| 
 | 
 | ||||||
|         if vals.get('lang', False): |         if vals.get('lang', False): | ||||||
|             temp = vals['lang'] |             temp = vals['lang'] | ||||||
|  | @ -107,10 +109,17 @@ class Partner(models.Model): | ||||||
| 
 | 
 | ||||||
|     @api.model |     @api.model | ||||||
|     def _get_specified_fields(self): |     def _get_specified_fields(self): | ||||||
|         return ['name', 'firstname', 'lastname', 'street', 'street2', 'zip', 'city', 'country_id', 'tax', 'phone', 'mobile', |         common_list = ['street', 'street2', 'zip', 'city', 'country_id', 'fax', 'phone', 'mobile', | ||||||
|                 'endkunde', 'line_ids', 'lang', 'portal_id', 'email', 'opt_out', 'ref', |                        'endkunde', 'line_ids', 'lang', 'portal_id', 'email', 'opt_out'] | ||||||
|                 'partner_sector_id', 'comment', 'vat', 'property_payment_term_id', |         if self.env.context.get('sst_1', False): | ||||||
|                 'property_pricelist_id', 'date_vat_check', 'active'] |             common_list.extend(['firstname', 'lastname', 'lastname2', 'company', 'info_kundennr', 'info_uid']) | ||||||
|  |             return common_list | ||||||
|  |         elif self.env.context.get('sst_11', False): | ||||||
|  |             common_list.extend(['name', 'ref', 'partner_sector_id', 'comment', 'vat', 'property_payment_term_id', | ||||||
|  |                     'property_pricelist_id', 'date_vat_check', 'active']) | ||||||
|  |             return common_list | ||||||
|  |         else: | ||||||
|  |             return super(Partner, self)._get_specified_fields() | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class PartnerSector(models.Model): | class PartnerSector(models.Model): | ||||||
|  |  | ||||||
|  | @ -57,7 +57,8 @@ class SaleOrder(models.Model): | ||||||
|                 'name': order.name, |                 'name': order.name, | ||||||
|                 'attachments': attachment_list, |                 'attachments': attachment_list, | ||||||
|                 'internal_notes': order.internal_notes, |                 'internal_notes': order.internal_notes, | ||||||
|                 'assembly_notes': order.assembly_notes |                 'assembly_notes': order.assembly_notes, | ||||||
|  |                 'user_id': order.user_id | ||||||
|             }) |             }) | ||||||
|         return order_list |         return order_list | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,9 +1,9 @@ | ||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <odoo> | <odoo> | ||||||
|     <record id="product_template_form_view" model="ir.ui.view"> |     <record id="product_form_view" model="ir.ui.view"> | ||||||
|         <field name="name">product_template_form_view</field> |         <field name="name">product_form_view</field> | ||||||
|         <field name="model">product.template</field> |         <field name="model">product.template</field> | ||||||
|         <field name="inherit_id" ref="product.product_template_only_form_view"/> |         <field name="inherit_id" ref="product.product_template_form_view"/> | ||||||
|         <field name="arch" type="xml"> |         <field name="arch" type="xml"> | ||||||
|             <div name="volume" position="after"> |             <div name="volume" position="after"> | ||||||
|                 <field name="length"/> |                 <field name="length"/> | ||||||
|  | @ -11,17 +11,39 @@ | ||||||
|                 <field name="thickness"/> |                 <field name="thickness"/> | ||||||
|                 <field name="surface"/> |                 <field name="surface"/> | ||||||
|             </div> |             </div> | ||||||
|             <field name="barcode" position="after"> |  | ||||||
|                 <field name="is_internal"/> |  | ||||||
|             </field> |  | ||||||
|             <field name="categ_id" position="after"> |             <field name="categ_id" position="after"> | ||||||
|                 <field name="xcat_id"/> |                 <field name="xcat_id"/> | ||||||
|                 <field name="material_type_id"/> |                 <field name="material_type_id"/> | ||||||
|                 <field name="assembly_line_ids"/> |                 <field name="assembly_line_ids" widget="many2many_tags" options="{'no_create': True}"/> | ||||||
|  |             </field> | ||||||
|  |             <xpath expr="//page[@name='general_information']/group" position="inside"> | ||||||
|  |                 <label for="notes"/> | ||||||
|  |                 <field name="notes"/> | ||||||
|  |             </xpath> | ||||||
|  |         </field> | ||||||
|  |     </record> | ||||||
|  | 
 | ||||||
|  |     <record id="product_template_form_view" model="ir.ui.view"> | ||||||
|  |         <field name="name">product_template_form_view</field> | ||||||
|  |         <field name="model">product.template</field> | ||||||
|  |         <field name="inherit_id" ref="product.product_template_only_form_view"/> | ||||||
|  |         <field name="arch" type="xml"> | ||||||
|  |             <field name="barcode" position="after"> | ||||||
|  |                 <field name="is_internal"/> | ||||||
|             </field> |             </field> | ||||||
|         </field> |         </field> | ||||||
|     </record> |     </record> | ||||||
| 
 | 
 | ||||||
|  |     <record id="product_product_form_view" model="ir.ui.view"> | ||||||
|  |         <field name="name">product_product_form_view</field> | ||||||
|  |         <field name="model">product.product</field> | ||||||
|  |         <field name="inherit_id" ref="product.product_normal_form_view"/> | ||||||
|  |         <field name="arch" type="xml"> | ||||||
|  |             <field name="barcode" position="after"> | ||||||
|  |                 <field name="is_internal"/> | ||||||
|  |             </field> | ||||||
|  |         </field> | ||||||
|  |     </record> | ||||||
| 
 | 
 | ||||||
|     <record id="product_xcategory_form_view" model="ir.ui.view"> |     <record id="product_xcategory_form_view" model="ir.ui.view"> | ||||||
|         <field name="name">product_xcategory_form_view</field> |         <field name="name">product_xcategory_form_view</field> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue