Odoo Help


Odoo7: Copy shop_id to stock move

chen rong
on 9/14/14, 11:29 PM 929 views

I want copy shop_id to stock move, I try using field.function column but not successed 

Is there any easy way?



class stock_move(orm.Model):
    _inherit = "stock.move"

    _columns = {
        'shop_id': fields.related('picking_id', 'shop_id', type='many2one',
                                  relation='stock.picking', string='Shop', store=True)}


"Field 'shop_id' does not exist in object 'browse_record(stock.picking, 1)'"

I use erppeek get 

>>> model('stock.picking').browse(1)
<Record 'stock.picking,1'>
 >>> model('stock.picking').browse(1).shop_id
<Record 'sale.shop,3'>
 >>> model('stock.picking').browse(1).shop_id.name





| 5 5 7
Bikaner, India

OpenERP Developer at SunARC Technology

On 9/15/14, 1:32 AM

using related filed to show shop_id in stock move 


It occurs same error as I try field.function : "Field 'shop_id' does not exist in object 'browse_record(stock.picking, 1)'"

chen rong
on 9/15/14, 2:05 AM

pls can u post your code?..

on 9/15/14, 2:06 AM

and I use erppeek find >>> model('stock.picking').browse(1) >>> model('stock.picking').browse(1).shop_id >>> model('stock.picking').browse(1).shop_id.name 'XXX'

chen rong
on 9/15/14, 2:09 AM

stock.picking table shop_id column not available so its shows error. let me know shop_id field copy form which table?..

on 9/15/14, 3:52 AM

Thank you ,I solved the problem,I forget fill the field in form and I was misdirected by wrong database

chen rong
on 9/15/14, 5:09 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 9/14/14, 11:29 PM
Seen: 929 times
Last updated: 3/16/15, 8:10 AM