Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
1477 Vizualizări

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"   
Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează