- 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
-
- 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.
-
Denis Ledoux authored
Copy the structure of the sale order report regarding the partner, invoice and shipping address. Besides, on a repair order, this is possible to set a shipping address without setting an invoice address (if no invoicing is set). In such a case, the `Invoice address:` must be hidden. opw-666506
-
Luc De Meyer authored
context -> context=context in writes within validate. This is required for super().write with new api. Closes #10645
-
- Jan 27, 2016
-
-
Jeremy Kersten authored
Who has eaten the s ?
-
Denis Ledoux authored
This is possible to unreconcile and then remove journal items associated to `account.voucher.line`. When it's done, the voucher is within a corrupted state, with debits and credits lines without journal item, which is required. Because the journal item of this line is empty, while required, this is no longer possible to use the "Unreconcile" button, because the form is invalid. In order to allow to unreconcile a posted customer/supplier payments with missing journal items, we set the journal items as required only when the payment is within the `draft` stage. opw-667232
-
Joren Van Onder authored
Because otherwise a user who has access to a view displaying supplier_invoice_count will get an access error if he doesn't also have access to purchase.order, even if that wouldn't have been displayed. opw-666935
-
- Jan 26, 2016
-
-
Christophe Simonis authored
-
Nicolas Lempereur authored
When creating a XLS file with more than 256 columns, the library used (xlwt) fail since it is targetted to support MS Excel 97 up to Excel 2003. But Odoo doesn't has no check and in this given instance (an error happening in a controller generating a binary filte) the real error message is lost. This commit check if the to-be exported data has more than 256 columns, and if this is the case display an error message without even trying the export. closes #10630 opw-660474
-
Yuriy A. Apollov authored
-
Stefan Rijnhart authored
-
Raphael Collet authored
[FIX] search with computed fields in path
-
Holger Brunn authored
fields in a search path
-
- Jan 25, 2016
-
-
Denis Ledoux authored
When performing a stock valuation at date, the stock valuation total wasn't equal to the sum of each line of the report. This is because the domain forcing the date wasn't passed to the `search` call when no group by was applied. Indeed, when calling `read_group` with a group by, the lines in the results contains the domain used for each line, but when there is no group by applied, this is not the case, the domain is not included in the line dict returned by `read_group`. In such a case, therefore, we must use the domain that was passed to the `read_group` call. opw-667761
-
David Monjoie authored
Backport of fda5021e that I erroneously did in 9.0, thinking it was reported on 9.0.
-
Denis Ledoux authored
In a survey question of type `matrix`, nothing prevents to remove a row from the matrix, even if there are already answers for this line. If the case happens, the row is deleted, but not the answers. The answers are therefore orphan. The answers should probably be deleted when the row is removed from the survey, but this is a risky change, and, even, users might want to keep track of the answers given even if the line doesn't exist anymore in the survey. Therefore, we just handle the case when displaying the survey results, we ignore matrix answers for which the row no longer exists. opw-666393
-
- Jan 24, 2016
-
-
Odoo Translation Bot authored
-
- Jan 22, 2016
-
-
Raphael Collet authored
-
Raphael Collet authored
Accessing a related field with `related_sudo=True` on a draft record should effectively traverse the fields as the admin user. This fixes #5121, #7138.
-
Goffin Simon authored
Suggested alternative descriptions spill out of the boxes if the description is too long. PS: same fix as in saas-6 with f7110b46. This fix doesn't have to be forwrad ported. opw:667343
-
- Jan 21, 2016
-
-
Goffin Simon authored
When writing several times on the same record in the same transaction, the orm raise a Missing error because the rowcount only gives one difference. opw:666470
-
Goffin Simon authored
If there is no contract then the default journal_id must be set. PS: The field "journal_id" in "hr.contract" model is not required. opw:667093
-
- Jan 20, 2016
-
-
Denis Ledoux authored
The `stock.picking`.`state` field is set to track the change of values (`track_visibility='onchange'`) It's supposed to write the state changes within the picking thread. It does not work properly for function fields, as the onchange tracking is designed to work only with direct user changes, direct `write` operations on the record, while, here, the state value changes according to the picking moves changes, for instance. To solve this, the tracking changes have to be hooked within the `create` & `write` methods of the model on which this function depends on. Therefore, from now, when changes are performed in the moves, on the fields that could lead to the picking state change, we force the tracking of the picking state. In addition, we had the `mail_notrack` key in the context when creating back orders, to avoid displaying the back and forths in the state e.g. when transferring 9 units on 10, the changes were displayed as below: Draft -> Waiting availability Waiting Availability -> Ready to Transfer Ready to Transfer -> Draft Draft -> Partially available Partially Available -> Waiting availability Waiting Availability -> Transferred opw-666317
-
- Jan 19, 2016
-
-
Goffin Simon authored
When creating a company, a new partner is created with his field 'customer' = True. But by default a company doesn't have to be a customer. opw:667130
-
Nicolas Lempereur authored
When doing a copy of a google drive spreadsheet (in google_drive.py's copy_doc method, using the following google API call https://developers.google.com/drive/v2/reference/files/copy). Google server return an error if we used the old spreadsheet KeyId. The new FileId is available in the AlternateLink and this commit updates it. similar-to: 00c2a998 opw-647222
-
- Jan 18, 2016
-
-
Christophe Combelles authored
closes #10488
-
- Jan 17, 2016
-
-
Odoo Translation Bot authored
-