mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Merge branch '12.0' into '12.0-test'
12.0 See merge request hibou-io/hibou-odoo/suite!1369
This commit is contained in:
@@ -2,7 +2,7 @@ from odoo import api, fields, models, _
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
from .gls_nl_request import GLSNLRequest
|
||||
from requests import HTTPError
|
||||
from base64 import decodebytes
|
||||
from base64 import decodebytes, b64decode
|
||||
from csv import reader as csv_reader
|
||||
|
||||
|
||||
@@ -261,7 +261,10 @@ class ProviderGLSNL(models.Model):
|
||||
for i, unit in enumerate(label['units'], 1):
|
||||
trackings.append(unit['unitNo'])
|
||||
uniq_nos.append(unit['uniqueNo'])
|
||||
attachments.append(('LabelGLSNL-%s-%s.%s' % (unit['unitNo'], i, sudoself.gls_nl_labeltype), unit['label']))
|
||||
label_data = unit['label']
|
||||
if label_data and sudoself.gls_nl_labeltype == 'pdf':
|
||||
label_data = b64decode(label_data)
|
||||
attachments.append(('LabelGLSNL-%s-%s.%s' % (unit['unitNo'], i, sudoself.gls_nl_labeltype), label_data))
|
||||
|
||||
tracking = ', '.join(set(trackings))
|
||||
logmessage = _("Shipment created into GLS NL<br/>"
|
||||
|
||||
@@ -34,6 +34,7 @@ class StockPicking(models.Model):
|
||||
_inherit = 'stock.picking'
|
||||
|
||||
shipping_account_id = fields.Many2one('partner.shipping.account', string='Shipping Account')
|
||||
commercial_partner_id = fields.Many2one('res.partner', related='partner_id.commercial_partner_id')
|
||||
require_insurance = fields.Selection([
|
||||
('auto', 'Automatic'),
|
||||
('yes', 'Yes'),
|
||||
|
||||
Reference in New Issue
Block a user