Commit Graph
126256 Commits
Author SHA1 Message Date
Aaron Bohy 2be28d4d03 [IMP] web,board: enable pagination in grouped lists
With this rev., when there are a lot of groups in a grouped list
view, groups are displayed under several pages, whereas they were
all displayed in the same page before.

This is especially interesting with the new 'expand' attribute, to
ensure that we don't read records for a large number of groups.

By default, the groups limit is set to 80 (like records), and to 10
is the 'expand' attribute is set to true. This limit can be
overriden with the 'groups_limit' attribute.

Part of task 1915702
2019-04-02 11:55:57 +00:00
Aaron Bohy 5895d23cbd [IMP] web: list: add expand attrs
When this attribute is set to true on the <tree> root node, in a
grouped list view, first level groups are automatically opened.

Part of task 1915702
2019-04-02 11:55:57 +00:00
234d92c4f0 [IMP] web: list: editable grouped list views
This rev. enables the editable feature in grouped list views.

Part of task 1915702

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
2019-04-02 11:55:57 +00:00
Aaron Bohy 55676110c8 [IMP] web: list: import attrs
The 'import' attrs is valid according to the rng definition of the
list view. It is used in a few views in Odoo. However, it didn't
actually work (in most cases, it worked by chance because it is
set to "0" in addition to create="0", and create="0" already
disables the import feature).

With this ref, the 'import' attrs is taken into account and we
can now disable the import feature even if the create one is
enabled. Moreover, it is now documented.
2019-04-02 11:55:57 +00:00
Aaron Bohy 7024f8d58b [REF] base,account: list: remove deprecated attrs
The 'toolbar' attribute is not referenced in the documentation, and
it has no effect since at least v10.

The 'on_write' attribute was referenced in the documentation, but
is no longer used in Odoo and has no effect since at least v11.

The 'colors' and 'fonts' attributes are deprecated since v9, and
have no effect since v10.

The 'string' attribute is deprecated since v8 and has no effect
since v9. However, it is widely used in Odoo, so we must remove
all occurrences before removing it from the rng.
2019-04-02 11:55:57 +00:00
Julien Castiaux aa18cac547 [FIX] website_blog: invalid bootstrap id
- Go to Website.
- Open a Blog
- Try to open the Archives Tree an the right site
  (set 'Cuszomize Settings / Archives')
- The tree doesn't open

In Bootstrap 4, and HTML id attribute must start with a letter.

opw-1959770

closes odoo/odoo#32244

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-29 13:13:50 +00:00
Martin Trigaux c9d01b136f [ADD] test_translation_import: add new test
This test also fails before the module extraction commit as the code
translations like the one for 'Ijkl' have no 'module' value during the reimport
and are ignored by the following search

closes odoo/odoo#32022

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-29 14:50:56 +00:00
Martin TrigauxandRaphael Collet 257ccdf83c [FIX] tools: extract module from po file
When a single po file is processed (i.e. direct po import, not read from a i18n
directory inside a module), there was no module information on code translations

The module information is important for web translations where the list of
modules is given in the call to the route '/website/translations' and
'/web/webclient/translations' and only the web translations of these specific
modules is retrieved and used.

To manually import the translations of a custom module (e.g. openerp_enterprise),
the base.language.import wizard is typically used and the give .po file is
directly imported.
For model and model_terms, the module information is easily deducted from the
the record external id (<module>.<reference>) but for code translation, we
relied on the global variable module_name.

The .po file do contain the module information but this information was ignored.
Real example:

  #. module: openerp_enterprise
  #. openerp-web
  #: code:addons/openerp_enterprise/static/src/js/odoo_enterprise_start_trial.js:249
  #, python-format
  msgid "Please choose your domain name"
  msgstr "Veuillez choisir votre nom de domaine"

Before this commit, the above translation was imported without the module and
was not retrieved in the '/website/translations' call on the /trial page

The global module_name is still used when set for backward compatibility.

Co-authored-by: Raphael Collet <rco@odoo.com>
2019-03-29 14:48:57 +00:00
Martin Trigaux 76264db40b [FIX] project: remove old hack
This code was to be removed in saas-7 (which went the way of the dodo)
project_time_mode_id is now only on hr_timesheet

This was creating an ir.model.data entry with res_id=0 (not record found).
A ir.model.data without id triggers a warning in the trans_generate method when
trying to export the translations of the module project (where the reference
fails to be resolved)
2019-03-29 14:48:57 +00:00
Christophe Simonis 82f8c37f69 [MERGE] forward port branch saas-11.3 up to ec29b4d364 2019-03-29 16:10:42 +01:00
Nicolas Lempereur f2c301557d [FIX] website: "Visits" no overlap "active users" in dashboard
The current style on "Active users: {number}" placed it 60 pixels over
were it should be, so this was:

- overlapping "Visits" title
- not sparing vertical size (since we use "position:relative")

opw-1961605
closes #32245

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-29 12:53:12 +00:00
Nans Lefebvre 6b9b9d8997 [FIX] base_geolocalize: raise a helpful error to configure the Google account
Google maps used to be free, but became a paid API.
Technically, the usage could be part of the free offer,
but to benefit from it the account needs to have billing enabled.
Since it's a paid feature security had to be ramped up,
so now APIs have to be explicitly enabled (here geolocating/geocoding).
All this makes it so that the Google account has to be properly configured
before the calls to the Maps API can work.
As a result we add an explicit UserError if the request fails,
to help the user configure the Google account
(before the error was entirely hidden as to give the user no chance at all).

Also exports transaltions, including for commit e6ca846c65
which raised a similar error message if no API key was found.

opw 1946485
opw 1947292
opw 1947337

closes odoo/odoo#32162

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-29 11:33:00 +00:00
Martin Trigaux 89347f451b [FIX] im_livechat: do not rename module description
mail.channel module in mail module has the description "Discussion Channel"
(with a capital C) and was overriden in im_livechat to "Discussion channel"
(with a lowercase c).
Installing a module was renaming a field (which is never a good idea, especially
for translated fields)

closes odoo/odoo#32238

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-29 10:39:27 +00:00
Martin Trigaux 0f6038e777 [I18N] *: export 12.0 source terms
Some changes were not reflected in 12.0.
Changes made in .pot in previous versions were not forward ported

Closes odoo/odoo#32238
2019-03-29 10:39:17 +00:00
Martin Trigaux 14f893752a [I18N] *: export 11.0 source terms
Some were missing or lost during forward port

Fixes odoo/odoo#32217

closes odoo/odoo#32232

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-29 09:13:25 +00:00
Christophe Simonis ec29b4d364 [MERGE] forward port branch 11.0 up to 4231103cc9 2019-03-28 18:17:20 +01:00
Christophe Simonis 4231103cc9 [MERGE] forward port branch saas-15 up to 23650d5217 2019-03-28 16:54:21 +01:00
Christophe Simonis 23650d5217 [MERGE] forward port branch saas-14 up to 7dd2a642ed 2019-03-28 16:53:18 +01:00
Christophe Simonis 7dd2a642ed [MERGE] forward port branch 10.0 up to 14a8148e8d 2019-03-28 16:52:53 +01:00
Christophe Simonis 14a8148e8d [FIX] hw_escpos: define used variable
Oversight of #32079
2019-03-28 16:50:16 +01:00
Christophe Simonis a039d657e4 [MERGE] forward port branch saas-15 up to 6b54bd88a9 2019-03-28 16:05:06 +01:00
Christophe Simonis 6b54bd88a9 [MERGE] forward port branch saas-14 up to 78f01e3609 2019-03-28 15:46:55 +01:00
Christophe Simonis 78f01e3609 [MERGE] forward port branch 10.0 up to 6814f27bbc 2019-03-28 15:46:04 +01:00
Mathieu Duckerts-Antoine 98e4540fe9 [FIX] web: call super in AbstractAction willStart
The commit https://github.com/odoo/enterprise/commit/19a144d6af2974e964c6487170e6bca1b14d3898 has
modified how libraries are loaded at several places and has
introduced a bug in sale_subscription_dashboard where the
libraries are no longer loaded at all. We fix that situation
by calling super in the willStart method of AbstractAction
that inherits from Widget. Abstract actions can now also
benefit from the mechanism present in Widget willStart.

closes odoo/odoo#32209

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-03-28 12:47:01 +00:00
Thanh Dodeur 1a5ab92654 [FIX] mail: fixes the download url
Following the changes to the document viewer to make it more flexible
for use in documents (89f20d2c29), the download route wasn't changed accordingly.

This commit fixes this issue so the download route is based on
the model of the viewer.

closes odoo/odoo#32207

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-03-28 12:25:44 +00:00
Adrien Dieudonne 85b595e6f0 [FIX] web: avoid double margins after Many2ManyTags fields
Before this commit, there was too much space after Many2ManyTags
fields. This was due to the fact that a many2one is embedded in the
many2manytags widget. Therefore, the css rule who add margin-bottom
was applied twice.
e.g.: Tags field in project task form view

To fix this, we remove the margin-bottom from the children widgets.

Note: This bug is not a big deal in previous versions but in 12.2
margins between fields has been increased in mobile and  we clearly
saw this issue.

Task ID: 1944884

closes odoo/odoo#32193

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2019-03-28 09:21:42 +00:00
Jigar Vaghela a82dbe4d68 [IMP] purchase: Change purchase sub menu string from "Purchase" to "Order"
Purpose :
========
    Maintain the uniformity between the sales and purchase menus

closes odoo/odoo#31482

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-28 06:19:40 +00:00
Jigar Vaghela a018279d77 [IMP] purchase: New products menu and show Products and Product Variants in this menu.
Purpose :
========
    Maintain the uniformity between the sales and purchase menus
2019-03-28 06:12:55 +00:00
Arnold Moyaux 27e9c9e011 [FIX] mrp: unlock a raw move line
Usecase to reproduce:
- Go on a Mo
- Edit and Unlock
- Produce the MO
- Update a raw move and add a move line

User error you quant write on product_qty fields.
product_qty represent the reserved quantity on move line as quant's UoM.
The system requires to write a product_uom_qty that represent the same
quantity but in the move line UoM.

Fix it by removing the fields from the view, so it's no more save.
Also set the quantity done as readonly if the lines are present in
the view.

closes odoo/odoo#32135

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-03-27 14:02:32 +00:00
William Henrotin 799ab73189 [FIX] mrp: handle multi
The _compute_final_lot_domain method is implicitely multi but doens't manage the loop over 'self'
2019-03-27 13:40:29 +00:00
William Henrotin 419d32207a [FIX] mrp: qty_done and qty_to_consume concistency
This commit ensures the qty_to_consume is always adapted to be the same
as qty_done in the onchange on qty_processing. This patch is needed to
keep the same behaviour before and after the workorder line refactoring
5ef46664a2
2019-03-27 10:29:20 +00:00
Gabriela Mogollón 88f4cfe1a5 [IMP] l10n_mx: add new tag for non-creditable tax (8%)
closes odoo/odoo#32224

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 23:19:34 +00:00
Nicolas Lempereur 03d74f4f76 [FIX] web: drag & drop month calendar->keep time
In fullcalendar, we have in f5b7ad80f fake moments date with UTC time
that are the local time, thus when we move an event to another day, we
need to set it as:

- the selected year-month-day
- the original utc hours (real local hours) -> local hours
- the original utc minutes (real local minutes) -> local minutes
- the original utc seconds (real local seconds) -> local seconds

When it is sent to server, timezone offset will be removed so we will
transfer to server the expected datetime in UTC.

With this changeset we send server the correct time when a fullcalendar
event is "all_day" but the original event was not (eg. drag and dropping
event on the month view).

Added test without change failed with:

 - 4. event moved to 27th nov 16h00 +40 hours timezone
      (expected "2016-11-29 08:00:00", result: "2016-11-27 16:00:00")
 - 5. expected: "event|6|11/27/2016|16:00:00"
      result: "event|1|12/09/2016|08:00:00"
 - 6. expected: "event|1|12/09/2016|08:00:00"
      result: "event|3|12/10/2016|23:55:05"

opw-1955281
closes #32136

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-26 17:49:40 +00:00
Xavier Dubuc 8b13f21679 [FIX] product: template kanban view perf
When displaying product template list in kanban mode, all the variants
of the product template are loaded but aren't used at all. This causes a
perf issue when loaded product templates have a lot of variants.

This commit removes the field `product_variant_ids` from view
`product_template_kanban_view` to avoid that perf issue.

opw 1951369

closes odoo/odoo#32048

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>

closes odoo/odoo#32185

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-28 07:25:06 +00:00
Nicolas Martinelli ad11910040 [FIX] mass_mailing: default value
Do not raise if data have been deleted. Since the fields are not
required, do not fallback.

opw-1959184

closes odoo/odoo#32163

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-27 13:29:48 +00:00
Yannick Tivisse 7c1a9a8204 [FIX] l10n_be_hr_payroll: Hide wage_with_holidays when leaves = 0
Now that we don't take into account the legal leaves, it should be hiddden when the number of leaves is equal to 0 instead of 20.0

closes odoo/odoo#32125

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-26 12:05:33 +00:00
Toufik Ben Jaa a3cdfdc628 [FIX] website_sale: _is_available_on_website access rights issues
- The method `_is_available_on_website` on `product.pricelist` access to
  the field `code` which is limited to the group `base.group_user`.
  This causes issues when the method is called by a non internal user.

closes odoo/odoo#32123

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-26 10:15:43 +00:00
Christophe Simonis 5dbf7bf357 [MERGE] forward port branch saas-12.1 up to f00c490be8 2019-03-26 10:33:26 +01:00
Nicolas Martinelli fa42cebdc9 [FIX] account_payment: pay credit note
Complement of commit 9a450ac162

opw-1958997

closes odoo/odoo#32115

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 08:41:12 +00:00
Nicolas Martinelli 24961b9e2f [FIX] website_sale_options: striked price
- Set the 'Public Pricelist' with 'Discount Policy: Discount included
  in the price'.
- Go to the shop and search the product 'iPad Retina Display'
- Add product to cart by using the quick add to cart button

The 'Add to Cart' modal show public price & discount to the customer.

Closes #31378
opw-1944362

closes odoo/odoo#32114

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 08:00:56 +00:00
Christophe Simonis f00c490be8 [MERGE] forward port branch 12.0 up to 11b1e12cde 2019-03-25 19:45:26 +01:00
Swapnesh Shah a432e5c12a [FIX] hr_holidays: Add missing fields in constrains
closes odoo/odoo#32108

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-25 17:51:43 +00:00
Goffin Simon 00797edd88 [FIX] hr_timesheet: Timesheet user access right issue
Steps to reproduce:
- Create a clean Odoo 12E database and install Project, Timesheets, Accounting, Sales and Purchase applications
- Create a new project (e.g SO 6) and a new task (e.g milestone 1)
- Create a new user with access rights for Project = user and for Timesheet = user, and nothing else
- Login under this user, enter timesheet app and try to add a timesheet line in grid or kanban view

Bug:

An access rights error was raised but when trying to add a timesheet line from the list view, no
error was raised.

opw:1962126

closes odoo/odoo#32427

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-08 07:32:16 +00:00
Vincent 9f0bcabf05 [CLA] Adding Business Solutions For Africa
closes odoo/odoo#32353

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-03 01:20:48 +00:00
Graeme Gellatly 3017aecd09 [FIX] purchase_requisition: super call
Call super on overridden `_prepare_sellers` method in
purchase_requistion.

Closes #31649
opw-1963883

closes odoo/odoo#32470

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-05 14:52:20 +00:00
Odoo Translation Bot 4ccdddcf6b [I18N] Update translation terms from Transifex 2019-04-07 01:27:03 +02:00
Nicolas Lempereur 7a5f1068fa [FIX] stock: return's return ok package location
If we create a package X transfering from location A to location B:

- we create a stock.quant for package X in location B

=> The package is on location "B" (OK)

If then we do a transfer of that package from location B to location A:

- we set the location B / package X quant to 0 size
- we create a stock.quant for package X in location A

=> The package is on location "A" (OK)

If then we do a transfer of that package from location A to location B:

- we set the location A / package X quant to 0 size
- we set the location B / package X quant to package size

=> The package still is on location "A" (wrong)

This is because:

- since c0d7a05730 stock.quant.package field `quant_ids` is a view over
  related stock.quant but filtered on domain:
     ['|', ('quantity', '!=', 0), ('reserved_quantity', '!=', 0)]

- stock.quant.package fields `location_id`, `company_id`, `owner_id` are
  updated when a related stock.quant has fields `package_id`,
  `location_id`, `company_id`, `owner_id` modified

Thus when the `quant_ids` change by changing quantities, `location_id`
are not updated even if it should be.

opw-1963509
closes #32466

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-04-05 13:38:16 +00:00
Olivier Dony 6fa292cec8 [FIX] ir_mail_server, mail: catch SMTPServerDisconnected exceptions
If the smtp session was dead, it would lead the whole mail batch to fail.

opw 1949270

closes odoo/odoo#32424

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-04-05 14:10:41 +00:00
Nans Lefebvre 552da8dc8d [FIX] account: do not allow a user to have both B2B and B2C groups
We base ourselves on commit f206714af0, which added a check on user groups.
The tax-included and tax excluded displays are meant to be exclusive,
but wily users can add themselves to both groups using the res_users view
in debug mode.

opw 1950833

closes odoo/odoo#32200

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-28 13:04:00 +00:00
Christophe Simonis 11b1e12cde [MERGE] forward port branch saas-11.3 up to e9068c290b 2019-03-25 18:28:16 +01:00