Commit Graph
117156 Commits
Author SHA1 Message Date
Martin Trigaux 282605a8fc [FIX] website_blog: cut teaser after 150 chars
Space as word separator does not work in some non-latin languages like Japanese.
Cut arbitrarily after 150 chars

Closes #23219
2018-04-05 16:17:29 +02:00
Florent de Labarre f8ade1c96d [FIX] stock: To avoid singleton error
Execute on a single record is used when calling the function
_update_line_quantity and avoid singleton error

Closes #23860
2018-04-05 14:48:53 +02:00
Andreas Perhab 115b9616c1 [FIX] doc: remove not existent attribute
color is not accepted by rng on gantt views
copy-paste the code would not work

Closes #24055
2018-04-05 14:42:54 +02:00
Christophe Simonis f4326b4dab [MERGE] forward port branch 9.0 up to eaf54656fc 2018-04-05 14:39:37 +02:00
Lucas Perais (lpe) e05b2d01d1 [FIX] hr_recruitment: email from in template should be safe
Create a hr.attendant in a stage where a mail template is present.
Fill the email field as: Name Surname <name@surname.com>

Before this commit:
- the created partner's email has been rendered as name@surname.com&gt;
- the email failed to be sended because of this

This was because Jinja rendered that snippet escaping the special characters
Putting a 'pipe' safe in the snippet does the trick

After this commit:
both the partner and the email are created successfuly

OPW 1830739
closes #24059
2018-04-05 13:35:30 +02:00
Xavier Morel 4e784adbf7 [FIX] doc: non-module JS autodocumenters
Also when there is both a docstring and directive-level content put
the docstring first. That seems to match what Sphinx's autodoc does
and looks less odd.

Possible future improvement: a parameter to suppress the docstring?
Possibly a way to reorder the non-docstring content (e.g. members
documentation)?
2018-04-05 12:31:27 +02:00
Nicolas Martinelli 9b6ca49b58 [FIX] http: Bokmål language code
- Install Website
- Load the 'Norwegian Bokmål' translation, and choose to translate the
  website
- Logout

When accessing the website, the language displayed is not consistent to
the browser language.
1. `no` shows homepage in `nb_NO` (Firefox only) => expected since
    Bokmål is the main language in Norway
2. `nb` shows homepage in `en_US` => unexpected
3. `nn` shows homepage in `en_US` => expected since 'Norwegian Nynorsk'
   is not a language available (this will be the topic of another PR)

The issues comes from Babel's side, since `nb` is not in the
`LOCALE_ALIASES` while `no` is. We monkey-patch the value to avoid this
while Babel is corrected.

opw-1827258
2018-04-05 11:01:11 +02:00
Yenthe V.G 0fc2ee8c6a [FIX] stock: complete 85499c76d4
Was another one remaining

Closes #24047
2018-04-05 10:50:14 +02:00
xmo-odoo b5c660d8c0 [IMP] base: batch XID generation during export
* add UUIDs to XID sections (4 bytes / 8 hex digits) so it's not
  necessary to handle collisions & add a fallback generator
* use COPY for performances over executemany: executemany just
  performs an implicit loop on all statements (in psycopg2)
* ~pure SQL was possible:

      INSERT INTO ir_model_data (module, model, name, res_id)
      SELECT
          '__export__',
          '{model}',
          '{table}_' || A.id || '_' || uuid_generate_v4(),
          A.id
      FROM {table} A
      LEFT JOIN ir_model_data B
             ON A.id = B.res_id AND B.model = %s
      WHERE B.res_id IS NULL;

  but would have required installing pg extensions (problematic
  especially in stable) and performances are about the same as
  the COPY version

task 36343
Fixes #22493
2018-04-05 10:34:48 +02:00
Martin Trigaux 85499c76d4 [FIX] stock: do not set useless filters
The filters have no effect and it may be confusing to remove it and see the same
result.
The filters themself will be removed in master.

opw-1832502
2018-04-05 10:29:53 +02:00
Simon Lejeune 0cdfae0e25 [FIX] stock: _compute_show_operations
Using `break` when looping over a recordset in a compute method could
have side effects. Computed field are computed in batch, according to
the order of the recordset, the value may only be computed correctly for
some records

related to rev c493569866

opw-1833347
2018-04-05 10:18:22 +02:00
Nicolas MartinelliandGéry Debongnie 6397ce7eb0 [FIX] web: loss of context when duplicating
- Create a vendor bill, save and validate
- Duplicate the bill, save
- Click on "Create"

A customer invoice is created, while the user expects a vendor bill.

After duplication, the new record is loaded but the context is lost.
Since the default value for the invoice type is based on the context key
`type`, a loss of context leads to an incorrect invoice type.

opw-1826453

Co-authored-by: Géry Debongnie <ged@odoo.com>
2018-04-05 10:12:06 +02:00
Romain Derie 64ef2b396b [FIX] web_editor: same style on div and p in backend in edit mode
Before this commit:
In the web_editor in backend, entering edit mode would display differently text
in `div` and text in `p` but not when viewing the content outside edit mode.

Now, `div` and `p` won't have different style when entering edit mode.
2018-04-04 22:56:45 +02:00
Romain Derie 6be3a2a2a0 [FIX] web_editor: Reduce interline in web editor html lists
Backport of 2b575e9 that landed in master
2018-04-04 22:56:28 +02:00
thomas-tankengine eaf54656fc [FIX] l10n_fr_pos_cert: set decorator on unlink
As unlink from models is still written in old API, needs to set the decorator to
avoid an error when trying to delete a bank statement

Closes #23999
2018-04-04 16:31:49 +02:00
tlemaire 7d2f082d80 [CLA] signature for Thomas Lemaire
Done at #23999
2018-04-04 16:31:48 +02:00
Denis Vermylen (dve) 9d95abd35c [FIX] theme_*: restore category to theme
category was changed to "Website" so it'd appear under the website
category in the store, but it needs to be "Theme" otherwise it doesn't
appear in the "Choose your theme" menu after installing website.

This is a backport of 10.0 https://github.com/odoo/odoo/commit/3d53a740

Without extra themes, the "Choose your theme" would be empty.

fixes #21898
opw-1802936
closes #24042
2018-04-04 16:18:29 +02:00
Goffin Simon a36ff26ce0 [FIX] point_of_sale, sale_stock, stock_account: POS Anglo-Saxon Accounting
In average price or in FIFO, the stock move cost related to the picking of the POS Order
must be used to compute the price.

opw:1829842
2018-04-04 16:16:59 +02:00
mreficent 3754280a05 [FIX] account: don't require a company in tax_templates
We want to force the tax template to be blank always, because multiple companies can potentially use this template to create taxes. We want consistency company-wise.
2018-04-04 16:16:34 +02:00
Bogdan Lisnenko df3192ef87 [FIX] l10n_ca: fixed account type in template
Canadian chart of account template contained incorrect account types for Tax receivable and Tax to pay.
This was fixed. Related issue #8934
2018-04-04 15:46:51 +02:00
mreficent bcad465c93 [FIX] purchase & stock_dropshipping: fix some tests
Related to commit https://github.com/odoo/odoo/commit/0e881fcd3a5671c4fe84b2a47c9d3611e4b823a1
2018-04-04 15:45:52 +02:00
Jeremy Kersten 5ba05f2ba4 [FIX] web, website: fix font path for bootstrap
Before this commit, if you or a lib uses Glyphicons, the font was loaded from
/web/content/fonts/ (or /web/static/src/less/fonts/ in debug=assets)

It is because bootstrap is imported from /web/static/src/less/import_boostrap.less
not directly from /web/static/lib/bootstrap/less/bootstrap.less

Now, we use absolute path to load font, overriding the variable define in
variables.less from bootstrap.
2018-04-04 13:02:21 +02:00
Martin Geubelle 4fc170e0fe [FIX] survey: submit a survey with empty date
Since rev. odoo/odoo@cd05983 it was not possible to submit a survey if a date
field was empty (trying to set `toJSON` on `null`).

The datepicker `date` function returns `null` if no date has been selected.

opw-1832381
2018-04-04 12:55:55 +02:00
len-odoo b6c962e62a [FIX] calendar: fix event sorting function
When sorting events according to some property that is not defined for all
events, Odoo would give a traceback as it would try to compare a boolean to some
other type.
We simply lift every value to a (boolean, X) tuple for any type X in the
sorting key function, thus having values of homogenous type.

opw 1831457
2018-04-04 12:45:40 +02:00
Martin Trigaux cc5dc8bfc5 [IMP] .github: avoid to titleize the PR content
Avoid reports like #23893 where the text is too close to the -- mark
2018-04-04 12:23:41 +02:00
Robinet Denis (ACSONE) bff47822f8 [CLA] add RobinetDenisAcsone into Acsone CLA
Closes #23967
2018-04-04 12:14:38 +02:00
Andreas Perhab 96c1530eaa [FIX] doc: corrected bootstrap documentation link
The global link was redirecting to http://getbootstrap.com/components/ (without
the fragment identifier).
Moreover, now that Bootstrap 4.0 is released, this URL may be broken in a close
future.

Closes #24031
2018-04-04 12:04:22 +02:00
Yannick Tivisse 9999a54028 [FIX] fleet: Add missing dependencies on compute fields 2018-04-04 11:32:56 +02:00
Yannick Tivisse 3eb328cdc5 [IMP] fleet: Track changes on license_plate and total_depreciated_cost 2018-04-04 11:32:56 +02:00
Nicolas Martinelli 31f68563e0 [FIX] product_email_template: use regular HTML widget
The widget text was set when CKEditor was used, in order to avoid
breaking the template. This is not necessary anymore.

opw-1833484
2018-04-04 11:02:42 +02:00
Nicolas Martinelli 81e9b6d213 [FIX] sale_timesheet: undefined variable
Make sure `line_revenue` is always defined.

opw-1829893
2018-04-04 10:12:57 +02:00
Nicolas Lempereur cbff414cea [FIX] marketing_campaign: traceback on install 9.0
When installed, marketing_campaign shows the root "Marketing" menu by
default but this menu is not an action and just contain a
"Configuration" submenu without action as well.

Thus in community we got on a page without content, and on enterprise we
got a JS error.

note: only happen in 9.0

fixes #21898
opw-1802936
closes #24026
2018-04-04 09:59:37 +02:00
Lucas Perais (lpe) 72254129db [FIX] mail_activity: state of activity is TZ dependent
Have your user and your system in timezone Sao Paolo
When it is 2200 TZ time, UTC is the day after 0100

Have a activity schedule for today

Before this commit the activity was flagged as overdue.
This was because we compared the date deadline of the activity (no TZ)
to the date.today() in Python
While date do not have TZ legitimately, the moment (and place) you create them matters
Thus, we compared the date of the server (UTC -- day +1) to a date set by the user (TZ -- day -1)

After this commit we make up a date according to the user's tz
And the activity is not overdue, but in state 'today' as it should

OPW 1827920
closes #23969
2018-04-04 09:49:46 +02:00
Lucas Perais (lpe) 26347fc759 [FIX] web: debug manager: replace tree mode by list
- Open in debug mode the 'beetle'
- Click on open view
- select a Tree view in the list

Before this commit: A traceback appears
This was because while the Tree view per se has been discontinued
the mode 'tree' of an action must be supported
Which was not the case for this particular widget

After this commit: the list view asked for appears

OPW 1833008
closes #23963
closes #24005
2018-04-04 09:45:54 +02:00
mreficent b11621476b [FIX] pos & website_event_sale: fix some tests
Related to commit https://github.com/odoo/odoo/commit/0e881fcd3a5671c4fe84b2a47c9d3611e4b823a1
2018-04-04 09:36:18 +02:00
Nicolas Martinelli 6eefb7fb39 [FIX] base: user.share recomputation
When saving the settings, we perform a `write` on the groups and implied
groups. This will trigger a recomputation of the fields `share` on
`res.users` and `partner_share` on `res.partner`.

On a database with many users, this can lead to a non-negligible time
spent in these methods.

opw-1830145
2018-04-04 09:24:58 +02:00
Rémi Rahir f1a884e046 [FIX] web,account,google_calendar: correcting previous commit
corrects error added in c3d1eda017 .
Non-breaking spaces were explicitely added in the tests. This commit
restores the proper behaviour.
2018-04-03 18:05:52 +02:00
jem-odoo 35a4263f0a [FIX] calendar: comparing timezoned datetimes
We transform the rrule stored as a string into a real
rrule object using 'rrule.rrulestr'. The 'UNTIL' parameter
of the rrule might not be timezoned. So the '_until' property
of the rrule object will be a naive datetime.

Later in the '_get_recurrent_date_by_event', we add the recurring
date in the '_exdate' property, but those dates are timezoned.

When iterating on the rrule set (its a set since forceset=True), the
until date and exdate are compared, but it cause crashes as we can not
compare offset-naive and offset-aware datetimes.

This commit make the rrule use only naive or aware datetimes for its
'until' and '_exdate' properties depending on the 'until' property
of calendar.event rrule field.

opw-1825679
closes #24010
2018-04-03 17:54:12 +02:00
Goffin Simon ce162fae3e [FIX] account_analytic_default: Default analytic account in multi company
Steps to reproduce the bug:

- Set your user in multi company
- Set a default analytic account A for product P with your company
- Create a PO with P and deliver it
- Generate the invoice.

Bug:

The analytic account A was not set on the line.

opw:1831998
2018-04-03 16:09:01 +02:00
Rémi Rahir c3d1eda017 [FIX] web,account,google_calendar: chasing breaking spaces
Before this commit, some breaking spaces were present in the js code.
Such spaces are misinterpreted and worked by luck.

This has become a problem with exported js bunldes (e.g. the
external_lib bundle in im_livechat).

This commit replaces breaking spaces by regular spaces.
2018-04-03 15:52:17 +02:00
Toufik Benjaa 55878df5ff [FIX] account_payment: Restrain access to invoice's partner
- Restrain the creation of transaction for an invoice to the invoice partner.
- Removed the callback_method argument as it was unused.
2018-04-03 14:22:10 +02:00
Wolfgang Taferner 0f9bf4b0d0 [CLA] add ap-wtioit to WT-IO-IT's CCLA
Closes #24001
2018-04-03 13:38:19 +02:00
Nicolas Lempereur eca030cc38 [FIX] account: invoice line form ok studio context
Correct account invoice line form view so studio doesn't fail on
something that doesn't seem really correct (and somehow worked thanks
to pyeval implementation or the override from another view type).

opw-1826254
opw-1830171
closes #23997
2018-04-03 13:16:21 +02:00
Lucas Perais (lpe) 691b1f6fa4 [FIX] hr_attendance: fix handling of date objects in greetings
On 'My attendance', do some check-in/out operations
while on the server side, everything was ok, the display had some issues:
On Chrome, that worked well whereas in Safari, it did not
since the Date() implementation only accepts ISO date strings

We take the opportunity of this fix to handle dates with moment.js, which accepts non-ISO formats

OPW 1831555

closes #23962
2018-04-03 04:33:14 -03:00
Priyanka Kakadiya d768964a37 [FIX] account_voucher: journal entry creation in multi-currency
When creating sales/purchase receipt for a journal having a secondary currency, an error was raised as the amount_currency had the wrong sign (compared to the debit/credit).

Was Issue #1819396. Was PR #23768
2018-04-03 09:32:43 +02:00
Goffin Simon 1039abfbdb [FIX] web: time format without seconds
Steps to reproduce the issue in 11.0 Enterprise:

- Go to the language English
- Remove from the time format the seconds
- Refresh the page
- Go to sales
- Create a sales order;

Bug:

- You get the warning message

closes #23596 closes #22027
opw:1829577
2018-04-03 09:19:34 +02:00
Odoo Translation Bot d636c6c95c [I18N] Update translation terms from Transifex 2018-04-01 04:15:11 +02:00
Odoo Translation Bot 89c46e7da6 [I18N] Update translation terms from Transifex 2018-04-01 02:39:07 +02:00
Odoo Translation Bot b9ada1e62e [I18N] Update translation terms from Transifex 2018-04-01 00:29:20 +02:00
Nicolas Lempereur 471b7e3657 [FIX] stock: settings enable only op of active wh
The code in res config that enabled or disabled internal operation type
did not take into account that active_test is set to False inside this
type of code since c2e259d8.

Thus a picking type of an archived warehouse would possibly unexpectedly
be enabled after saving the settings.

opw-1826196
closes #23956
2018-03-30 14:36:28 +02:00