Giter Club home page Giter Club logo

odoo_pos_autoclose's Introduction

Odoo POS Session Auto Closer

This script allows you to automatically close Point of Sale (POS) sessions in Odoo that are in a 'closing control' state. It validates all orders in the session and then closes it. I've tested this only on Odoo Version 12. Feel free to submit pull requests for other versions of Odoo.

Requirements

  • Python 3
  • Odoo installation with XML-RPC enabled
  • Odoo database credentials with permissions to manage POS sessions

Usage

To use the script, simply run it with Python 3 and pass in the IDs of the POS sessions you want to close as arguments. For example:

python3 close_session.py -pos=11,13
# optional with maximum cash register difference, this will overwrite the default of 1500
python3 close_session.py -pos=11 -maxdiff=1000

This will close all POS sessions with IDs 11 and 13.

Setup

Before running the script, you will need to set up the following environment variables:

  • ODOO_URL: the URL of your Odoo instance
  • ODOO_DB: the name of your Odoo database
  • ODOO_USERNAME: the username for your Odoo account
  • ODOO_PASSWORD: the password for your Odoo account

You can set these variables in your .bash_profile file.

The script also logs all activity to a file named 'closing.log' in the same directory as the script.

Contributing

Feel free to submit a pull request or open an issue if you have any suggestions or find any bugs.

License

This script is licensed under the MIT License.

odoo_pos_autoclose's People

Contributors

dkrimmer84 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.