Se rendre au contenu
Menu
Cette question a été signalée


I'm creating a new view for a personalized POS module for my restaurant. It's a specific view for kitchen, already filtered to show just kitchen's related items of a POS order.

Now I would like to show a particular series of product with the name starting with "#" as a unique in a column populated by a new field side by side with the "standard" products. In fact I'm speaking of a set of instructions coded as products to be available on POS and since I was unable to edit the js and css of the pos for suit my needs I decided to create kitchen instructions as a product (service). In my POS there are 3 categories that are not products but instructions (ADD, SUBTRACT, ADDITIONAL NOTE).

What I would like to archive is a view like:

Product 
Note
Quantity
[1007] Pom. Secchi
# + Búfala # - Mussarela
1
[2002] Nutella banana
# + Mussarela
1
[3002] Fanta Uva 350ml

1

The original view is: 

Product
Category
Quantity
[1007] Pom. Secchi
Piadine
1
# + Búfala
Extra-Rid
1
# - Mussarela
Extra-Rid
1
[2002] Nutella banana
Piadine Dolci
1
# + Mussarela
Extra-Rid
1
[3002] Fanta Uva 350ml
Bebida
1

I know I can group field values in a unique, new field with fields.function(_get_concatenate_values) but my problem is how to filter the products before write them respecting the id sequence for the new view. Other than this I need to select just the "#" product between two internal code starting with "[code]" and this is the hard thing to do.

Someone could gently drive me to the right direction?


EDIT:

I can see added pictures on my post during creation/edit but not when I save the post. Is because I don't have enough Karma? 

Avatar
Ignorer
Auteur Meilleure réponse

Solved creating a new module and using directly python and psycopg2. Was complicated but works!

Avatar
Ignorer

Why don't you open source this somewhere on Github for others to learn from Federico? :D I think quite some people would like that.

Auteur

Nah Yenthe, it's not a "quality job" for now. Is just a bunch of .py and sql query mixed with xml. And all need to be optimized. There are so many things still not working as I would. Beside, the module is incomplete and needs some manual works to have it done for example I was unable to build the server actions I need on my templates.xml. Lack of documentation, again. But I'll think on it when I'll have it completely working on V9. Probably I'll need some help from the outside and Git could be a good solution for a alpha/beta test.

Publications associées Réponses Vues Activité
1
mai 21
4837
3
janv. 17
10620
0
juin 15
5075
1
mai 15
9063
1
juil. 19
4375