Commit Graph
117975 Commits
Author SHA1 Message Date
Thibault Delavallée 42a4b54881 [IMP] ir_ui_view: allow to use a minimal evaluation context when rendering QWeb
Currently some base context used for evaluation is computed when rendering
QWeb templates. Evaluation context is build in base and improved notably
in website module.

This commit adds an option to skip this context build and have a minimal
evaluation context based on given values. Purpose is to avoid having to
search and browse unnecessary content when evaluating some custom templates.
When we know precisely what we need when rendering a template there is no
need to add unnecessary items in the evaluation context.

This commit is related to task ID 1817951. Closes #23291 .
2018-03-20 13:25:06 +01:00
Christophe Matthieu c077ed8866 [FIX] account: reconcile all the balanced items (when there is a pager)
Error when using CTRL-Enter to reconcile

opw-1816574
2018-03-20 11:57:58 +01:00
Martin Trigaux f51d213f43 [FIX] mail: rendering of mail template in Chinese
Bad translation was causing the rendering to fail
Probably fixes #23430
2018-03-20 11:51:42 +01:00
Christophe Simonis e0345a4a3f [MERGE] forward port branch 11.0 up to 2835d29979 2018-03-20 11:45:11 +01:00
Goffin Simon c3b49b3a5f [FIX] mass_mailing: domain translation
As Admin:
- Set up 2 languages for the installation, e.g. English and French
- Admin language is English, Demo language is French
- Create a `res.partner.category` named 'Test English'
- Assign the category to a newly created partner
- Create a French translation for 'Test English', e.g. 'Test Francais'

As Demo:
- Create a Mass Mailing
- Select a custom domain: ('category_id', '=', 'Test Francais') => it
  should match one partner
- Save and validate

Now either:
- manually run the scheduled action "Process Mass Mailing Queue" as
  Admin
- wait for the cron to process the mass mailing

No mail will be sent since the domain will be evaluated in the Admin
language, i.e. English. Indeed, the domain
`('category_id', '=', 'Test Francais')` does not match any record in
English.

The solution/workaround is to use the language of the last user who wrote
ont the mass mailing.

Closes #20906, Closes #15467, Closes #15445

opw-778922
2018-03-20 11:42:11 +01:00
Nicolas Martinelli 407b85e329 [FIX] product: default quantity on pricelist item
- Create a new pricelist for a new currency
- Set the 'Sale Price' option to 'A single sale price per product', so
  that the user cannot see the pricelist details
- Sell 0.5 unit of the product with the new pricelist

The pricelist is not correctly applied.

This is because the default minimum quantity is 1. Once the user is
selling less than 1 unit, the pricelist is not applied.

opw-1825353
2018-03-20 11:38:24 +01:00
Luis González 2835d29979 [FIX] web: Make top bar's menu items navigable when using the keyboard (#23732)
Sidebar's menu items are not currently reachable when using the
keyboard, because they are missing the attribute `href`, thus are not
indexed for tabbing navigation.

This change causes that attribute to be included, so the menu items are
reachable and navigable when using the keyboard.
2018-03-20 10:33:40 +01:00
Luis González baa1c515c5 [FIX] web: Add missing HTML attributes aria-* (#23752)
Some HTML attributes were missing, and are required to ensure good
compatibility with screen readers.

The following attributes are included:
- `aria-expanded`: this should be present in all dropdown menus
- `aria-label`: this should be present in all links and buttons which
  don't show text, but icons or images.
2018-03-20 10:29:17 +01:00
Jeremy Kersten 4581167b87 [IMP] website_sale: typo in checkout 2018-03-20 10:11:33 +01:00
Christophe Matthieu ec199222c3 [FIX] web: ace: no duplicated char with composition (html/css editor)
Before this commit, there was an issue with input method using
composition in which typed characters were duplicated.
This was occuring until the composition ended.

This is a bug specific to Google Chrome v53+.
It has been fixed in the most recent version of ace.js [1],
and we just port the fix into our custom code.

Note that we do not simply import ace.js as a whole, because
we must update lots of custom code at the same time.
We plan to do so in the future.

Fixes #23629

[1] https://github.com/ajaxorg/ace/pull/3116
2018-03-20 09:44:10 +01:00
Nicolas Martinelli 4c692f1bb3 [FIX] website_project{_issue}: redirect from email
- Create a portal user
- Set an email address
- Create a project with tasks / issues
- Create a task / issue, set the portal user as follower => he should
  have access to the task from URL `/my/task/<id>`.
- On an email received (e.g. when the user is set as follower), click on
  'View Task'

The user is redirected to the chatter instead of `/my/task/<id>` or
`/my/issue/<id>`.

In method, `_redirect_to_record`, the record is browsed as `sudo`.
Therefore, in `get_access_action`, `self.env.user` is the admin.

We check the context to get the original user.

opw-1814577
2018-03-20 09:36:51 +01:00
Lucas Perais (lpe) d1dccd5130 [FIX] account_voucher: right domain on payment method
When creating a receipt with immediate payment:
Before this commit, the field payment method displayed all the journals bank or cash

After this commit, only journals made for receiving/sending payment (in function of the type of receipt)
are displayed

OPW 1819672

closes #23677
2018-03-20 09:06:11 +01:00
Nicolas Martinelli 2da8d41c02 [FIX] website_sale: required fields
- Go to eCommerce, add a product to the cart
- At address configuration, add a delivery address. Do not field the
  name or the phone

It is possible to save the address while the fields are mandatory.

opw-1827797
2018-03-20 08:57:52 +01:00
Christophe Simonis 672a275c7f [MERGE] forward port branch saas-15 up to 3d9a2340d9 2018-03-19 21:26:01 +01:00
Jeremy Kersten 3102bc739e [FIX] auth_signup: raise signup error only if user don't exists
Before this commit, it was impossible to create a user because
when the template was found, that raise an error.
2018-03-19 21:23:45 +01:00
Jeremy Kersten 006ce9c887 [IMP] website_sale: fast checkout if no distinct shipping address.
Change flow for checkout.

Allow to specify during the billing address if you want to use the same address
for the shipping. If it is the case, we bypass the address selector step.

Use last shipping address by default

Re-add right column for lg-screen

Fix checkbox terms, which was at the wrong place and checked by default

Payment: allow to add back button, and choose position of icon

Courtesy of:
   fgi for specs, re-specs, re-re-specs and testing
   sri for help to design new progress-bar

Task-39062
2018-03-19 21:21:52 +01:00
Christophe Simonis 3d9a2340d9 [MERGE] forward port branch saas-14 up to e098276644 2018-03-19 19:51:33 +01:00
Christophe Simonis e098276644 [MERGE] forward port branch 10.0 up to da1f153d61 2018-03-19 19:32:55 +01:00
Christophe Simonis 4715d7e35a [MERGE] forward port branch saas-15 up to 0d55241185 2018-03-19 19:29:58 +01:00
Jeremy Kersten 90dbca29f8 [IMP] ir_qweb: ir.qweb.field.contact allow to specify separator to format address
Allow to specify a separator char to have the address formatted on a single line e.g.
2018-03-19 19:27:35 +01:00
Jeremy Kersten 2feda047b7 [FIX] base, web: replace t-field-options with t-options
add context in log to identify easily the template that use old synthx
2018-03-19 18:57:59 +01:00
Christophe Simonis 0d55241185 [MERGE] forward port branch saas-14 up to 82effcca83 2018-03-19 18:26:25 +01:00
Christophe Simonis 82effcca83 [MERGE] forward port branch 10.0 up to caf6b4a7c7 2018-03-19 18:25:41 +01:00
tbe-odoo da1f153d61 [IMP] http: Sessions implicit deactivation
- Store a token inside sessions to allow implicit session deactivation when needed.
2018-03-19 18:11:12 +01:00
Olivier Dony 284c5ba50d [FIX] account: make Journal Item company read-only
PR #16826 (rev fa3ff5b41a) added the
`company_id` field in the Journal Entry form.

Unfortunately that field was not marked read-only, so creating a move
would write to this field, triggering a useless and possibly very long
recomputation of many related fields based on the company of the
account. It must be read-only, its value solely driven by the value of
the account_id field.
2018-03-19 17:43:33 +01:00
jem-odoo 3ceae65669 [FIX] project_timesheet_holidays: fix tests due to DST
To avoid harcorded dates in this test, we use next
monday as starting date for leaves and timesheets.
But today (19/03/2018), next monday will be after
the daylight savings time, so resource module gives
one additionnal day with one hour to be worked, so
one more timesheet is generated and fails the test.
To avoid this, we are now hardcoded dates to a monday
(to avoid weekend and global leaves) and be sure the
number of working days will be 3.
2018-03-19 16:34:13 +00:00
Yoshi Tashiro caf6b4a7c7 [FIX] base: round JPY at unit's place
Rounding should be done at the unit's place for Japanese yen

Closes #23739
2018-03-19 17:08:08 +01:00
Andreas Perhab 444e2a4ed0 [FIX] doc: correct link to nodejs download
Closes #23733
2018-03-19 17:05:30 +01:00
Andreas Perhab 45faa90732 [CLA] signature for bigbear3001
Done at #23733
2018-03-19 17:05:29 +01:00
Martin Trigaux 1b5d0c3773 [FIX] account: hide Frenglish
Proper fix done in master at e81d922ef2
Workaround for stable version

Closes #22769
2018-03-19 16:59:18 +01:00
jem-odoo 622b70ee3e [FIX] purchase: wrong condition in mail template
Before checking the first element of
'partner_id.child_ids', rather check that
the partner and not the object has children,
to avoid crashes when the partner of the PO
is a company.
opw-1826359
2018-03-19 15:13:33 +00:00
Yenthe V.G d2d74232b9 [ADD] l10n_be: add states for Belgium
Closes #23714
2018-03-19 16:07:32 +01:00
Nicolas Martinelli d77d72092d [FIX] web_editor: fix typo
Closes #23738
2018-03-19 15:50:27 +01:00
Alexandre Kühn 71616e8d4f [FIX] web: pick correct menu item on hashchange
Before this commit, we had the following issue:

    1. install CRM and Sales
    2. Sales > Customers > (open any form)
    3. Click on browser's "back" button

We are redirected to the contact kanban view in CRM
instead of Sales.

This is due to the fact that both menu items share the
same action. When the user uses the browser's "back" button
(AKA. it triggers an hashchange event), the web_client opens
the first menu_item that matches the action.

This commit fixes the issue by allowing us to open an action
by providing a menu ID:

    1. If it matches the action, then it opens this menu
       instead of the first match.

    2. If we do not provide any menuID, or this menuID does
       not match with the action, it falls back to the first
       menu matching this action.

Fixes #23639
2018-03-19 15:17:56 +01:00
Alexandre Kühn e2dd31cd7b [FIX] web: set correct menu_id on menu action
Before this commit, the menu_id displayed in the url was incorrect
when we click on a menu item for the first time.

This is due to the fact that the web_client was mistakenly using the
previous menu_id as the action's menu_id: the JS widget menu is not
up-to-date with the value of the current menuID, and the web client
was relying on its internal state instead of the server's response.

With this commit, the web client uses the server's reponse to
register the correct menuID that has been clicked.
2018-03-19 15:17:10 +01:00
Nikunj Ladava 70f3d453b5 [FIX] payment_adyen: fix error while making payment with adyen
* in _adyen_generate_merchant_sig_sha256 no need to encode dict key as we
   have a normal dict. Because of this encoding it will search for byte
   string key but we have string key;
 * _adyen_generate_merchant_sig method requires the latest computed data
   from adyen_form_generate_values method. If we directly pass the dictionary
   while updating it, it will pass only business parameters and we don't need
   it. After updating values we have actual transaction data.

This commit is related to task ID 1815966.
2018-03-19 14:33:04 +01:00
Denis Ledoux 3869b080ae [FIX] survey: preserve the multiple choices question answers order
When configuring a survey with a
Multiple choice: only one answer
question,

the answers shown in the result may be in the wrong order
because of the use of a simple `Dict` instead
of an `OrderedDict`.

The behavior was increased when using Python 3.5,
as it randomizes on purpose dictionnaries.

opw-1818797
2018-03-19 12:17:46 +01:00
Mykhailo Panarin 71f56fd2fa [CLA] signature for mpanarin
Was already signed in 11.0 but not in 10
Closes #23715
2018-03-19 12:01:59 +01:00
Odoo House 0bcf5a6d8f [CLA] Odoo House ApS signs Odoo CCLA
Closes #23731
2018-03-19 11:58:49 +01:00
Thibault Delavallée 1d25b6b84b [FIX] mail: fix chatter document link 'on <doc name>' including the 'on'
Having the 'on' using the same styling of the document name that is a link
make us think the 'on' is part of the name. Let us fix this small issue
by getting the 'on' out of the link tag.
2018-03-19 11:52:46 +01:00
Martin Trigaux 6292600b85 [FIX] *: correct wrong %s translations
Changes reflected on Transifex but force the fix in the code to avoid having
to wait until next Sunday for synchronisation
2018-03-19 11:47:32 +01:00
Goffin Simon d821f374af [FIX]account: Accounting reconciliation problem
Steps to reproduce the bug:
-Activate multi currency
-Set the receivable account with the same currency of the company.
-Create a customer invoice in the currency of the company
-Register a payment for this invoice

Bug:
The payment was not reconciliated with the invoice.

opw:1826121
2018-03-19 10:06:13 +01:00
Florent de Labarre 6dcfaae7d7 [FIX] account: fix help tooltip
The pro-forma state doesn't exist anymore on invoices
2018-03-19 09:37:34 +01:00
Nicolas Martinelli 623f2baf9d [FIX] hr_timesheet: change department
- Set an employee in a department A
- Create some timesheet entries for this employee, validate them
- Change the employee to department B

An error arise:
> You cannot modify an entry in a confirmed timesheet.

The field `department_id` on the `account.analytic.line` is a related on
`user.employee_ids.department_id`. By changing the department on the
employee, it changes the department on the analytic line (= timesheet).

There is no real need of a related field. Actually, it makes more sense
to change the department with the user (e.g. at creation or change of
the user), and then do not change it later on. Indeed, a timesheet entry
that was created when the employee was in department A should remain in
department A even if the employee change of department.

opw-1824913
2018-03-19 09:37:27 +01:00
Aaron BohyandMathieu Duckerts-Antoine e9db6b6d9d [FIX] web: search menus always available
Before this rev., the search menus (Filters, Group By, Favorites)
were lost when the user came back to an action with the
breadcrumbs (e.g. go to My pipeline, open a lead, click on the
Meetings stat button, go back to My pipeline).

This was because the two searchviews shared the same jQuery element
containing their dropdowns. This behavior is there for a long time,
but the bug has been revealed by 7b6056a0, which changes the way
the action manager and controllers interact with the control panel.

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2018-03-19 08:12:09 +01:00
Odoo Translation Bot b25250f56e [I18N] Update translation terms from Transifex 2018-03-18 04:13:29 +01:00
Odoo Translation Bot 4fd4816d49 [I18N] Update translation terms from Transifex 2018-03-18 00:26:00 +01:00
Toufik Benjaa 62b80d1da2 [FIX] payment_authorize: crash on invalid expiry date
- This commit fixes crashes occuring when the expiry date for a credit card was invalid.
  Instead of crashing we now warn the customer that the expiry date is invalid.
2018-03-16 18:32:21 +01:00
qdp-odoo 8bec4fa015 [FIX] account: reconcilation simplest case
The recent change (e130606602) broke the use case of an invoice/payment in the company currency without any secondary currency involved. Payment was recorded correctly but no full reconciliation was created (and it was not tested).

In order to fix that, we allow to test total_debit and total_credit also when currency has never been set (no secondary currency at all)
2018-03-16 17:23:02 +01:00
Yenthe V.G fe19f45393 [IMP] hr_payroll: translate hr.salary.rule(.category)
Closes #21469
2018-03-16 16:58:26 +01:00