PG9 Link
							parent
							
								
									6d675ff9cf
								
							
						
					
					
						commit
						bc8cde8e7d
					
				|  | @ -62,13 +62,15 @@ class SaleOrder(models.Model): | |||
|     confirmation_nr = fields.Char('Freigabenummer') | ||||
|     order_type = fields.Selection(ORDER_TYPES, string='Auftragsart', default='M') | ||||
| 
 | ||||
|     pg9_call = fields.Char(string='PG9-Auftrag', compute='_pg9_call', store=False) | ||||
| 
 | ||||
|     @api.multi | ||||
|     def action_pg9_call(self): | ||||
|         addr = request.httprequest.environ ["REMOTE_ADDR"] | ||||
|         self.ensure_one() | ||||
|     def _pg9_call(self) : | ||||
|         for record in self : | ||||
|             xref = 'http://%s:9531/pg9/order/xref:%s' % (addr, record.origin) | ||||
|             r = requests.get(xref) | ||||
|             xref = 'xref:'+record.origin | ||||
|             record.pg9_call = 'http://localhost:9531/pg9/order/' + xref | ||||
| 
 | ||||
|     # end def _pg9_call | ||||
| 
 | ||||
|     @api.multi | ||||
|     @api.onchange('partner_invoice_id') | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue