Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1707 Lượt xem

I want to create a sale.order from the event.booth.form via a button like this:

https://shottr.cc/s/GHmR/SCR-20220908-lxrp.png


When i click on the button I want a form to pop up, where i can select the partner and then it should create a sale.order with the booth selected as the product.

I'm not sure, how to do this, but this is my attempt:

record id="event_booth_registration_action" model="ir.actions.act_window">
<
field name="name">Select an event boothfield>
<
field name="res_model">event.booth.registrationfield>
<
field name="view_mode">formfield>
<
field name="target">newfield>

I am trying to open the form for the event_booth_registration

This is what the form I created looks like:

<record id="event_booth_registration_view_form" model="ir.ui.view">
<field name="name">event.booth.registration.view.formfield>
<
field name="model">event.booth.registrationfield>
<
field name="arch" type="xml">
<form>
<group>
<group>
<field name="partner_id" readonly="1"/>
<
field name="event_booth_id" readonly="1"/>
group>
<
group>
<field name="event_booth_registration_ids" options="{'no_create': True, 'no_open': True}" widget="many2many_checkboxes" domain="[('event_id', '=', event_id), ('event_booth_id.halle_id', '=', halle_id)]"/>
<
field name="plan" widget="image"/>
group>
group>
<
footer>
<button string="Fertig" class="btn-primary" special="save"/>
<
button string="Abbrechen" class="btn-secondary" special="cancel"/>
footer>
form>
field>
record>


I added the "done" and "cancel" button, but i'm not sure how to create a sale order that has the booth as product when the user clicks "fertig" a.k.a. "done"

I have looked at other code and it seems like a js_class in the

tag might help me, however i do not know, how that works or what to do it


What is the best way to achieve this?

Thank you for your help.


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 10 25
2880
1
thg 9 25
2871
3
thg 7 25
4210
1
thg 5 25
2304
4
thg 5 25
3667