コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
2912 ビュー

I am trying to use action button but m unable to make it perform any action. My button and new form is in the same module .Please help

< button name = "% (Sale_inherit.manufacturing_form_view) d" type = "action" string = "Manufacturing Details" class = "oe_highlight oe_inline" />

This is for form and also py code

class ManufactureForm (models.Model): 
_name = 'manufacturing_form'
manu_det = fields.Char ( string = 'Manufacturing details' ) soal = fields.Integer ( string = "sole" ) partner_id = fields.Many2one ( 'res.partner' , string = 'Customer' ) product_id = fields.Many2one ( 'product.product' , string = 'Product' )



< record id = "manufacturing_form_view" model = "ir.ui.view" > 
< field name = "name" > Manufacturing Form View </ field >
< field name = "model" > manufacturing_form </ field >
< field name = " arch " type = " xml " >
< form >
< sheet >
< group >
< group >
<field name = "product_id"/>
< field name = "partner_id" />
</ group >
</ group >
</ sheet >
</ form >
</ field >
</ record >
< record model = "ir.actions.act_window" id = " manufacturing_form_action "
< field name = " name " > Manufacturing Form View </ field >
< field name = " res_model "> manufacturing_form </field >
< field name = "view_type" > form </ field >
< field name = "view_mode" > tree, form </ field >
</ record >

< menu item id = "shoe_manager" name = "Shoe Manager" />
< menuitem id = "manufacturing_main_menu" name = "manufacturing_form" parent = "shoe_manager" sequence = "3"action = "manufacturing_formcore" />
アバター
破棄
最善の回答

hello

into the button you have to give the action id, try like below changes.

<button name="%(Sale_inherit.manufacturing_form_action)d" type="action" string="Manufacturing Details" class="oe_highlight oe_inline" />


アバター
破棄
著作者 最善の回答

it is not giving me any error but it is also not opening the form ...can you tell me why is that? I'll be very thankful

アバター
破棄

did you tried with the solutions which i was given

著作者

yes i have just tried it and then upgraded the module but same.. no error but form isnt opening too. Do you think action button is right for this? I am placing this button in sale order lines by inheritence

yes action button is right. and make sure please do not add addition space into the xml id

like id = " manufacturing_form_action ". so remove the space from id. and also check the access rights for your new object.

著作者

do i have to create another item in access control list?Please guide me through it

no need to create another items. whatever you create the item in access control list give the full rights like 1,1,1,1 for create write delete read. and then try.

著作者

I was able to do it at last. Thank you so much for your help

関連投稿 返信 ビュー 活動
3
11月 19
17929
3
4月 17
2488
0
4月 17
5064
1
3月 22
26247
2
10月 18
5025