Skip to Content
Menu
This question has been flagged
3209 Rodiniai

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.






Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
bal. 23
6143
3
bal. 17
11453
1
geg. 16
9046
1
bal. 16
9428
1
saus. 24
2228