Commit Graph
102197 Commits
Author SHA1 Message Date
dufresnedavid cc9113f818 [IMP] Prevent unclosed cursor during tests
If an error happens in an overload of setUp, the already-open cursor
is likely not to get properly released before the next test,
deadlocking the db, because tearDown only runs if setUp has
succesfully completed.

Cleanups were added specifically to run every time, after tearDown has
(potentially) been executed.

closes #8327

Note: cleanups run in LIFO order (as they should).
2015-09-17 12:23:09 +02:00
Martin Trigaux 93c433248e [IMP] base: better help message on report fields
NULL is too technical
Courtesy of Lionel Sausin
2015-09-17 12:10:19 +02:00
Raphael Collet d4a24f3663 [IMP] account: improve doc and add warning on post-install tests 2015-09-17 11:59:03 +02:00
Cedric Snauwaert 3659c0113b [FIX] purchase: fix purchase test to work with new accounting if no coa installed.
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.
2015-09-17 11:37:47 +02:00
Martin Geubelle 52bbe6c0f4 [FIX] crm: wizard style of close reason buttons 2015-09-17 11:34:22 +02:00
Ravi Gadhia 5bae0ce6f4 [FIX] web: autofocus in autocomplete popup on a m2x field
* 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
2015-09-17 11:34:22 +02:00
qsm-odoo 45995b57c0 [FIX] delivery: double button_box in template
Inherited template added a button_box to a formview which already
contained one.
2015-09-17 11:25:09 +02:00
Raphael Collet 7c611a4958 [FIX] stock: fix default values of stock picking (mixing up old and new API) 2015-09-17 11:24:08 +02:00
Nicolas Martinelli b229ab0a5b [FIX] purchase, sale_*: multiple fixes
- 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
2015-09-17 10:43:10 +02:00
pvy efd8d88c41 [FIX] account: add old name to field 'user_type_id' of account_template 2015-09-17 10:03:34 +02:00
Joren Van Onder a11a490d30 [IMP] hw_escpos: support Star TSP650II
In order for the printer to work we need to configure it in USB vendor
mode. This means it will not have a USB interfaceClass of 7. So when
we don't find any USB device that identifies as a printer, we search
for Star devices and use the first one of those we find.

This should be reasonably safe because Star does not manufacture other
devices apart from printers that one would attach to the posbox.
2015-09-17 09:26:33 +02:00
Joren Van Onder ad727be267 [FIX] hw_escpos: don't try too hard to close a printer
Although it might be a good idea to make sure a printer device is
properly closed, trying for >1 min to do so is too much. It can cause a
>1 min delay between receiving a receipt and actually printing. Also,
just because the device is not cleanly closed does not mean that it will
not work when we open it again.
2015-09-17 09:26:33 +02:00
Joren Van Onder 1440dc1c96 [IMP] hw_escpos: don't replace a USBError exception with some string
There's absolutely no point to hiding exceptions like this, it makes
debugging more difficult than it has to be.
2015-09-17 09:26:33 +02:00
Denis Ledoux 2c81ab75c8 [FIX] payment: fees recomputation on transaction amount/acquirer change
Fees were not recomputed when the amount or the acquirer of the
payment transaction was changed.

This can happen if the user clicks on
"Pay now", which creates the transaction and computes
the fees for the first time and then redirects
to the payment provider, and then the user
came back from the payment provider, hitting the previous
button in his browser, for instance, and then
changes the content of his cart (the quantity, or even
the products) or change of payment provider
(from Ogone to Paypal, for instance).

opw-649509
2015-09-16 16:41:30 +02:00
pvy 49a695ff4e [ADD] l10n_hu: menuitems for the hungarian statements 2015-09-16 15:58:43 +02:00
Josse Colpaert 9ac8d9830e [FIX] Change price history and stock valuation report to standard_price on variant
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.
2015-09-16 15:25:03 +02:00
Joren Van Onder 9365ecaada [FIX] hw_proxy: remove forms related to supported devices
The concept of supported devices was removed in
e7c51228f3. These forms should have been
removed with them.
2015-09-16 15:05:04 +02:00
Nicolas Martinelli 4449984c75 [REF] purchase: better overriding possibilities 2015-09-16 14:51:51 +02:00
Xavier Morel a1c878e40f [FIX] account: missing parameter in send_mail
d88c34d1 added an auto_commit parameter to send_email of
mail.compose.message but apparently missed updating at least one
override.

Fix that oversight.
2015-09-16 14:41:12 +02:00
Goffin Simon 8ef590bb28 [FIX] stock_account: stock inventory valuation
The function "open_table" is not called when triggering the action
window "Current Inventory Valuation". Then the 'history_date' is not
set in the context.

opw:649168
2015-09-16 14:18:40 +02:00
Paul Catinean 40c35fb48a [FIX] website: set multilang to Falseon website_image
Add multilang=False to website_image controller to prevent redirects

Because website_image is decorated with website=True
Requests made for the product image at
`/website/image/product.template/xx_xx/..`
triggered redirections to add the language code to the
requests URLs. This redirection was useless, as setting
the language code for images is non-sense.

Adding `websitelang=False` prevents this redirection.

In addition, the redirection could lead to
SSL security concerns, as the redirection
could use the http:// scheme.

Closes #8515
2015-09-16 14:12:44 +02:00
Joren Van Onder 94900dda50 [IMP] point_of_sale: reimplement cash control support
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.
2015-09-16 14:09:41 +02:00
Martin Geubelle 5345961073 [FIX] web_kanban: instant tooltip on tags, without delay 2015-09-16 14:07:30 +02:00
Martin Geubelle 80299af6d5 [IMP] web_kanban: if no tag, the corresponding section should be hidden 2015-09-16 13:42:38 +02:00
Joren Van Onder 8b17079530 [FIX] account: select last bank statement based on date_done, not date
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.
2015-09-16 13:01:52 +02:00
Joren Van Onder 88d851af58 [FIX] account: correctly set the opening amount of a bank statement
_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.
2015-09-16 13:01:52 +02:00
Joren Van Onder f5ad251686 [FIX] account: _compute_values_for_statement_line is not a valid compute
This allows people to use point of sale > sessions > put money in again.
2015-09-16 13:01:52 +02:00
Nicolas Martinelli 2d5776d248 [FIX] sale, sale_stock: do not decrease quantity
In case of exception (refund, return of product), we want to let the
user decides what needs to be done with the quantity delivered or
invoiced.
2015-09-16 12:03:59 +02:00
Nicolas Martinelli 6524300a4b [FIX] sale: do not store invoice_count
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.
2015-09-16 12:03:59 +02:00
Yannick Tivisse c4a1e90891 [IMP] product: Traceback on product_variant_easy_edit_view loading 2015-09-16 12:01:37 +02:00
Raphael Collet bd092e9ce7 [IMP] models: optimize recomputations by saving values in record batches
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!
2015-09-16 11:56:44 +02:00
Raphael Collet 5805b87005 [IMP] api: in todo list, group records to recompute by environment
The effect of this change is to trigger the recomputation of fields on larger
recordsets.  This takes advantage of batch computations within compute methods.
2015-09-16 11:56:44 +02:00
Shivam Dudhat 9d36fe5c52 [IMP] payment: error message and style 2015-09-16 11:30:55 +02:00
rmu-odoo 36483a1f2f [IMP] website_sale: add button 'Configure Transfer Details' to configure the payment provider details. 2015-09-16 11:30:50 +02:00
Rashik kalathiya 897ac590b2 [IMP] lunch: usability improvement
View improved, remove warning message and improve search modal
2015-09-16 11:28:51 +02:00
Josse Colpaert 0f89721cda [IMP] procurement: Integrate procurement_jit in other modules and change to sale_auto_reserve
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.
2015-09-16 11:04:33 +02:00
Olivier Laurent 5ffb09a5df [FIX] account_voucher: use 'voucher' instead of 'self' in _compute_total
Using 'self' triggers a ValueError: Expected singleton
2015-09-16 10:31:05 +02:00
Yannick Tivisse 03d0cac7cc [IMP] hr_equipment: Hide category_id, as it's the same as the stages 2015-09-16 10:07:55 +02:00
Yannick Tivisse e176b4a22e [IMP] Purchase: Add a group in res_config to display 'Vendors Pricelists' menuitem 2015-09-16 10:07:55 +02:00
Yannick Tivisse 0d68a012d0 [FIX] product: product_tmpl_id was displayed on the product_product form view 2015-09-16 10:07:55 +02:00
Xavier Morel 1e2e38b96a [FIX] translate docstrings
rst literals are double-quoted
2015-09-16 10:02:37 +02:00
Goffin Simon 10bd5f797a [FIX] website_version: dependence
The module website_version depends of mail because the model "website_version.experiment"
inherits of 'mail.thread'.
2015-09-16 09:27:04 +02:00
David Monjoie 2a4784431c [IMP] website_form: disambiguate module name wrt website_form_editor 2015-09-16 09:25:56 +02:00
Alexis de Lattre 1d6c92a8c6 [FIX] hr_expense: journal_id domain typo 2015-09-16 00:31:06 +02:00
Olivier Dony 2b1cdd551f [FIX] fields.float: avoid non-deterministic side-effects on other cursors
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
2015-09-15 19:38:19 +02:00
Christophe Simonis f29d81d372 [FIX] product: correct function fields triggers.
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.
2015-09-15 19:24:29 +02:00
Simon Lejeune a693a60082 [FIX] planner: correct tooltip text changes
and only init the tooltip once
2015-09-15 18:09:18 +02:00
odoo-tac c033826492 [FIX] portal : Fixed portal wizard view and traceback that occured when giving portal access to a user. (Thx to RCO for the view fix) 2015-09-15 17:10:06 +02:00
qsm-odoo 9e6f9b4cc7 [IMP] sale: remove useless kanban field contexts
These are not evaluated, kanban fields in creation mode will use the
contexts defined in the form arch defined above.
2015-09-15 17:05:21 +02:00
qsm-odoo 037ee039d1 Revert "[FIX] bug when creating a SO line in mobile view"
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)
2015-09-15 17:05:21 +02:00