Make inventory opening faster

by fetching all the necessary data in only one query, and passing it around

Change-Id: I3db833858712e8fc84d3cc52fb28942c7735a6bd
Make inventory wizard and adjustment dialog faster

By fetching all the necessary data only once.

Change-Id: I7a39af357023cddcbb229255e967532c592e0a3e
Make report subtitle darker.

When printing it was not dark enought, so it was almost unreadable

Change-Id: I4071eaddf62439ad80112523a0347a166af7dc1a
Fix a few translation issues

Some strings were not marked for translation

Change-Id: Iaa31ffc3ff17d43a072c17e0495132fe1fecdd50
Fix: Cancel last coupon.

- Remove cash from the till when cancel the last sale.
- Create a new till_entry when cancel the last cash in/out to get the total value correctly.

Change-Id: Ia3401a1e4f35ee278a28b91b722dccea9eeccad5
Till report: Dont show payments from returned sales.

Change-Id: Ifa1986b8da84f10bf4057b77663530477d812abc
Changed maintenance filters for cleaner information

* The default search does not include cancelled orders anymore (Not Delivered)
* Split the filters finalized and cancelled in two other filters
* Add a new filter to view all work orders

Change-Id: I32ac7fbc633f940bd52836c3b6ad5937b61b3d22
Fix one more place missing uuid migration

id is not integer anymore. Also, it's not needed, just the sellable
description should be enough.

Change-Id: I221d6cc235063dc0f093a4275c247698b83ac107
Improvements for commissionsearch

* Pass salesperson to the report instead of the salesperson name. It makes more
  sense from the api point of view
* Use for_combo so the results get sorted

Change-Id: Ib67c4050a4362d6f2097405d7edff739c614fdd6
Remove unused Stoq configuration.

Change-Id: I5d0bc453ff4191cb93b34ba0abdd556e3ec04ca8
We should be able to sell services in the optical wizard

fix get_sellable_view_query to also show services

Change-Id: I123f8914d9a42f2bc26f12b10339ee9076699060
Till report: use less space

Fix till report to use less space as possible

Change-Id: If0d6c455f4d1182ed8ba30975ae096147edc7d0b
Rename maintenance to services

It's not used just for maintenance anymore, so use a more generic name.

Change-Id: Ib1add03df5ee69bb9fd51407629ae519a866ec14
Update translations template and pt_BR translations

Change-Id: Iafd945925b76ba4f26cae47c54ec3f9b3f8ff5b6
Optical report: Show sold quantity.

Instead of showing the quantity in the work order item, show the quantity in
the sale item, since thats the actual sale quantity.

Change-Id: I5de47cae4ae878c4b90ca486e0e99a994dae491c
Created a new parameter: Automatic Logout

Perform automatic logout after reach the maximum of idle minutes, defined by user.

Change-Id: I8089bdb4ff36b5fb644f2564efe279fd121005c7
Adjust sale discounts on items with quantity of 1

Since we apply the discount percentage on items, they can generate a 3rd
decimal place, that will be rounded to the 2nd, making the value differ.

Find that difference and apply it to a sale item, preferable to one with a
quantity of 1 since, for instance, applying +0,1 to an item with a quantity of
4 would make it's total +0,4 (+0,3 extra than we are trying to adjust here).

We still need to find a way to workaround when there's just one item on the
sale with more than 1 quantity.

Change-Id: I69b2e11c42706d3b7cfccfd14e419bff6248268a
Allow batches without stock on opticalwizard

* Allow to add a product without available batches for opticalwizard. When
  confirming the sale on till, the batches will be adjusted
* When confirming the same, adjust the work order items together with the
  sale items.

Change-Id: Ib2057620d6e24675a535d8a16c5c5d6de8e90e0e
Consider ValueUnset and test if batch is already basestring

* The entry sometimes will return ValueUnset if empty. Consider it to make it
  possible to erase the batch number and ignore it. In the future we should add
  a remove button for it.
* The batch can come as unicode when editing the item again
  (e.g.  receivingwizard), so consider that possibility and return it directly.

Change-Id: I6b0594dec3e2d31969cb05a9b3d359a5cc0364d2
Make expire date mandatory on opticalwizard

When creating a sale with workorder, it should be mandatory to have an expire
date (used to set the workorder's estimated finish date)

Change-Id: Ib892a327142560f8d7c765923b97768184d6b3e9