odoo-13

what does attachment=True do odoo 13

一世执手 提交于 2021-01-28 04:57:16
问题 I created a custom module in which I have this field record_file = fields.Binary(string='file', attachment=True, help='Upload the file') from what I understand attachment=True should save my images or pdfs to ir.attachment but am not seeing any there am I doing something wrong 回答1: You are not doing something wrong, ir.attachment records are hidden when the value of res_field (a Char field) is set. When you upload the file and save, an attachment is created and the value of the res_field is

How to programmatically create a sale order line (Odoo 13)

梦想的初衷 提交于 2020-12-12 11:07:34
问题 I have a sales record models.execute_kw(db, uid, password, 'sale.order', 'create', [{ 'partner_id': 10, 'order_line': [(0, 0, {'product_id':1,'product_uom_qty':2}), I need to be able to create 'order_line' programaticaly based on a number from a variable. For example if variable = 3 models.execute_kw(db, uid, password, 'sale.order', 'create', [{ 'partner_id': 10, 'order_line': [(0, 0, {'product_id':1,'product_uom_qty':2}), 'order_line': [(0, 0, {'product_id':1,'product_uom_qty':2}), 'order

How to programmatically create a sale order line (Odoo 13)

为君一笑 提交于 2020-12-12 11:06:20
问题 I have a sales record models.execute_kw(db, uid, password, 'sale.order', 'create', [{ 'partner_id': 10, 'order_line': [(0, 0, {'product_id':1,'product_uom_qty':2}), I need to be able to create 'order_line' programaticaly based on a number from a variable. For example if variable = 3 models.execute_kw(db, uid, password, 'sale.order', 'create', [{ 'partner_id': 10, 'order_line': [(0, 0, {'product_id':1,'product_uom_qty':2}), 'order_line': [(0, 0, {'product_id':1,'product_uom_qty':2}), 'order