The test does not have hardcoded values referring to demo data anymore.
Moreover, in the test, we now use values which are different from the
demo data (621.54 instead of 700). Overall, this will make the test more
robust.
hr_expense: change car travel sale price
Car Travel Expense is used as a product invoiced at sale price.
Therefore, it is more useful to have a cost price and a sale price which
are different.
The whole idea of this commit is to avoid having the same values
everywhere.
With the new pricelist system, a price should be specified for any
supplier, otherwise the price chosen for a PO is zero.
Also add unit price for existing PO
add the stock_journal property in the yml test and make python test depends from AccountingTestCase to prevent errors when launching these test without a localisation. Also raise error in code if no stock_journal is found.
* When the autocomplete popup list appears, the focus should be on first element in list, in order to quick create a new record if no match
* Tour.js has been modified because jquery ui autocomplete needs a mouseenter event to be notified that this element will be set
- Use Many2many computed field instead of One2many: One2many should be
an inverse of a Many2one
- Convert deprecated @api.one to @api.multi
- Minor simplifications in computed fields
As the standard price on the product template changed towards the product variant,
we should also change the product price history to be by variant.
Also the inventory value calculated in the Stock Valuation report should be by variant.
d88c34d1 added an auto_commit parameter to send_email of
mail.compose.message but apparently missed updating at least one
override.
Fix that oversight.
Support for cash control was removed in
c04065abd8. Because the cash_control field
on account.journal was removed, we now define a cash_control preference
on pos.config. In order to set the opening and closing balances the new
AccountBankStmtCashWizard is used.
date is a Date field, whereas date_done is a Datetime field. When using
date, the code failed to successfully select the last bank statement if
there were multiple bank statements being opened on the same day.
_default_opening_balance is used as a default for the balance_start
field. A default function should return the default value, not attempt
to set it on self, which is what was being done when
_set_opening_balance gets called.
Because reasons:
- The field is only used in a stat button, so there is a limited number
of accesses to it.
- The field is computed in a method which is used to compute
invoice_ids, which is not stored anyway.
- If some refund_ids are found, invoice_count is not updated in the
database. This is because the refunds are not linked in any way to the
SO or to the original invoice, making impossible to find an
appropriate @api.depends field to monitor.
The recomputation of a field `name` on `recs` is done roughly like this:
for rec in recs:
rec._write({name: rec[name]})
The effect of this patch is to group records by value `rec[name]`, and to
update records in batches like:
recs.write({name: val}) # rec[name] == val for all rec in recs
As a consequence, less queries are issued to the database for updating records.
This improvement is very effective in the case of migrations!
The effect of this change is to trigger the recomputation of fields on larger
recordsets. This takes advantage of batch computations within compute methods.
As procurement_jit has been optimized (by running multiple procurements at once),
it does not make sense to still have a module that without it, does not generate Pick > Pack > Ship
automatically, but only Ship. We can do it anyways.
That way, the procurement_jit module can become clearer in its functionality to the user: when
a sale order is confirmed, it will automatically reserve the picking from the stock location (in case of MTS)
and people who don't want that functionality can still immediately have the Pick > Pack > Ship.
Make sure also push_apply works with manually created pickings.
The function field `volume` and `weight` on product.template were not
recomputed correctly.
The function field `standard_price` should not be stored as it's based
on a property field. Add a search function on it.