Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
3866 Представления

In stock_scheduler_compute_views.xml, there is a view:

<record id="view_procurement_compute_wizard" model="ir.ui.view">
    <field name="name">Run Schedulers Manually</field>
    <field name="model">stock.scheduler.compute</field>
    <field name="arch" type="xml">
        <form string="Parameters">
            <p>
            When you run the schedulers, Odoo tries to reserve the
available stock to fulfill the existing pickings
            and verify if some reordering rules should be triggered.
            </p>

            <footer>
                <button name="procure_calculation" string="Run
Schedulers" type="object" class="btn-primary"/>
                <button string="Cancel" class="btn-default" special="cancel" />
            </footer>
        </form>
    </field>
</record>

If I want to replace this view, I wrote:

<record id="view_procurement_compute_wizard" model="ir.ui.view">
    <field name="name">Run Schedulers Manually</field>
    <field name="model">stock.scheduler.compute</field>
    <field name="inherit_id" ref="xxx"/>

</record>

I read the document, it says ref is the current view's parent view,
In my case, what should I write in <field name="inherit_id" ref="xxx"/>?

Thanks a lot!

Аватар
Отменить
Лучший ответ

if i was you i will never do that >>
for odoo best practic is to not override any odoo records for any reasons supposed that you uninstall your module odoo maybee will by crushed or put you in a thoubleshooting issues so try any other work around to get what you need in a saftey way ..

Аватар
Отменить
Лучший ответ

Hello

you need to write like this

<record id="stock.view_procurement_compute_wizard" model="ir.ui.view">

    <field name="name">Run Schedulers Manually</field>
    <field name="model">stock.scheduler.compute</field>
     <field name="arch" type="xml">
#     here you code
     </field>
</record>
Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
мар. 15
4864
4
сент. 24
24286
fetch parent_id Решено
1
нояб. 22
2793
0
апр. 19
3765
0
июн. 17
6224