2016-11-04 25 views

回答

1

尝试加入route_ids in product.product object。

例如:

class ProductProduct(models.Model): 
    _inherit = 'product.product' 

    route_ids = fields.Many2many('stock.location.route', 'stock_route_product', 
     'product_id', 'route_id', 
     'Routes', domain="[('product_selectable', '=', True)]", 
     help="Depending on the modules installed, this will allow you to define the route of the product: whether it will be bought, manufactured, MTO/MTS,...") 

有了这些,我们需要更新产品模板的每个变种/选择路由,它不会更新其他产品的不同路由。

+0

我试过了。但仍然相同 – OmaL

+0

这就是我曾尝试过的.stock_route_product是产品模板中指定的关系表。所以我也改变了关系表的名字。仍然无法正常工作 – OmaL

+0

请勿更改* stock_route_product *表并尝试使用它。我已经在我的测试结束,它工作正常。并升级/卸载/重新安装您的自定义模块。 –

相关问题