Commit Graph
191 Commits
Author SHA1 Message Date
Géry Debongnie 86a87aa8b0 [REF] *: use _rpc method for all rpcs
The _rpc method is now the preferred method to do a rpc, so we need to
update all calls.
2017-04-11 19:44:38 +02:00
Géry Debongnie 6cc324513e [REF] *: remove mixins from web.core
It is better to directly import web.mixins
2017-04-11 19:44:38 +02:00
Géry Debongnie e574027056 [REF] web,*: remove 'web.model' and 'web.dataModel
Use this.rpc instead of Model object, with web.ajax if necessary.

nb: EventDispatcherMixin include now the custom_events managment instead
of widget
2017-04-11 19:44:38 +02:00
qdp-odoo 4f29b77e3d [MERGE] foward port of 10.0 up to revision 84a650e33a 2016-12-30 17:21:25 +01:00
Nils Hamerlinck 73b18964ea [FIX] pos_restaurant: Allow more complex URL schemes for printers
For example: https://abc.def:8080
It is already allowed for the printer in main point_of_sale module.
Apply the same schemes in pos_restaurant.

Closes #13769
2016-12-13 12:04:27 +01:00
Nicolas Martinelli 82a9b77f54 [FIX] pos_restaurant: order of kitchen ticket
When the kitchen ticket is printed, the order lines appear jumbled in
comparison to what is displayed on the PoS interface. This is an issue
since the kitchen cannot link main and side dishes for a given guest.
For example, the following order:
- Steak
- Fries
- Salmon
- Pasta
- Chicken
- Salad

On the kitchen ticket, this could appear as:
- Salmon
- Salad
- Chicken
- Steak
- Fries
- Pasta

The order actually depends on the product id.

The fix is to use the order line id instead of the product id in the
resume dictionary. Although a dictionary is an unordered collection,
most browsers keep the dictionary ordered. For example:
```
var a = {"18": "18", "1": "1", "21": "21", "14": "14"};
for(var i in a) { console.log(i) };
1
14
18
21
```

opw-680796
2016-06-30 18:09:32 +02:00
Darshan Kalola 3de847afd8 [MIG] pos_restaurant : migration to new api
During migration, remove 'set_background_color' method, to directly use js api.
2016-05-31 09:20:11 +02:00
Darshan Kalola 34643da75d [IMP] pos restaurant: prevent an offline table removal from floor screen
- Current pos restaurant with offline mode, when you delete the table from
  floor screen, it would stop everything (you won't be able to create an order
  further) untill your server start again, that is not good indeed.
  Instead we should show the error popup, just like you will get when you click
  on '+' for adding a new table on offline mode.

- Slightly improve the other relevant warning messages.

- Only pos managers can edit the floor screen.
  Before this pos user were allowed to access the edit button (pencil
  icon on floor screen), but they could never update the table detail
  as lack of permission so in this we have prohibited the pos user
  from accessing an edit button(pencil icon).
2016-05-13 09:43:04 +02:00
Joren Van Onder f1598883ab [IMP] pos_restaurant: make floor editing more touchscreen friendly
Before this the table edit handles where quite small. This was no
problem when editing a floor layout with a mouse or perhaps with a
stylus on a touchscreen. It was however very difficult to do with your
finger on a touchscreen.

This increases the size of the handles by a factor of 3. To make room
for this the 4 handles on the sides (non-corner ones) have been removed
on square tables since you can technically do any operation you want
with just the corner handles. The only functionality we lose is resizing
a table while constraining it's width/height, but if such fine grained
control is needed then the tables can still be edited in the backend.
2016-04-20 15:26:59 +02:00
Denis Ledoux 36b26ebaae [MERGE] forward port of branch 9.0 up to ff3184e 2016-02-04 14:41:55 +01:00
Joren Van Onder efe263280d [FIX] point_of_sale, pos_restaurant: temporary orders
pos_restaurant creates temporary orders when splitting the bill. This
ensures those are never saved to persistent storage. As soon as the user
clicks on the pay button, the order is not considered temporary anymore
and will be saved.

Closes #10767
Fixes #10350
opw-666141
2016-02-04 11:50:21 +01:00
Christophe Simonis e765569d04 [MERGE] forward port of branch 9.0 up to f0a63e5 2016-02-02 14:44:39 +01:00
Christophe Simonis fbd5fab238 [MERGE] forward port of branch saas-6 up to 9ca7ad8 2016-02-02 13:18:33 +01:00
Joren Van Onder fb460462d0 [FIX] pos_restaurant: correctly pass arguments from overriden method
When overriding a method that calls its super later on, it's important
that arguments is used to correctly pass all arguments to the super.

Consider the following:

// module 1 (not correct)
method: function(a) {
    return _super.call(this, a);
}

// module 2 (correct)
method: function(a, b) {
    return _super.apply(this, arguments);
}

If the method of module 1 gets called first it will throw away the b
argument when it calls _super. Therefore the b argument will never
arrive in method of module 2.
2016-02-01 14:03:30 +01:00
Julien Legros ddcc62c6dd [MERGE] forward port of branch 9.0 up to 365e298 2016-01-19 11:37:27 +01:00
Christophe Simonis 0a2300318a [MERGE] forward port of branch saas-6 up to 12d9a34 2016-01-18 10:44:50 +01:00
Joren Van Onder 870c0ca59d [FIX] pos_restaurant: stop ghost clicks on iOS
On iOS (at least version 8.3 and up), both Chrome (at least 47 and up)
and Safari emit ghost clicks [1] that added the product normally
rendered under the table widget to the order. So when selecting a table
without any orders you would end up with the table selected, and the
product under the table in the order after just tapping the table.

The issue is that on the table selection screen we listen to touchend
events. On the product selection screen we listen to click
events. Mobile browsers will usually emit both, first the touchend
event, then a small delay, and then the click event. The small delay is
platform dependent. Also, depending on a bunch of circumstances,
browsers adjust this delay time (see [1] for more info).

On Android this never caused issues because there the click is fired
pretty fast after the touchend and more importantly, the click event
still has the table widget as it's target. We don't listen to click on
the table widget so it gets correctly ignored.

On iOS there is a longer delay, and the click event is emitted with
whatever target is currently under the coordinates of the click.

In order to stop this from happening we'll just bind to click when not
editing. When we are editing the floor layout we'll do what we did
before.

We also bind to dragend because on touch devices it is sometimes not
easy to click, especially on small elements. You have to touch and
release the screen without moving your finger. Because the table
selection screen hides overflow there are no downsides to doing this,
and it makes selecting a table much easier and less likely to fail due
to accidental dragging.

Calling preventDefault on the touchend event is another option but did
not work on Android running Firefox 43.

[1] http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/
2016-01-15 13:23:50 +01:00
Christophe Simonis e502b3ea1f [MERGE] forward port of branch 9.0 up to 833fe49 2016-01-06 16:09:34 +01:00
Martin Trigaux 8b4f052a38 [MERGE] Forwardport of branch saas-6 up to c649bb0df 2016-01-05 18:28:06 +01:00
Joren Van Onder 6d43387f58 [FIX] point_of_sale: print amount of guests correctly on ESC/POS receipt
Before this the only thing that would ever be printed was 'Guests: ',
because it was only added when receipt.customer_count evaluated to
false. Another issue is that receipt.customer_count doesn't exist in the
point_of_sale module. It is created by pos_restaurant, so there's where
it should be added to the receipt.
2015-12-18 12:21:30 +01:00
Christophe Simonis d490630745 [MERGE] forward port of branch 9.0 up to b293953 2015-11-25 16:18:10 +01:00
Christophe Simonis 56a442e205 [MERGE] forward port of branch saas-6 up to dade7e3 2015-11-25 13:26:02 +01:00
Darshan Kalola dad1e37825 [FIX] pos_restaurant: transferring order to a table already containing order
Before this, transferring an order to a table which already contains an
order triggered the change on the order already on the table, Not the newly
transferred order. This fixes that by instead explicitly calling
save_to_db() on the transferred order instead.
2015-11-24 13:44:56 +01:00
Darshan Kalola bb1958b5ff [FIX] pos_restaurant: show occupation on round tables
On square tables we graphically display how many people are currently on
the table by making part of the table on the floor screen darker. On
round tables we didn't do this.
2015-11-24 13:38:50 +01:00
Joren Van Onder 0594a63066 [IMP] pos_restaurant: implement order transferring to different table
Provides a 'Transfer' button in the Point of Sale that allows a user to
select a table to which the current order will be transferred.
2015-10-20 13:06:29 +02:00
Joren Van Onder 21caa69519 [IMP] pos_restaurant: remove unused variable 2015-10-20 09:30:52 +02:00
Christophe Matthieu 6baf611df1 [IMP] web: create generic controller '/web/content' and '/web/image'
Replace deprecate controllers like /web/binary/image, /web/binary/saveas...
Use ETag for all content with 'unique' option to cache the content if the content is never changed.
2015-08-21 22:06:52 +02:00
Christophe Matthieu 500c33b184 [IMP] web: split model.js into model.js and data_model.js. Web js modules must call web.DataModel. 2015-07-10 16:32:35 +02:00
Frédéric van der Essen cd2c4a78a2 [FIX] pos_restaurant: fix traceback when trashing a table just after creation. (was referencing not-yet-existing table on the server) 2015-06-09 16:46:24 +02:00
Pankaj Joshi 98d0e3cc4b [IMP] updated icon classes which are renamed in font-awesome v4.2 and removed useless icon-* classes of old font-awesome 2015-06-08 12:52:29 +02:00
Christophe Simonis fe2b5f35a4 [MERGE] forward port of branch saas-6 up to bf1e999 2015-05-28 14:27:38 +02:00
Christophe Simonis 14a7d52307 [MERGE] forward port of branch 8.0 up to 327e471 2015-05-21 14:50:39 +02:00
Nicolas Lempereur 4e8f84053d [FIX] pos_restaurant: changed unit caused issue on splitting
Commit 0fd51c2e6 changed the unit rounding from units from 1 to 0.001,
it was done mainly because it's the default unit and in the interface we
see quantities with 3 decimals after the floating point, so people might
expect to be able to set floating point quantities.

This change caused an issue when splitting a bill in the pos restaurant,
instead of a click being a piece of the product, it was 0.001 part of a
product.

This fix overrides the rounding of units in this case.

closes #6780
opw-639865
2015-05-20 14:25:24 +02:00
Frédéric van der Essen 623443eee4 [FIX] pos_restaurant: remove useless console.log() 2015-05-04 14:13:46 +02:00
Frédéric van der Essen 7c5a6c48c7 [IMP] pos_restaurant: show a message explaining how to create a table when the floor is empty. 2015-05-04 14:13:44 +02:00
Frédéric van der Essen fb93cc2509 [IMP] pos_restaurant: set default #customer to 1 for all tables. 2015-05-04 14:13:44 +02:00
Frédéric van der Essen ebeb3caa62 [IMP] pos_restaurant: better feedback for skipped orderlines (kitchen printing) 2015-05-04 14:13:43 +02:00
Frédéric van der Essen d58e5309dd [IMP] pos_restaurant: allow to print bill with web printing 2015-04-07 14:36:43 +02:00
Frédéric van der Essen 10f5001c25 [IMP] pos_restaurant: allow to print bill with web printing 2015-04-03 18:12:41 +02:00
Martin 99b9037716 [IMP] point_of_sale : display full note on receipt and display change after print 2015-04-01 17:45:23 +02:00
Martin 7862013245 [IMP] point_of_sale : display full note on receipt and display change after print 2015-04-01 15:26:34 +02:00
Géry Debongnie 4fdf74fe21 [IMP] web+addons: improvement to module system
The module system needs to know the dependencies of a given module
before executing the function.  This is why the dependencies were
defined once in an array, and then were described one more times in the
call to require.

But a trick can simplify this: the boot function can parse the string
representation of the module and extract the calls to require from it.
It is more work for the processor, but it leads to simpler module
definitions.
2015-03-18 09:23:37 +01:00
Géry Debongnie 90050c24bb [REF] pos_X: update to the new module system 2015-03-18 09:09:22 +01:00
Frédéric van der Essen 5ec43630ea [IMP] pos_restaurant: automatic numbering of new tables. 2015-02-02 16:29:34 +01:00
Frédéric van der Essen 9b1c55cd17 [FIX] pos_restaurant: could not deselect tables anymore. 2015-02-02 16:29:33 +01:00
Frédéric van der Essen 08743cded7 [IMP] pos_restaurant: full screen floor plan on all devices 2015-02-02 16:29:33 +01:00
Frédéric van der Essen 6fa6a8ba5d [FIX] pos_restaurant: put edit bar above the tables 2015-02-02 16:29:33 +01:00
Frédéric van der Essen cba01cdd2c [IMP] pos_restaurant: skip loading the kitchen printing skipping when skipping loading printers 2015-02-02 16:29:32 +01:00
Frédéric van der Essen 82ae362aba [IMP] pos_restaurant: allow temporarily skip some order lines when kitchen printing 2015-02-02 16:29:32 +01:00
Frédéric van der Essen 3335a79e6b [IMP] point_of_sale, pos_restaurant: Table seats 2015-02-02 16:29:32 +01:00