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.
In 5efac22043 and
1cf5723835 the computation
of the decimal precision of float fields was modified to
reuse a random cursor from the request environments.
Environment.envs is a WeakSet, subject to unpredictable
garbage collections.
This could cause hard-to-diagnose problems by executing
a SELECT query in a cursor that is supposed to be
otherwise idle and untouched.
As an example, this could cause a transaction start in a
cursor that was just committed/rolled back,
and was waiting for another operation to complete.
One such case happened semi-randomly during a module
installation triggered from the web client, where the request
cursor is committed and waiting for the registry
initialization done with a different cursor,
in the middle of _button_immediate_function()
After the registry initialization, the request cursor is
used again to determine the next action (ir.actions.todo),
and this could cause a TransactionRollbackError if the
request cursor was used during the initialization.
Using a new cursor every time is much safer, simpler,
and will not cause any significant performance hit,
because it will usually grab an available connection
from the connection pool, rather than create a new one.
Fixes opw-649151
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.
This reverts commit 1c81d601c9.
This fix was not useful anymore since the previous commit fixed
the problem for context forwarding for:
formview -> m2m_kanban -> record creation (formview dialog)
Contexts in formview which contained parent.[some_field] were not able
to be evaluated when creating a record from a many2many_kanban because
the parent view was not given to the creation dialog.
Sphinx.set_translator is a Sphinx 1.3 API, and we only require Sphinx
1.2 at this point. Replace the use of set_translator with explicitly
setting the ``html_translator_class`` config setting.
small fix in example for creating a request
DB_SOURCE was not defined. FILENAME was to be used.
Also reordered the fields so as to have the most important ones at the
beginning.
* alter docstring of @api.one to mark it as deprecated for 9.0,
recommend using @api.multi instead
- deprecation notes were not correctly styled, add styling
matching "warning" alerts
* move @api.one down the doc page to deemphasize it
* fix "backend" tutorial to remove all instances of ``@api.one``
closes#8527
This method generates many queries on:
- `ir.module.module`, to known whether a given module is installed;
- `ir.actions.act_window`, to know whether a given action exists.
Add a cache for both cases. The number of queries is reduced by 90%.
- Fixed the module name and category in manifest
- Fixed website_form_blacklisted being ignored
- Unauthorized readonly and magic fields
- Reset the form on successfull submit
- Added missing date field
- Added date and datetime validation