-
Notifications
You must be signed in to change notification settings - Fork 24
Devinstaller #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Devinstaller #6
Conversation
…an start/stop the server from the systray
Hello, first of all let me said thank you for your contributions to ProxyPoS development. Now let me ask you for keep separate branches for feature so we can better isolate changes and a historic view from merges give us better information on why there have been added some commits or changes into the code. According to the description and the code you have pushed on your commits you are adding two main features, please let me know if I'm correct.
If possible please separate both features on two branches and two merge request. Anyway I'm going to start make some code review and we are going to move forward as you make the changes. Thanks again for devote time to our project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think will be better if we add a command line option allowing people to launch ProxyPoS with or without a graphical interface on a central way, as far as I understand currently there are two ways to launch ProxyPoS and I guess that will be confusing for users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.- An installer for the application.
For this reason we have in our bin path two commands more gtk-proxypos.py and proxypos-server. If one user want to load the gui is shorter write gtk-proxypos than proxypos-server --gtk or something like that. But if is needed give the option to load the gui as an option, it can be added, and also can be added the option to load the config file from another location "--conf=path-to-config-files"
Also I was thinking add some kind of plugin/addon manager, to avoid mess up with the main code and separate the pricipipal API from the customizations. In one hand the core API, and in the other the addons/plugins. This can help in make more easy add functionalities/hardware and keep the main code more clean, even if many people wan't to make their own customizations.
As example:
What happend if I add a custom route to the POS, I need to edit app.py to add it, but is a functionality that, in some cases, I'm the only one that is going to use it.
What happend with an addon system? The server automatically look up for addons and load them. Even can be added the posibility read the addons that you need to load from OpenERP.
The more obvious is the print receipt function. What happend if I made an improvement on some other part of the main code that I wan't to merge with the main code, but I change this function. Represent a little more work for the main code mantainer.
Or even, What if I don't need to use the ESC/POS printer. Just think in the case I develop some hardware that let you find the products in the warehouse. Enter or scan the receipt and bring the products to you, or turn on some ligths that guide you to the products. Then why load the printer or template system?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think is the most idiomatic python solution (http://mundogeek.net/traducciones/python-idiomatico/)
1.- Add an option to set from command line the option to turn on/off graphical interface
2.- Keep the way you design using two different launch scripts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please log all the exceptions instead of screen printing.
1.- Installer: you can test it
This will create on your home
And a systray icon in star form.
To configure your printer right-click on the star icon --> Configure. Go to ESC/POS printer tab (the charSet still not working, I need to fix it), change values and save.
2.- I create the base for templating. Revise the templates in the path templates.
The basic structure of a Template is
The names that you can use in your template are given in the mapping dict inside the init.py
For a simple test
Install imagemagick, download from http://wkhtmltopdf.org/downloads.html the precompiled packages. Uncompress and copy wkhtmltoimage (wkhtmltox/bin) to /usr/local/bin, Then go to the templates directory (proxypos/templates)
You will see the results inside of .proxypos/tmp/
What is missing?
1.- Get templates from .proxypos/templates/ (this is easy to do)
2.- Add the if stament in print_receipt (to allow printing from templates)