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

I have a new form which is integrated with a customized button on sale order lines.

I have product_id and partner_id on my new form just as they are on sale.order.I want to automatically fill my form fields . But instead of inheriting one field it is inheriting the whole sale.view_order_form into my new form

Inheritence code is 

class ManufactureForm(models.Model):
_inherit = {"sale.order": "product_id"}
_name = 'manufacturing'
In my XML file

<record id="manufacturing_form_view" model="ir.ui.view">
<field name="name">Manufacturing Form View</field>
<field name="model">manufacturing</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">

Please guide me thru it because m a beginner
Ảnh đại diện
Huỷ bỏ
Tác giả

Someone please reply

Tác giả Câu trả lời hay nhất

No i have already added a button in sale.order.line which opens a new form. Now i want that the product which i select in sale order will be fetched automatically into new form and user do not have to fill a field twice.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello ,

In your Question you define you want to add new button in sale order line  but in you're inherit sale order

so Change this on.


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 23
3474
3
thg 4 23
2549
3
thg 12 22
34201
1
thg 11 22
3609
2
thg 3 18
5031