Hello All,
I found solution for this, its two step process.
1) We need to push the latest dictionary of res.company model in module list.
module.PosModel.prototype.models.push({
model: 'res.company',
fields: [ 'currency_id', 'email', 'website', 'company_registry', 'vat', 'name', 'phone', 'partner_id' , 'country_id', 'fax'],
ids: function(self){ return [self.user.company_id[0]] },
loaded: function(self,companies){ self.company = companies[0]; },
});
Update the new fields in this fields list : fields: [ 'currency_id', 'email', 'website', 'company_registry', 'vat', 'name', 'phone', 'partner_id' , 'country_id', 'fax'], I have added fax no , In base fax no is not used.
2) Extend the PosModel :
module.PosModel = module.PosModel.extend({
models: [{
model: 'res.company',
fields: [ 'currency_id', 'email', 'website', 'company_registry', 'vat', 'name', 'phone', 'partner_id' , 'country_id', 'fax'],
ids: function(self){ return [self.user.company_id[0]] },
loaded: function(self,companies){ self.company = companies[0]; },
},]
});
This is how I achieved , Now I can access that field in Qweb part of POS. is there any better way to do this?
Thanks.
Anil.