【发布时间】:2017-08-25 08:14:43
【问题描述】:
我有 2 个模型:product.template 和 product.brand。
我想显示来自 product.template 及其品牌的详细数据,我可以从 product.brand 的模型中获得该品牌。在模型 product.brand 中包含 product_id,它与 product.template 中的 id 有关系。这是我当前的代码。此代码仅显示来自 product.template 的数据。
<?php
$products = $ripcord->execute_kw('myDB', 1, 'myPassword',
'product.template', 'search_read',
array(
array(
array('name', 'ilike', 'pixma'),
array('type', 'ilike', 'product'),
['fields'=>array('name', 'description'), 'limit'=>5]
)));
?>
如何将 product.template 模型与 product.brand 加入,以便获得数据的产品品牌。谢谢。
【问题讨论】: