コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1495 ビュー

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"   
アバター
破棄
最善の回答

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

アバター
破棄