Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
3177 Prikazi

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.






Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
apr. 23
6126
3
apr. 17
11441
1
maj 16
9023
1
apr. 16
9406
1
jan. 24
2209