تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2164 أدوات العرض

here is action which the button is calling.

I want to pass data from my O2M lines to another form's O2M lines on a button click which is of type action. Is there any way to do that? also this button and action is odoo's default

<record id="sale_action_quotations_new" model="ir.actions.act_window">
<field name="name">Quotation</field>
<field name="res_model">sale.order</field>
<field name="view_mode">form,tree,graph</field>
<field name="domain">[('opportunity_id', '=', active_id)]</field>
<field name="context">{'search_default_opportunity_id': active_id, 'default_opportunity_id': active_id}</field>
</record> this is the button
<button string="New Quotation" name="%(sale_action_quotations_new)d" type="action" class="oe_highlight"
context="{'search_default_partner_id': partner_id,
'default_partner_id': partner_id,
'default_team_id': team_id,
'default_campaign_id': campaign_id,
'default_medium_id': medium_id,
'default_source_id': source_id}"/>
الصورة الرمزية
إهمال
أفضل إجابة

Hi,

I am understand why you need context in button.

You can do one thing, create one method which call on button click and from there you can open or call any view with your choice context or any data.

Thanks

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 21
4145
0
أغسطس 19
3409
3
مارس 15
9057
1
ديسمبر 22
8391
1
مارس 18
10000