跳至内容
菜单
此问题已终结
3 回复
2934 查看

Hi everyone,

I want to change the place of the  "cost price" of an article from the "procurements" to the "information" page in the product template.

the problem is that when I change its place, odoo does not take it in consideration and will not save any modification in its value or even change it.


形象
丢弃
最佳答案

Hello,

First you have to remove field from your page. And than you can add in to another page in same form.

Given code may be solve your problem.

First xpath is remove field from form and second will added field on another page. Try on this way.

 <xpath expr="//field[@name='standard_price']" position="replace">
</xpath>

<xpath expr="//page[@string='information']" position="inside">
    <field name="standard_price" />
</xpath>
形象
丢弃
编写者

Thank you very much it worked it :))))))

最佳答案

Take a look to this example.

Its the same thing that you are looking for.

http://www.odoo.yenthevg.com/xpath-expressions-in-odoo-8/ 

Regards.

形象
丢弃
编写者

I used xpath to change the place of the field ‘standard_price’ and I hided the page 'procurements' because I don't need it the problem is when I want to modify tha value of the cost price it doesn't take it on consideration it mean tha the field that I had modified doesn't work any suggestion