Odoo Help


This community 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.


Odoo7: Copy shop_id to stock move

chen rong
on 9/14/14, 11:29 PM 548 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 4 7
Bikaner, India

OpenERP Devloper 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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


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