[FIX] point_of_sale: remove datas_fname field

Since the field datas_fname doesn't exist anymore, we should not set it
anymore.

rev: c212cfe899
This commit is contained in:
Pierre Masereel
2019-10-01 10:02:50 +00:00
parent 00a30e1d07
commit 5b8f86a3eb
+4 -3
View File
@@ -627,12 +627,13 @@ class PosOrder(models.Model):
if order_ids and self.env['pos.order'].browse(order_ids[0]).account_move:
report = self.env.ref('point_of_sale.pos_invoice_report').render_qweb_pdf(order_ids[0])
filename = name + '.pdf'
attachment = self.env['ir.attachment'].create({
'name': name,
'name': filename,
'type': 'binary',
'datas': base64.b64encode(report[0]),
'datas_fname': name + '.pdf',
'store_fname': name,
'datas_fname': filename,
'store_fname': filename,
'res_model': 'account.move',
'res_id': order_ids[0],
'mimetype': 'application/x-pdf'