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

Opening POS normally happens from the Point of Sale module dashboard. This seems to be done by the methods open_ui, open_session_cp and open_existing_session_cp in the PosConfig class.


But when calling one of these methods from another module, nothing at all happens. All of these methods return a small object, ie for open_ui it looks like this:

{'url': '/pos/web/', 'target': 'self', 'type': 'ir.actions.act_url'}

This somehow doesn't get triggered when I call open_ui from another module like this

// id = 1 do exist
pos = self.env['pos.config'].browse(1)
pos.open_ui()
// Nothing..

I've tried to span the code to try to find why, but I'm stuck. Any expert help would be greatly appreciated, thanks!

ps.

The reason I'm doing this, is because I need to "hack" POS a bit to customize floor plans, since POS is the only place to edit a floor plan. So basically I have a restaurant that is fully booked every day with different floor plans each day, so an admin need to fix a new floor plan each day organizing tables (numbers of tables and sizes can change from day to day)




الصورة الرمزية
إهمال
أفضل إجابة

Are you returning whatever you are getting from open_ui() method?

return pos.open_ui()



الصورة الرمزية
إهمال
الكاتب

No. How silly of me! Thank you Sundhir :)

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 24
2502
2
مارس 15
4435
1
يونيو 25
831
1
يونيو 25
875
2
فبراير 25
1526