Comparing an id and a browse record will always fail so the exception would have always been raised when changing a model (e.g. updating a module with custom fields).
product_id column of pos_order_line is a product_product
the left join of l.product_id was done on product_template, instead of product_product
It worked as long as the ids product_product were the same as product_template. Meaning that, if you used variants, this report view was screwed.
When this situation happens. the 'cost' is None and the web interface cannot handle this value, provoking a JS error. Thus, prefer to fallback on the standard way to get the cost: based on the current standard price of the product.
Fixes#1032
The buttons for new providers needs at least the zocial css class to be seen as button. As the field css_class is not in the default form view, add it by default.
The type 'general' no longer exists on a account.voucher. As in general context, removed the default value on this menu.
Fixes#1261, it produces a traceback in 8.0 where the selection fields are less fault-tolerant.
The field tax_amount is fieled with onchanges and the compute_tax method. Setting a different value than the one computed by the system may lead to unbalanced move (which is obviously wrong).
In the future, handeling these operations by setting the correct value to the tax accounts would be better.
The field partner_id is not required on an account.voucher but the validation was failing if none was set (opw 611663).
This patch makes a fallback on the account of the voucher if neither a partner nor a writeoff account is specified.
When uninstalling/updating a module, we may execute unlink method on product.template before product.product. In such cases, the product is already removed after removeing the template (_inherits) and the chained unlink of the product would fail (traceback when browsing).
The date_order field of the pos.order is a datetime, not a date
As, in report.pos.order, the date field is related to date_order of the pos.order
We usually do not commit fixes altering the model fields structure in 7.0, but this one is retro-compatible, as the database structure won't change
Inventory lines without production lot number should
be compared with the stock level of products without
a production lot. Otherwise the final result of a
validated inventory is wrong as soon as there are
lines with and without production lot for the same
product.
Adds corresponding regression test.
Fixes https://bugs.launchpad.net/openobject-addons/+bug/1008099
Manual rebase of #1658, courtesy of Numerigraphe
Avoid revalidating the complete account moves
that contain the lines being reconciled.
The reconciliation does not change the validity
of those moves anyway.
This represents a very important speed up of
reconciliation when moves with several hundred
lines are involved.
The title field should not have a domain by default.
When a new record is created or the 'is company' field is changed, the onchange_type is triggered to restrict the domain accordingly to is_company field.
When an existing record is modified, there will have no domain on title field. It's not ideal but at least companies will be able to change the title without the need to modify twice the field is_company.
Fixes#1713
When the addons_path config contained the
default path, the system was working with
an empty addons_path in the middle of the
other paths. This empty one matched for all
files, making all files appear to belong to
the root path component, e.g. `home` if the
root path is in /home.
Refactored a bit to avoid duplicates and
redundant path calculations.
On Launchpad, as commented on bug 933496, PO entries (and their comments) are
shared between series. This mean that e.g. the 7.0 series can have the wrong
`reference` comments (those beginning with #:) as they would be copied from say
the trunk series. Those `reference` comments are used to import translations
and look them up.
This patch adds a few lines of code to tools.translate so that targets
defined in the POT `reference` comments are used in addition to those from the
PO file.
Also adds a test module to validate the new behavior.
This patch stems from:
- the 6.1 branch by Vo Minh Thu:
https://code.launchpad.net/+branch/~openerp-dev/openobject-server/6.1-fix-po-targets-933496-vmt
- the 7.0 port by Numerigraphe:
https://code.launchpad.net/~numerigraphe-team/openobject-server/7.0-fix-po-targets-933496-vmt
Pricelist access is necessary for being able to read
the unit price of sale order lines, and does not
pose major security risks, as it does not permit
reading the actual pricelist definition.
The title of the partner is restricted with a context that will change in the onchange_type. Having twice the same field will not work well.
Remove the invisible attribute as the domain is handled by the domain.
In some cases, the data dispalyed in a list depends on the context
This context needs to be passed to the export method, so the exported data reflects correctly the data from the list view
The residual amount is typically needed to render the
online payment forms (payment acquirers).
Payments on the other hand rely on account.move.line,
something that portal users should never be allowed to read.
Removing the field from the view by setting a model-level
group permission ensures they will not see an error.
When computing the price difference lines, in move_line_get of account_anglo_saxon, we loop on the result of super call for each lines (n * n times) to compute the price difference.
The product_id was used to match the returned line and the original invoice line. This was wrong as we could get several lines with the same product_id (and then get n * n price difference lines).
This patch adds the line id to the result of move_line_get (from account) so that account_anglo_saxon can filter more efficiently and only get one price difference per invoice line.
Fixes#704
If the mrp scheduler fails during the treatment of a procurement (due to a postgresql error, like an update lock), we let it try the other procurements, instead of stopping at the first procurement which fails.
Besides, we retry to treat the procurements which failed, until the list of the remaining procurements is always the same (meaning something is wrong and block the procurements treatment).
By default, on binary images read, the server returns the binary size
This is possible that two images have the exact same size
Therefore we trigger the change in case the image value hasn't changed
So the image is re-rendered correctly
This is related to commit d31faceb67
(This is to avoid the runbot being yellow if on_change methods have extra keys in the returned value, this is not wrong, the web client will simply ignore them).
When you set the date of a cron the July 1st at midnight, if the user
time zone has a positive offset, then the converted UTC date is the
June 30th and adding 1 month will end up on July 30th translating to
July 31th instead of September 1st.
To solve this issue we use the super user time zone for the date
calculation.
The standard move_line_get from account.invoice returns prices rounded (price_subtotal field as account precision) while the anglo-saxon module could return dict with non-rounded prices.
With amounts with bigger precision, we could get a difference of a few cents when comparing the debit/credits and then not be able to balance the invoice (opw 597208).
In the return result of an on_change, having keys which are not ine the view is not that bad, it is not an actual problem.
Display warning instead of asserting all the keys are in the views.
in view_form.js, in do_show method, if the dataset index is not set, the on_button_new method is triggered, opening a new record
In regular kanbans (non-grouped kanban), the dataset index wasn't set, and, therefore, when switching to the view mode, it opened a form for a new record instead of opening the first record of the list, like this is the case for the view list and the grouped kanban