Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
1494 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen