Greetings.
Im trying to add a Field in "pos.order" but i can't see the added field.
Could you please les me know my mistake.
ODOO V15
file.js
odoo.define('my_module.models', function (require) {
'use strict';
var models = require('point_of_sale.models')
models.load_fields('pos.order', ['order_new_field'])
Python class
class PosOrder(models.Model):
_name = 'pos.order'
_inherit = 'pos.order'
order_new_field = fields.Selection(
[('1', 'Bla'), ('2', 'Ble')], 'Desc.', default='1')
When i try to read or set the field it is not stored or showed
const PosUsoCFDIInvoice = PaymentScreen => class extends PaymentScreen {
setField(e) {
this.currentOrder.order_new_field = e.target.value
}
}
All Code is executed but no saved in the model.
Thank you