Commit Graph
107816 Commits
Author SHA1 Message Date
Goffin Simon f97eb0ac2b [FIX] hr_expense: Creation of entries from several expense lines
When posting journal entries for an hr.expense.sheet with several expense lines
(by clicking on the button "Post journal entries"), all the account move lines
created for the same sheet must be linked to the same account move because
the model hr.expense.sheet has just a field "account_move_id" to access all the entries
(by clicking on button "Accounting Entries")

opw:715523,709930,725798,716239
2017-03-27 13:11:40 +02:00
qdp-odoo 5a7db15aff [FIX] account: usability of entry sequences.
This revert commits 51882ea70c and d94c449547 that were introduced to solve OPW-693955.

The usability before those fixes was good, but the bug was appearing when we first create the journal without the boolean 'dedicated refund sequence' set, then we try to modify that va$

This time, the fix consist to create automatically the sequence on the write of the boolean if it's not existing yet, in the same fashion than on the create().
2017-03-27 12:10:08 +02:00
Nicolas Martinelli 5c0901b9d7 [FIX] hr_expense: expense of zero
Complement of commit cab436819f

Previous commit was not considering a complete expense sheet of zero.

opw-710695
2017-03-27 11:59:15 +02:00
qsm-odoo eac7e16e20 [FIX] web: no formview dialog during editable list edition
Clicking on an editable list row makes the row editable. Clicking on
an editable list row while another row is being edited, first make
the row being edited readonly before making the clicked row editable.
The row which goes back to readonly have to be reloaded, operation
which is not instantaneous. If another row is clicked while a row
is going back to readonly (this typically happens if a row is double
clicked while another one is being edited), a form view dialog was
opened to edit the row (behavior which was not expected).

opw-710627
2017-03-27 10:35:55 +02:00
Olivier Colson 4cd39776c0 [FIX] account : use default company in demo data
With multiple companies defined, ensure consistency in demo data in case a localization reusing the ones defined in account module is installed. Before that, the demo data used several hardcoded values to reference the company, but some models relied on the default company, which lead to crash when the active company was not the one hardcoded in demo data and such a new localization got installed.
2017-03-27 10:00:31 +02:00
Nicolas Martinelli 92d25e7f08 [FIX] mrp: BOM count
- Create a product with 2 variants
- Create a BOM specific for each variant
- Go in the product variant page

the stat button indicates 2 BOMs instead of one.

opw-725126
2017-03-27 08:31:51 +02:00
Odoo Translation Bot a18c453dd5 [I18N] Update translation terms from Transifex 2017-03-26 04:30:35 +02:00
Odoo Translation Bot 7aea6c9ad4 [I18N] Update translation terms from Transifex 2017-03-26 03:09:57 +02:00
Odoo Translation Bot 1e476e59fe [I18N] Update translation terms from Transifex 2017-03-26 00:31:50 +01:00
Christophe Simonis 70b770d62e [MERGE] forward port branch 9.0 up to 8376f538b5 2017-03-24 17:57:29 +01:00
Christophe Simonis 8376f538b5 [MERGE] forward port branch saas-6 up to 9d04d14669 2017-03-24 17:11:48 +01:00
Christophe Simonis 9d04d14669 [MERGE] forward port branch 8.0 up to 08213e831e 2017-03-24 17:07:03 +01:00
Christophe Simonis 08213e831e [REM] useless empty sql file wrongly commited by 0b529cf3af 2017-03-24 17:03:11 +01:00
luisg123v 5d66082edf [CLA] add luisg123v to Vauxoo's CLA
Done at #16028
2017-03-24 16:32:58 +01:00
Nicolas Martinelli 906bde20c8 [FIX] mrp: "Unreserve" visibility
- Create a MO, components needed are 1 unit of Prod A and 1 unit of Prod
  B.
- Click on "Check Availability"

The button "Unreserve" does not appear unless all components are
available.

opw-724940
2017-03-24 15:51:42 +01:00
Damien Bouvy 52b3b1f1bf [FIX] purchase: don't raise if standard route is deleted
New api regression: xmlid_to_res_id() had the flag to raise set to
false by default while ref() does the opposite. Since the intent
here was clearly to allow not finding the record (given the if
condition under the ref call), avoid crashing for a simple default.
2017-03-24 15:39:25 +01:00
Jérome Maes 8bfc7ef2d5 [FIX] hr_timesheet_attendance: missing widget on pivot report
All total of hours should be displayed with float_time widget.
2017-03-24 15:37:48 +01:00
Christophe Simonis 8caac6bc44 [MERGE] forward port branch 8.0 up to 5847de4aaf 2017-03-24 15:23:16 +01:00
Christophe Simonis 5847de4aaf [FIX] web_calendar: remove attendee icons from event title 2017-03-24 15:12:39 +01:00
qsm-odoo b2d66d0c14 [FIX] web: properly combine domains with "OR" in CompoundDomain
The CompoundDomain class allows to regroup several domains with an
implicit "AND"; these domains can be either a string, an array or
another CompoundDomain. A CompoundDomain can then be converted to
an array thanks to pyeval.js.
For example, if a CompoundDomain is initialized with `[A, B]` and
`[C]`, the array conversion gave `[A, B, C]` (which is expected).

However, a hackish method was used with CompoundDomain. If one of the
domain of a CompoundDomain is equal to `["|"]` (an array with the
OR operator in it), the two next subdomains were supposed to be joined
by a OR operator. Indeed, for the case of a CompoundDomain initialized
with `["|"]`, `[A]` and `[B]`, the array conversion gave `["|", A, B]`
(which is expected). However, if initialized with `["|"]`, `[A, B]` and
`[C]`, the array conversion gave `["|", A, B, C]` which is very wrong
as what was expected is `["|", "&", A, B, C]`. The problem is that the
given `[A, B]` contains implicit "&" operators.

This commit fixes the problem by normalizing only if the CompoundDomain
starts with a ["|"] or ["!"] array which is the standard odoo case.
This allows to limit breaking custom code (e.g we want a simple "AND"
of `[A]` and `[B]` to stay `[A, B]`, not become `["&", A, B]`).

The commit also modifies a test so that it checks that the problem is
properly solved.
2017-03-24 15:03:54 +01:00
qsm-odoo 1a40e7b6c7 [FIX] report: allow to use Dialog API in report editor
When editing a report, the editor is launched in an iframe with an
environment which is different from backend and frontend. The problem
here is that the editor uses the `Dialog` API while the report editor
was not loading the associated xml file this API needs to work. Indeed,
when clicking on the "Discard" button for example, nothing seemed to
happen as a dialog was supposed to be opened.

This worked before as the editor was not using the `Dialog` API until
commit 62fb1bb924.
Unfortunatly, this commit adapted "iframe.js" to load the associated
xml file but forgot to adapt the report editor. In a future
amelioration, this "iframe.js" file could be added to the report editor
so that all "iframe editor" environement work properly with the same
adaptation code.

opw-724784
2017-03-24 14:39:09 +01:00
Nicolas Lempereur 8d948d9235 [FIX] barcodes: fix FieldFloatScannable on firefox
On firefox pressing special keys such as: Left Arrow or Backspace
trigger a keypress event.

This is different from google chrome which only generate a keydown and
keyup event.

There was thus two issue when using a FieldFloatScannable and firefox:

1. Keys such as ArrowLeft: would still be catched by FieldFloatScannable
   and be added programatically to the field but since Odoo didn't fix
   them a ASCII NUL character (0x0) would be added (in firefox it is
   represented by a large space).

2. Keys such as Backspace: would still be catched by FieldFloatScannable
   but were modified and corrected by Odoo so the corresponding ASCII
   character was added (ASCII BS character (0x8) for backspace).

The feature in FieldFloatScannable which add the character is used to
add characters for which the browser had been prevented to display them.

Thus this fix:

- for issue 1 and 2: only use the feature of FieldFloatScannable if the
  event was previously prevented and the current one is a forgery.

- for issue 2: add "Backspace" and "Delete" as specials characters which
  should not be modified or stopped by the scanner heuristic.

opw-706352
2017-03-24 14:07:07 +01:00
Martin Trigaux b3934619d4 [FIX] hr_holidays: allow overlapping leaves and allocations request
The allocation requests have date fields that are only informative.
Having an allocation request (e.g. specifying dates of a public holiday)
overlapping the dates of a request is actually fine (if an employee is sick
during a public holidays, he can still use it for a leave request).

Closes #11026
2017-03-24 12:09:17 +01:00
Fabien Meghazi 1217ae914b [FIX] web/mail: many2many_tags_email widget returns erratic values (opw: 693067)
The many2many_tags_email's internal value change logic fails to process
all its values. It is not concurrency proof either.

The internal value change logic is now replaced by a mutex and deferreds
are used for the partner's form view popups in order to allow concurrent
events.
2017-03-24 11:31:56 +01:00
Fabien Meghazi a82fb281d1 [FIX] web/mail: many2many_tags_email widget returns erratic values (opw: 693067)
The many2many_tags_email's internal value change logic fails to process
all its values. It is not concurrency proof either.

The internal value change logic is now replaced by a mutex and deferreds
are used for the partner's form view popups in order to allow concurrent
events.
2017-03-24 11:31:00 +01:00
Fabien Meghazi 874c7aa2dd [FIX] web/mail: many2many_tags_email widget returns erratic values (opw: 693067)
The many2many_tags_email's internal value change logic fails to process
all its values. It is not concurrency proof either.

The internal value change logic is now replaced by a mutex and deferreds
are used for the partner's form view popups in order to allow concurrent
events.
2017-03-24 11:28:31 +01:00
Goffin Simon 2b013d193b [FIX] website_quote: Description on a sale.quote.line
To have the same behavior when the variant is added manually on the SO
or when it's added with a sale.quote.template. The description on the
SO line must include the default_code and the name of the variant.

opw:725072
2017-03-23 18:54:41 +01:00
Goffin Simon 4269bcfc25 [FIX] project: group by stage_id on project.task
Grouping by stage_id on tree view in "project.task" when group_by_full
is defined on stage_id(to show all the stages in kanban view even if
they are empty), grouped by stage without summing all other the fields
such as remainig_hours.

Reason: The order defined in "project.task.type" was not strict and the
function _read_group_fill_results cannot group if the order defined by the
group_by_full(right_side) and the read_group(left_side) is not the same.

opw:724785
2017-03-23 18:36:50 +01:00
Raphael Collet 9e23458d40 [FIX] models: ensure recomputation after inversing fields (#15683)
When updating record using "record.field = value", we need to ensure that
all fields in cache depending on "record.field" will be recomputed.
2017-03-23 17:11:00 +01:00
Gustavo Valverde 06c5db50b6 [IMP] l10n_do: update CoA (for IFRS), taxes, fiscal positions and journals.
Courtesy of Gustavo Valverde. PR #13787

Details:
-------
- Easier implementation for most of the people
- Minor customization to be fully compliant with local regulations
- Standardized configuration to help other Odoo consultants and implementers
- Use of the account types defined in account instead of creating new ones

To comply with local and tax regulations:
-The whole Charts of Accounts was changed
-Most of the Journals has been preconfigured to comply with tax regulator
-All the regulatory taxes were added and configured with group taxes

To standardize the Dominican implementations:
-An IFRS compatible CoA that does not need major changes for most companies
-A well structured CoA with a codification logic.
-Use of the Odoo original flow for creating tax compliant invoice sequences
2017-03-23 16:49:06 +01:00
Raphael Collet 09c7ec59ce [FIX] base_action_rule: prevent double execution only in recursive calls (#15863) 2017-03-23 16:02:55 +01:00
Nicolas Martinelli 0cfb7fc347 [FIX] website_sale: redirect if no order
- Visit the webshop without being logged in, do not put anything in the
  cart.
- Visit the URL /shop/address
- An expty SO is created

opw-725277
2017-03-23 14:45:54 +01:00
Martin Trigaux 71d86afb58 [FIX] base: deactivate default language
When a language is deactivated, it may still be referred to in a default value.
A ir.value is created at the database setup to specify the default language.
If a user deactivate the default language but not the ir.value, the creation of
a res.partner would fail as trying to set an unknown value to a selection field.

This commit removes the default value when deactivating the linked language.

The patch is minimal for the bug. A more generic solution would be to verify the
ir.value when calling the default_get method.
This is however a risk of performance degradation (e.g. during a csv import) for
a rare scenario.
The dynamic selection scenario is probably on relevant to res.lang.
A similar problem can occur with many2one fields but is difficult to fix without
performance degradation.

Closes #16009
Fixes #15979
Fixes #3854
2017-03-23 14:38:05 +01:00
Goffin Simon 1031a699b7 [FIX] rating_project: Unescaped signature
Typo error

Steps to reproduce:

1. Go to a project and activate customer satisfaction on tasks
2. Activate the developer mode and go to Settings > Technical > Templates
3. Find the "Task: Rating Request" template
4. Click on Preview

Bug: Signature is in HTML code

opw:725722
2017-03-23 13:17:45 +01:00
Nicolas Martinelli 0e7ced70c1 [FIX] mail: reply message type
- On a model, log a note and ping User A
- Go in the inbox of User A, and reply to the message

The reply is a comment (therefore sent to all followers of the
document), not a note.

opw-710326
2017-03-23 11:14:42 +01:00
David Tran bfb2771d63 [FIX] mrp: mrp.message security
The security policy did not allow mrp manager to create mrp alert
message

Closes #14675
2017-03-23 10:27:06 +01:00
David Arnold 14368a0e72 [FIX] stock: stock user shall scrap
Before this, the stock user had readonly ACL on the scraping action. He
therefore could not scrap products during his normal operations. It is assumed,
that this was not an intended default, as not being otherwise documented.

Closes #15955
2017-03-23 10:22:28 +01:00
Goffin Simon 0b529cf3af [FIX] http: setup_lang in Safari
Fine tuning of this commit: 5761b9a388

opw:716519
2017-03-22 17:03:23 +01:00
qsm-odoo 1505fee0e3 [FIX] web_editor: properly transcode fa alias icons
When adding a font-awesome icon to a mail template, the icon is
converted to an image once the template is saved. To do that, the
code checks all the `.fa-XXX` definitions in the stylesheets to know
which content the image have to use. The problem is that this was
not considering the font-awesome aliases. Indeed, the `fa-facebook-f`
icon was able to be used while its alias `fa-facebook` was not working.
2017-03-22 13:12:33 +01:00
Nicolas Martinelli c6a7e4fbb9 [FIX] purchase: billed qty
In a SO, the "Invoiced Qty" can decrease if the refund is generated from
the SO. It doesn't decrease if the refund is generated from the Invoice.
However, we don't have this mechanism in a PO since the invoice is not
generated directly from the PO. There is therefore no way to decrease
the "Billed Qty".

We authorize the "Billed Qty" to decrease in the case of PO.

Complement of commit 9b5281adb4

opw-724474
2017-03-22 10:43:04 +01:00
Nicolas Martinelli ffaa65833d [FIX] website_forum: missing translations
The attribute `data-content` is not part of the translated attributes.

The fix is similar to e8f1c5dbc6

opw-710314
2017-03-22 10:00:38 +01:00
Goffin Simon 5761b9a388 [FIX] http: setup_lang in Safari
When not logged in the webstie on Safari and clicking on "Have a Question? Chat with us",
it creates a mail.channel from get_mail_channel and it also creates a translation.
But with Safari, the accept_languages is set with the value 'fr-fr', and this value was set
in the context as the lang='fr_fr'. So when the translation was created, a bad insert query was
raised in sql because the lang didn't exist in the res.lang table. When a translation is created,
the function _get_languages checked that the language is in the table.
So it was impossible to use the chatter when the user is not logged.

NB: interseting functions to see:

-setup_lang in odoo/http.py
-_dispatch in addons/website/models/ir_http.py
-get_mail_channel in addons/im_livechat/models/im_livechat_channel.py

opw:716519
2017-03-21 17:02:59 +01:00
Martin Trigaux f1d004b996 [FIX] mail: disable prefetching on send mail
Minimal backport of 00bd7274
Processing large mails may reach the memory limit and crash the mail queue.

Such scenario was found at opw-724697
2017-03-21 16:48:31 +01:00
Goffin Simon b957fa76b7 [FIX] mrp: Wrong domain filter for mrp.production
When clicking on smart button "Manufacturing" for a variant, the action
"act_product_mrp_production" was called to apply the default filter on
product_id = active_id to select the right mrp.production. But the field
product_id was also called "Raw material" and a wrong domain was applied
each the action was triggered from a variant.

opw:725050
2017-03-21 16:44:08 +01:00
Nicolas Martinelli 0ecc9c3034 [FIX] hr_expense: partner on AML
It will cause issues later on. A workaround has to be found.

This reverts commit d69aa2d98b.
2017-03-21 15:28:00 +01:00
Nicolas Martinelli 8ec819418b [FIX] hr_expense: tax on expense
- Create an expense with a tax
- Validate and post entries

3 AML are created, one on the expense account, one on the account
payable, one for the tax. However, the AML of the expense account is not
linked to the tax, and therefore does not appear in the reports.

opw-715488
2017-03-21 13:40:02 +01:00
Nicolas Martinelli d69aa2d98b [FIX] hr_expense: partner on AML
- Create a partner who is a contact of a company
- Associate this partner to an employee
- Create an expense for the employee, validate and post entries

The AML created are linked to the company, not the partner.

Since the bank account account is registered on the partner, and not the
company, this is more logical to link the AML with the partner.

opw-724550
2017-03-21 13:36:19 +01:00
fwi-odoo 1213920e40 [FIX] web_editor: correctly fetch the inherited views
The `issuperset` method check if a set contains all the element of the set given
in paremeter. So in our case, the user needed to be in all the view groups
to get the inherited view. That's not the behaviour expected.
If the user is in only one of the group required to have access to the view,
we want to return the inherited view.
2017-03-21 12:59:54 +01:00
Jairo Llopis f1bf457803 [FIX] mass_mailing: do not remove image with link
If you followed these steps, Chrome deleted the link and image:

1. Create a new mass mailing, fill the subject.
2. Drag & drop any snippet with pictograms.
3. Change a pictogram for an image.
4. Add a link to the image.
5. Save the record.

This happen in chrome if the image was for example floating in
the link, so this change check if an element is a contained element
is visible before removing it.

This issue doesn't happen with [jQuery 3][1] and may be linked to
[this][2].

[1]: http://api.jquery.com/visible-selector/
[2]: http://stackoverflow.com/a/8337382/1468388

closes #15623
opw-710237

note: this is only needed in 9.0 and saas-11 because this features
doesn't seem present in version 10.0
2017-03-21 12:47:09 +01:00
qsm-odoo 3aabf8101a [FIX] web: correctly check editable list validity
The editable list has a `is_valid` method which checks that all the
records it contains have valid data. The problem is that it was
considering that all the records in the `dataset.cache` were part of
the x2x field the editable list is working with. This is wrong as the
`dataset.cache` can contain information which are not part of the
editable list anymore.
See the commit which introduced the use of the `dataset.cache`:
a9d20d9fa0

This was causing issues with rare cases of an editable list which
contains another editable list (even invisible) which was sharing
common information with its parent editable list.

opw-710627
2017-03-21 11:55:45 +01:00