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