Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3176 Переглядів

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.






Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
квіт. 23
6126
3
квіт. 17
11441
1
трав. 16
9023
1
квіт. 16
9406
1
січ. 24
2209