Some Bug fixes
							parent
							
								
									5df4837153
								
							
						
					
					
						commit
						9faa307346
					
				|  | @ -1,3 +0,0 @@ | ||||||
| [MASTER] |  | ||||||
| # Specify a configuration file. |  | ||||||
| rcfile=/home/aaly/gitrepos/dp-int/pylintrc |  | ||||||
|  | @ -33,7 +33,8 @@ | ||||||
|         'partner_second_lastname', |         'partner_second_lastname', | ||||||
|         'account', |         'account', | ||||||
|         'sale_stock', |         'sale_stock', | ||||||
|         'report_intrastat' |         'report_intrastat', | ||||||
|  |         'dp_intercompany_invoicing', | ||||||
|     ], |     ], | ||||||
|     'data': [ |     'data': [ | ||||||
|         'data/dp_custom_data.xml', |         'data/dp_custom_data.xml', | ||||||
|  |  | ||||||
|  | @ -40,6 +40,10 @@ | ||||||
|                (4,ref('queue_job.group_queue_job_manager'))]"/> |                (4,ref('queue_job.group_queue_job_manager'))]"/> | ||||||
|     </record> |     </record> | ||||||
| 
 | 
 | ||||||
|  |     <record id="glaser_and_co_company" model="res.company"> | ||||||
|  |         <field name="admin_user_id" eval="ref('glaser_admin_user')"/> | ||||||
|  |     </record> | ||||||
|  | 
 | ||||||
|     <!--<function--> |     <!--<function--> | ||||||
|     <!--id="set_company_favicon"--> |     <!--id="set_company_favicon"--> | ||||||
|     <!--model="res.company"--> |     <!--model="res.company"--> | ||||||
|  |  | ||||||
|  | @ -16,6 +16,12 @@ | ||||||
|                (4,ref('queue_job.group_queue_job_manager'))]"/> |                (4,ref('queue_job.group_queue_job_manager'))]"/> | ||||||
|     </record> |     </record> | ||||||
| 
 | 
 | ||||||
|  |     <record id="base.main_company" model="res.company"> | ||||||
|  |         <field name="admin_user_id" eval="ref('tz_admin_user')"/> | ||||||
|  |         <field name="inter_company_supplier_id" eval="ref('dp_custom.glaser_and_co_company')"/> | ||||||
|  |         <field name="percentage_billing">70.00</field> | ||||||
|  |     </record> | ||||||
|  | 
 | ||||||
|     <function id="set_company_customer" model="res.company" name="set_company_customer"> |     <function id="set_company_customer" model="res.company" name="set_company_customer"> | ||||||
|         <value eval="[ref('base.main_company')]"/> |         <value eval="[ref('base.main_company')]"/> | ||||||
|     </function> |     </function> | ||||||
|  |  | ||||||
|  | @ -81,7 +81,7 @@ class Partner(models.Model): | ||||||
|             if not partner.is_company: |             if not partner.is_company: | ||||||
|                 raise ValidationError( |                 raise ValidationError( | ||||||
|                     _("Der Partner mit der Internen Referenz '%s' ist kein Unternehmen" % vals['ref'])) |                     _("Der Partner mit der Internen Referenz '%s' ist kein Unternehmen" % vals['ref'])) | ||||||
|             self.write(vals) |             partner.write(vals) | ||||||
|         else: |         else: | ||||||
|             if not vals.get('is_company', False): |             if not vals.get('is_company', False): | ||||||
|                 vals['is_company'] = True |                 vals['is_company'] = True | ||||||
|  | @ -210,7 +210,7 @@ class PartnerSector(models.Model): | ||||||
|     _description = 'Branche' |     _description = 'Branche' | ||||||
|     _order = 'id,name' |     _order = 'id,name' | ||||||
| 
 | 
 | ||||||
|     name = fields.Char(string='Beteichnung', required=True) |     name = fields.Char(string='Bezeichnung', required=True) | ||||||
|     sequence = fields.Integer(string='Sequenz') |     sequence = fields.Integer(string='Sequenz') | ||||||
| 
 | 
 | ||||||
|     _sql_constraints = [ |     _sql_constraints = [ | ||||||
|  |  | ||||||
|  | @ -38,9 +38,18 @@ class SaleOrder(models.Model): | ||||||
|     assembled = fields.Boolean(string='Zusammengebaut') |     assembled = fields.Boolean(string='Zusammengebaut') | ||||||
|     line_id = fields.Many2one(comodel_name='res.line', string='Produktionslinie') |     line_id = fields.Many2one(comodel_name='res.line', string='Produktionslinie') | ||||||
|     assembly_state = fields.Selection(ASSEMBLY_STATES, string="Status PG") |     assembly_state = fields.Selection(ASSEMBLY_STATES, string="Status PG") | ||||||
|  |     quote_name = fields.Char(compute='_compute_quote_name') | ||||||
|     internal_notes = fields.Text() |     internal_notes = fields.Text() | ||||||
|     assembly_notes = fields.Text() |     assembly_notes = fields.Text() | ||||||
| 
 | 
 | ||||||
|  |     @api.multi | ||||||
|  |     def _compute_quote_name(self): | ||||||
|  |         for record in self: | ||||||
|  |             if record.state in ['draft', 'sent']: | ||||||
|  |                 record.quote_name = record.name.replace('ATOC', 'ATOF') | ||||||
|  |             else: | ||||||
|  |                 record.quote_name = record.name | ||||||
|  | 
 | ||||||
|     @api.model |     @api.model | ||||||
|     def pg_get_orders(self, line, state, limit): |     def pg_get_orders(self, line, state, limit): | ||||||
|         line_id = self.env['res.line'].search([('name', '=', line)]) |         line_id = self.env['res.line'].search([('name', '=', line)]) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue