- Feb 14, 2016
-
-
Odoo Translation Bot authored
-
- Feb 09, 2016
-
-
Joren Van Onder authored
The POSBox attempts to maintain whatever Wi-Fi connection it has as best it can. When it loses it's current Wi-Fi connection it will attempt to recreate it every 30 seconds. This works well, but a side-effect of this is that it'll also print a 'Could not connect to LAN' ticket every time it fails. If you where to leave the POSBox with Wi-Fi on for an extended period of time you could return to a lot of 'Could not connect to LAN' tickets. This makes it so that the 'Could not connect to LAN' ticket only gets printed once upon connection loss. Although it would be simpler to just not print this ticket at all when losing connection, it is very useful to know when the POSBox has lost connection. Otherwise when it loses connection it would stop working and noone would know why.
-
Denis Ledoux authored
When converting a new API call to an old API call, the context is expected to be found within the kwargs argument. If not, it is seen as a regular argument. See `get_context_split` in `openerp/api.py` As it was not the case in the overidden method `search` in `marketing_campaign.py`, if a module overriden the method `search` of `ir.actions.report.xml` using the new API, the context wasn't treated as such correctly, and it leaded to wrong number of arguments passed. I take the opportunity to pass all arguments that are passed as kwargs in the base `search` as kwargs as well, to be clean. opw-668471
-
Raphael Collet authored
Specifically, when one API implementation calls the other one, it has to call the method *from the same class*. Otherwise, overriding the method may result in an infinite recursion. Consider: class A(Model): _name = 'stuff' @api.v8 def foo(self): return 42 @api.v7 def foo(self, cr, uid, context=None): return self.browse(cr, uid, [], context).foo() class B(Model): _inherit = 'stuff' def foo(self, cr, uid, context=None): return super(B, self).foo(cr, uid, context=context) + 1 and now call: `env['stuff'].foo()`. This invokes `B.foo` (new-API), which calls `B.foo` (old-API), which calls `A.foo` (old-API), which calls `B.foo` (new-API) instead of `A.foo`! This issue would not be present if old-API `A.foo` was defined as: @api.v7 def foo(self, cr, uid, context=None): return A.foo(self.browse(cr, uid, [], context))
-
Laurent Mignon authored
When generating SQL queries, `column._symbol_c` must be used as placeholder as for the method 'set' of the column itself. Otherwise it is not possible to define specialized columns.
-
- Feb 08, 2016
-
-
Denis Ledoux authored
This is related to revision 80b373f1. The above revision leads to the inability to import new records without any `xml_id` set Technically speaking, this is because you cannot concatenate `False` with `'_'`, in `xml_id + '_'` opw-668962
-
- Feb 07, 2016
-
-
Odoo Translation Bot authored
-
- Feb 05, 2016
-
-
Olivier Dony authored
-
- Feb 04, 2016
-
-
Cédric Snauwaert authored
The result of searching on a o2m field for a missing ID was the whole set of records which do not have any lines in the o2m fields. This is definitely not the desired behavior, and could lead to disatrous performance, because the returned set could be extremely large. One example of such behavior is for recomputing fields in the env cache in 8.0+. When a o2m line gets deleted, it triggers the recompute of any dependent fields. In order to locate the records to recompute, the ORM searches for the 'parent' records in the comodel table. When this operation is done by 2 users concurrently the o2m line may not exist anymore, and the bug is triggered: dependent fields are recomputed on a possibly very large set of records that did not need any recompute!
-
Antonio Espinosa authored
Apply the same behaviour as the unlink done on account.invoice.line. This should properly be implemented with a ondelete=cascade but this is not possible in stable version as it requires an update.
-
Raphael Collet authored
-
Raphael Collet authored
The recursion was based on an incorrect assumption: the cache of the target environment is initially empty. If another computation left some value there, the copying is incomplete, and that causes bugs in onchanges.
-
- Feb 03, 2016
-
-
Olivier Dony authored
-
Denis Leemann authored
The kanban CSS applies both a 90 degree rotation and a top-bottom rtl writing mode to folded kanban group titles. This was initially fine because browsers didn't support the (SVG) "tb-rl" value for writing-mode and the property was thus ignored. Firefox 43 (December 2015) and Chrome 48 (January 2016) added support for this value, and thus now end up with a 180 degree rotation on the title. Issue #7955 fixed it in 8.0 due to MSIE impact, this is essentially a backport to 7.0. close #10687
-
Martin Trigaux authored
This controller was very slow as not providing a pricelist computed the price of all products of all pricelists. Instead only fetch the prices for the useful products.
-
bima authored
Could incorrectly rename the stock.location.path objects, and in case the route has push_ids but no pull_ids would crash the method entirely. closes #10747
-
Olivier Dony authored
-
Olivier Dony authored
-
- Feb 02, 2016
-
-
Olivier Dony authored
-
Olivier Dony authored
-
Olivier Dony authored
Handling update/create of existing values is already handled by ir.values.set() itself.
-
Xavier Morel authored
-
Xavier Morel authored
While the signature makes sense in an old API context (sort-of) it's very easy to misuse in a new API context as one'd expect `has_group` to use the subject (recordset), not the user in the environment, compounded by ``env.user`` being browsed as administrator, resulting in the "obvious" ``env.user.has_group(foo)`` checking if the administrator (rather than the current user) has the specified group. Adds a divergent v8 version of has_group which first checks if it's called on a non-empty recordset, and in that case use the recordset id, otherwise fallback on the context user (to handle new API conversions which used the "correct" call convention rather than the obvious one). fixes #9649
-
Nicolas Martinelli authored
Both UoM and UoS quantity change should be propagated. Fixes #10623 opw-667805
-
- Feb 01, 2016
-
-
Raphael Collet authored
-
Goffin Simon authored
When writing on a recordset with duplicates, the ORM raises a `MissingError` because the rowcount gives a difference with the injected ids. The fix simply eliminates duplicates from ids.
-
Martin Trigaux authored
When a record is exported, an external ID, in the form of __export__.<model>_<id> is created on this record. When the translations are generated (e.g. "synchronise terms" wizard), the translations may be duplicated for records that have been exported. If a translation is submitted before the export (when the record had no external ID yet), a new empty translation is created as the module differs in the import. Creating a new translation may be a problem as the new term (equal to the source term) will be used as the translation value. Fixes 9480
-
Goffin Simon authored
The margin in a SO line is the difference between the price unit and the cost price of this SO line. In function "_product_margin" in model "sale.order.line", the cost price is equal to the purchase_price or the standard_price of the product. Then the cost price in the SO line must be set with the same value when creating SO line linked to the delivery. opw:668090
-
Denis Ledoux authored
The order of a bank statement lines is entirely done on the sequence: `_order = "statement_id desc, sequence"` The `create` method of `accounT.bank.statement` is overriden to handle the sequences of each line. The `write` method as well, except that the set of the sequences lines is done after the call to `super`. So, if you add several new lines to a bank statement, the order of the line you just added can be different before and after save, as the sequence of these new lines are not set before actually writting them on the bank statement. The widget `handle` serves this sequencing purpose. The fact it isn't used here is most-likely because it did not exist at the time this was designed. Besides, this gives the possibility to the user to add a new line and re-order it where he wants. For instance, when manually entering a bank statement, a user could skip unintentionally a line. If he would like to add it at the right place, before this revision, he would have to delete all the lines coming after the line he skipped. Now, he can add it at the end, and re-order it where he wants. What is done in the overriden `create` and `write` is now useless, but we left it for retro-compatibility purposes, for databases updating their sources without updating their views. opw-667541
-
Odoo Translation Bot authored
-
- Jan 29, 2016
-
-
Xavier Morel authored
-
Goffin Simon authored
The system cannot create two inventory adjustements in state 'in Progess' with the same product, with the same location, same package, same lot and same owner. Example:if two adjustments(ADJ1, ADJ2) are created with the same product(P) and with the same location(L), let's say: qty_available for P is 10 in ADJ1: Theoritical Quantity=10 and Real Quantity=20 => a quant with +10 is created in ADJ2: Theoritical Quantity=10 and Real Quantity=30 => a quant with +20 is created When ADJ1 is validated then qty_available for P is now 20(that 's ok) When ADJ2 is validated then qty_available for P is now 40(that's wrong because the Real Quantity is expected which is 30) This is why this fix is required. opw:660658
-
Xavier Morel authored
According to PEP302, the signature of `Finder.find_module` should be `find_module(fullname, path=None)`. Ever since it was introduced in 64ec5f36 the addons import hook defines the second parameter as mandatory, which is an issue for systems relying on the specified behaviour (and not needing to provide a path) like the stdlib's `pkgutil.find_loader`. fixes #10670
-
Raphael Collet authored
-
Raphael Collet authored
-
Raphael Collet authored
Borrowing a cursor each time you access `field.digits` may be costly, because of the connection reset. Moreover, in most cases, the cursor is not used at all, since the decimal precision are kept in cache. For the installation of module `product` with its demo data, the number of cursor allocations was reduced from ~1500 to about 50!
-
Joren Van Onder authored
Usually when setting up a POSBox you want it to have a static IP. The best way to do that is by configuring whatever DHCP server is used (usually just on the router) to always assign the same IP to a certain MAC address (naming depends on what is being used, sometimes it's called static DHCP but it's also known as DHCP reservations and a bunch of other names). The process of setting this up is complicated for a non-technical user, and this attempts to make it a little bit easier to do by immediately giving them the correct MAC address they should use. To avoid confusion this only prints the MAC addresses for interfaces which have an IP address.
-
- Jan 28, 2016
-
-
Nicolas Lempereur authored
With 003d85bc instead of getting the name of the relation field_relation we get field_relation/id which will get us an xmlid instead. But the data about related fields are not gotten all at once when opening the export modal. They are gotten by clicking on the arrow of the related record. It is in this data that the /id will be appended for the field, but when getting a saved export list, this data may not be available. This commit immediately add the `/id` when a field is put in "Fields to export" column, so this inconsistency is no more. closes #10640 fixes #10327 opw-665994
-
Denis Ledoux authored
Backport of revisions - 100d604c - ddd3e08f opw-667814
-
Raphael Collet authored
Traversing new records in a different cache requires that all new records on the path are copied across caches. Make the copy across caches recursive when the first record on the path is a new record.
-