跳至內容
選單
此問題已被標幟
3178 瀏覽次數

I made a field.char in purchase.order_form, and i can fill it:

from openerp.osv import fields, osv

class product_template(osv.Model):

_name = 'purchase.order'

_inherit = 'purchase.order'

_columns = {

'container_number': fields.char(string='Número contenedor', help='Número de contenedor', size = 30),


Now, i want to show that field as readonly in stock.view_picking_form.(in other module i created)  Now its showing the string, but now taking the data filled in puchase order.

from openerp.osv import fields, osv

class product_template(osv.Model):

_name = 'stock.picking'

_inherit = 'stock.picking'

_columns = {

'numero_containers': fields.related('origin','container_number',type="char",relation="purchase.order",string="Número de contenedor",readonly=True),

}



What i am doing wrong.






頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
4月 23
6126
3
4月 17
11441
1
5月 16
9023
1
4月 16
9406
1
1月 24
2210