Skip to Content
Menu
This question has been flagged
1 Reply
1127 Views

Hi, I'm considering getting a list of pricelist on the contacts view

The price list table has several rows. And I want to show that row as a selection list
Is there anyone who can help with this?


== Models ==

from odoo import models, fields

class myclass(models.Model):
_inherit = 'res.partner'

pricelist = fields.Reference([('product.pricelist', 'name')])


== View ==

field name="pricelist" string="Pricelist"   
Avatar
Discard
Best Answer

Hi,

By default there is a pricelist many2one field in the res.partner model in odoo, still you need an another one ?

If so, a many2one field will solve your problem ? 


pricelist_id = fields.Many2one('product.pricelist', string='Pricelist')


Thanks

Avatar
Discard