Validate estimated finish date of a SaleQuote.

The estimated finish date of a SaleQuote cannot be in the past. The
Optical Slave was allowing the selection of a estimated finish date in
the past. This patch fixes that.

Change-Id: I69d75e5009b29564c9a60d54d34fb3d4358c5c9f
consoleutils: disable colors when running in PyCharm

The PyCharm console is not supporting colors properly, so just disable it.

Change-Id: Idcdad3f673809619a7f2c8a7b1e898ca45eeffce
PurchaseWizard: can't receive batch items.

You cannot choose to receive batch items in the PurchaseWizard, instead
you have to receive them in the ReceivingWizard.

Change-Id: I24e72c94a9dd1c2304a8487937bdc0932d31f015
Selects a medic automatically when it is created.

In an OpticalSaleQuote, when a medic is created, the combo box
automatically selects it.

Change-Id: I827f45b0468597d4edb9c652c433ccc24a089aad
Fetch work order on store before changing it's status

We were not fetching the order on the new store, so it was being modified on
the app's store

Change-Id: I5bc464b92700914ea961488e9a045dc0844ebd0a
In does not work for null

For getting uncategorized sellables, we cannot use In passing None on the list
since that doesn't work. Instead, test it on it's own query using Or.
Also add a test that would've caught the problem.

Change-Id: I20421891341d653118748c9e7a6d3558da0f1566
Do not add a batch sellable if it's not on inventory

This is hard to reproduce but, sometimes, trying to count a batch sellable
that is not in the inventory would result in it being added as None. This will
avoid that problem.

Change-Id: I48f58cb12f82868c6f7d99017bb47c32d3428852
Don't reset sellable in SellableItemSteps.

When choosing a sellable to add to a container, do not reset the
sellable search string. Maybe the user wants to change just a part of
it. But when back to the input, selects all the string, so if the user
does not want to reuse it, she will only need to type the next search
string.

Change-Id: I71e02ec71d62729bd906d73439134ead3014ff52
Fixes: http://bugs.async.com.br/show_bug.cgi?id=5547
Allow search of card payments from till app

Allow the user to search for a card payment to receive on till app, avoiding 
the need to go to accounts receivable every time for this.

Change-Id: I64c520592c23670f5c5ec2adc627d3bc13915609
fixes: http://bugs.async.com.br/show_bug.cgi?id=5557
Inventory wizard expects the batch number, not the object

Change-Id: Ieef134a7864f557abdb6e3552b20ce5a5e05a485
Rename productadjustmentdialog => inventoryadjustmenteditor

Change-Id: I362199c511a88283e9d000f3d88b78ee09af3eec
Only show batches with stock on available

Batches without stock aren't prefilled on the entry, and also it doesn't make
sense to show them all, since the batch numbers will increase from day to day
and we can end up with *lots* of batches on the list that aren't useful.

Create a StorableBatchView.find_available_by_storable to get only results with
stock and use that to populate the list.

Change-Id: I37e63576a4d0e0d2f9aa6b682fc17df1e6b991db
Credit Provider: add a max installment settings

Add a max installment settings to the credit provider and use that information
when the user selects the credit card with provider installments (instead of the
store installments)

Fixes: http://bugs.async.com.br/show_bug.cgi?id=5489
Change-Id: I811703407654b99018d9ccac7b83a90c4bbabea7
Only allow some operations on wo current branch

Some operations, like work/finish/close, doesn't make sense if we are on a
branch different from the order's current branch, so don't allow that.

Change-Id: Ic0afda03f880a1fb06b5c30dbadde136bbc99260
Prefill categories if editing a pre-sale.

When editing a pre-sale, if there's already workorders associated with
it, fill in the categories of those workorders.

Change-Id: Id02340b278add5148544d99495acd4286390bf0d
Create a report to show details about sale return

Create a sales return report to show details about returned items on a
specific sale.

Change-Id: Idc637f79f68ffa5a4f9d967c0a4e6262645f98e5
Allow default expiration date on sale quote

Create a new parameter to calculate the default expiration date
on sales quote. This parameters sets the number of days to sum up with current
date.

Change-Id: Ic28e606bec6f3aa1f1b385526d3f71f2beec3931
fixes: http://bugs.async.com.br/show_bug.cgi?id=5483