Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Hi there, you've probably found your answer by now, but for those looking for this, here is a step-by-step way of doing it, in Odoo 10:
As Jainesh stated above, you have to find a way of selecting sessions in a "opened" (in progress) state and then calling the proper method in order to close them.
If you look at the FormView of the "close" page of a given POS session (using the developer menu) you'll note that the method that the button "Validate Closing & Post Entries" calls is the following:
You will find this method in the file pos_session.py, around line 238. You have to create a new method in this POS module to select the sessions you want and call this action_pos_session_closing_control method for them:
1. Edit the file your_odoo_server_path/addons/point_of_sale/models/pos_session.py and include the following code:
""" Method called by scheduled actions to close currently open sessions """
return self.search([('state', '=', 'opened')]).action_pos_session_closing_control()
You can place it right bellow the other method, for example. Please mind the spaces, as python has a specific indentation syntax. Restart Odoo's service using: service odoo-server restart
Note that we're creating a new method called "auto_close_pos_session", searching for sessions with state = opened and calling the method we discussed.
2. In Odoo, activate the developer mode and go to "Technical > Scheduled Actions" in the Settings module. Create a new scheduled action and, in the "Technical Data" tab (section "Action to Trigger") provide the following info:
Then give this scheduled action a name, plus the interval and date you want and save it.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 3/30/16, 5:26 AM|
|Seen: 788 times|
|Last updated: 4/16/18, 2:31 PM|