Commit Graph

71936 Commits

Author SHA1 Message Date
Martin Trigaux f572b27ec8 [IMP] account_voucher: make the field tax_amount always readonly
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.
2014-08-18 17:59:17 +02:00
Martin Trigaux 85b08a75f6 [FIX] account_voucher: avoid error if no partner
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.
2014-08-18 17:50:32 +02:00
Thomas Groutars 397e83554b [FIX] product: make sure unlinked product still exists
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).
2014-08-18 10:37:03 +02:00
Denis Ledoux 97d097a2af [FIX] point_of_sale: field date of report.pos.order should be a datetime
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
2014-08-14 18:01:37 +02:00
Denis Ledoux dcd26acccf [FIX] web: do not focus if the focus_field is not a field
Sometimes, focus_field could be a button, and in such cases, we should not focus on it

opw-612045
2014-08-14 17:33:59 +02:00
Rifakat fa27d28494 [FIX] stock: inventory lines with no production lot: compare with correct stock level
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
2014-08-14 16:51:37 +02:00
Olivier Dony 971ffa3db1 [FIX] account: reconcile: no useless revalidation
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.
2014-08-14 16:51:37 +02:00
Martin Trigaux deacba0ed6 [IMP] base: no default domain for partner's title
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
2014-08-14 12:00:27 +02:00
Olivier Dony 85d2b45aaa [I18N] Update 7.0 translations with latest changes on Launchpad
See also https://github.com/odoo/odoo/wiki/GitHub-Transition#translations
2014-08-14 03:38:58 +02:00
Olivier Dony 96c36e895c [I18N] Update all 7.0 translation templates with latest terms and annotations
Total new terms: 168
Total deleted terms: 95
Total identical terms: 16329
(Some modules skipped, typically all l10n_* modules)
2014-08-14 02:24:24 +02:00
Olivier Dony 69eef5ac8d [FIX] tools.translate: addons path resolution failed with duplicates
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.
2014-08-14 02:07:59 +02:00
Vo Minh Thu 680214c47e [FIX] tools.translate: when loading entries from a PO file, use also the POT.
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
2014-08-13 23:07:40 +02:00
Olivier Dony 23cffab1f8 [FIX] portal_sale: remove more access rights, add pricelist access
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.
2014-08-13 17:20:49 +02:00
Olivier Dony d03ae8980a [FIX] portal_sale: remove un-necessary access rights, improve rules
Portal access rights need to be associated with
security rules, or not granted at all, as soon
as they grant access to non-trivial data.
2014-08-13 16:46:42 +02:00
Martin Trigaux bceb278199 [FIX] base: revert 19e401a for title on res.partner form
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.
2014-08-13 15:04:54 +02:00
Samus CTO 1a7c8953fe [IMP] calculating nextcall datetime of a cron SHOULD use the cron's user 2014-08-13 14:58:55 +02:00
Samus CTO 7f88681186 [FIX] context_timestamp MUST return a "timezone aware" timestamp 2014-08-13 14:58:55 +02:00
Denis Ledoux 8276fb5853 [FIX] export: add the context in the export
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
2014-08-13 14:52:01 +02:00
Olivier Dony 6b8af73179 [FIX] account.invoice: payments can never be shown to portal users, but residual might be needed
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.
2014-08-13 12:38:38 +02:00
Olivier Dony f2788afe92 [FIX] portal_sale: browse data for payment acquirer form with superuser ID
The payment form needs to be rendered for non-employee
users, and may require accessing extra financial data
not available for those users.
2014-08-13 11:50:04 +02:00
Olivier Dony 18fe7abcc6 [FIX] account_followup: avoid crashing when a move line has no ref 2014-08-13 11:45:59 +02:00
Denis Ledoux 60ab6f111e [FIX] web: on switch form (from list & kanban) do not load record if empty dataset 2014-08-12 17:45:05 +02:00
Ruchir Shukla b2f1c764cd [FIX] account_anglo_saxon: avoid duplication of price difference lines
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
2014-08-12 17:30:49 +02:00
Martin Trigaux 7a50b3b057 [FIX] web: missing self initialisation
The self is needed in the _value() method below, opw 608878
2014-08-12 16:08:30 +02:00
Denis Ledoux 0d22a34fa9 [FIX] portal_claim: create claim with no partner_id
If partner_id is False, do not try to name_get

This fix is related to the rev 095be21ab1
2014-08-12 14:13:44 +02:00
Denis Ledoux 245bb4ebdf [FIX] mail: to/from/reply-to addresses formated according to RFC2822
Use formataddr method from email.utils lib, which do the job correctly
2014-08-12 13:40:45 +02:00
Denis Ledoux 2abddd5311 [FIX] l10n_be_coda: set a meaningful filename default value 2014-08-12 12:58:38 +02:00
Denis Ledoux 3609ba10f2 [FIX] procurement: refactor scheduler so it continues even if a procurement failed
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).
2014-08-12 11:02:15 +02:00
Denis Ledoux 3632949cff [FIX] web: image fields re-render on next/previous
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
2014-08-11 14:39:50 +02:00
Denis Ledoux 2b0487113a [FIX] yaml tests: Set on_change keys not in view logger as debug instead of warning
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).
2014-08-11 11:11:36 +02:00
Jérome Maes 2da233d89d [FIX] web_kanban : resequence column and content by drag and dropping 2014-08-11 11:00:31 +02:00
Samus CTO c16884364b [FIX] Calculate date interval using super user time zone
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.
2014-08-08 18:01:13 +02:00
Denis Ledoux 5f696ba86c [FIX] pos: display cashier name on receipt, not the user 2014-08-08 16:05:32 +02:00
Martin Trigaux 1d826a6051 [FIX] account_anglo_savon: round prices according to account precision to avoid getting unbalanced move
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).
2014-08-08 14:04:46 +02:00
Denis Ledoux d31faceb67 [FIX] yaml tests: extra key in on_change result isn't that bad.
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.
2014-08-08 11:40:30 +02:00
Hardik Ansodariya e9e376a6de [FIX] account_analytic_plan: correctly check context
The id of the journal is passed in the context. Avoid trying to browse on jounral_id=False
Fixes #821
2014-08-08 10:06:32 +02:00
dhr-odoo 418e06e88f [FIX] project_timesheet: test used fields added not in dependencies
The fields procure_method and supply_method are not present if we just install project_timesheet which makes the tests fail (opw 610590).
2014-08-07 18:31:57 +02:00
Denis Ledoux a86dfb8035 [FIX] web_kanban: in non-grouped kanban, on switch to form, display first record
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
2014-08-07 18:04:13 +02:00
Somesh Khare b9c4bb6b6c [FIX] account_voucher: fix typo in journal_id type 2014-08-07 16:57:43 +02:00
Denis Ledoux ea05a21938 [FIX] report: allow using 0 decimal precision in rml reports 2014-08-07 14:50:14 +02:00
fka-odoo ed79bc203f [FIX] account: child_of operator in invoice analysis report
When displaying invoice analysis of a company, include the invoices of the members of this company (opw 611084)
2014-08-07 10:24:36 +02:00
Denis Ledoux 5ca6b09375 [FIX] account: payment_ids should list payments of same account than the invoice account 2014-08-06 19:00:01 +02:00
Humberto Arocha 629e3709d0 [FIX] Account: Consolidation Account should not be carried to next fiscalyear 2014-08-06 18:01:24 +02:00
Stéphane Bidoul (ACSONE) 518649c371 [FIX] l10n_be: spelling error in financial reports 2014-08-06 16:59:34 +02:00
Martin Trigaux 02f0caf1b8 [FIX] account_voucher: validation of refund in multicurrency
Fixing several issues for refunds in multicurrency mode that prevented the moves to be balanced.
The amount_currency needs to use the absolute value, as a refund will have a negative amount.
The sign for currency_rate_difference needs to use the line instead of the voucher as they can have different value. e.g. a voucher of 1000$ with invoice of 1200$ and refund of 200$ will have two lines and their currency_rate_difference should have different signs.
Avoids doubling the value in foreign_currency_diff
Fixes #1490, opw 607118 & 611580
2014-08-06 16:45:00 +02:00
Denis Ledoux d909f763b8 [FIX] mail: add tooltip to send a message and log a note links 2014-08-06 14:18:57 +02:00
Denis Ledoux 095be21ab1 [FIX] crm_claim: allow to create claim as portal user
It wasn't possible to create claims as a portal user when the portal user had a parent_id
2014-08-06 12:47:40 +02:00
Paulius Sladkevičius 3bb6136055 [FIX] point_of_sale: clear tag in pos order sheet layout
Without clear tag total amounts breaks sheet layout.
2014-08-06 11:58:38 +02:00
Rifakat Husen bc4217ced2 [FIX] stock: onchange method should take the description
The onchange_product_id method used to only change the description if the stock.move is not saved yet. That does not make much sense.
opw 607347, bug lp:1314700
2014-08-06 08:54:31 +02:00
Anael Closson 70b246c3c7 [FIX] analytic: name_search on accounts
The name_search was hardcoding ilike operator while it could be different. This means that a name_search "name != Agrolait" would return accounts with agrolait.
A side effect of this was the impossibility to import account_analytic_account whose parent is a substring of another - opw 607315
2014-08-06 08:53:16 +02:00