Commit Graph
122555 Commits
Author SHA1 Message Date
Nicolas Martinelli e95b4e9594 [FIX] web: graph view translation
The control labels 'Grouped' and 'Stacked' are not translated since they
are default values from nvd3.

opw-1908220

closes odoo/odoo#29975
2019-01-08 13:43:43 +00:00
Jorge Pinna Puissant 5995680542 [FIX] hr_holidays: validation_type same behavior
opw-1919744

Before this commit, the user in the leave_type had the choice between
three validations : 'hr', 'manager' and 'both'. The behaviour of the
application was exactly the same if 'hr' or 'manager' was chosen.

In this commit, a computed field was added only to hide this choice,
and restrict the user to choice between the 'double validation'
or the normal validation.

This commit must be reverted once the fonctional part is implemented.

closes odoo/odoo#29952
2019-01-09 07:28:21 +00:00
Jorge Pinna Puissant 171d1e7bc3 [FIX] web_editor: Media dialog next btn reload page
opw-1910505

Before this commit, the next button in the media dialog widget reloaded
the page and opened only the iframe of the widget.

Now, the button only update the media dialog widget.

closes odoo/odoo#29981
2019-01-09 07:29:22 +00:00
Veikko Väätäjä 270171752f [FIX] doc: fix numbered list in guidelines
Fix rst-formating for numbered list under heading "Inherited XML".

closes odoo/odoo#30043
2019-01-08 16:49:10 +00:00
Nicolas Martinelli d0d8b7b4de [FIX] mrp: BoM Structure report
Send the context for proper translation of the report.

opw-1908220

closes odoo/odoo#30038
2019-01-08 14:37:02 +00:00
Martin Trigaux 91882dd972 [FIX] base: delete linked record only if last external id
In case a record is no longer referenced in the updated module, its external id
is deleted.
If the linked record still exists, it is deleted as well.

This last clause was incorrect as the record may still be referenced in other
modules.

If a field is declared in module A

class FooA(models.Model):
    _name = 'foo'
    bar = fields.Char()

and overriden in module B

class FooB(models.Model:
    _inherit = 'foo'
    bar = fields.Char(translate=True)

In case the field is no longer inherited in module B (code change, moved to
another module,...), the ir.model.field record for bar was deleted.

Two external ids are linked to field bar:
A.field_foo__bar
B.field_foo__bar

The ir.model.field record should be dropped only if both ir.model.data entries
are no longer loaded.
Otherwise, only the ir.model.data entry should be deleted (i.e. B.field_foo__bar
in the above example).

Fixes odoo/odoo#29820

closes odoo/odoo#30018
2019-01-08 15:21:27 +00:00
张志亮 8322c7c731 [CLA] alexcn signs cla
closes odoo/odoo#30010
2019-01-08 14:45:02 +00:00
Christophe Simonis 3e4138deaa [MERGE] forward port branch saas-11.3 up to 2d824a5b7a 2019-01-08 17:08:48 +01:00
Christophe Simonis 2d824a5b7a [FIX] test_mail: bump expected query count
The prefetch hell patch [1] generate one more query.

[1] a07a076c45
2019-01-08 15:35:34 +01:00
Nicolas Martinelli 232675c49b [FIX] stock: translation of Traceability Report
opw-1908220

closes odoo/odoo#30012
2019-01-08 13:45:24 +00:00
Julien (juc) Castiaux e02a05a724 [FIX] web_editor: left/right/center image for mail
When creating a banner using the web editor, the targeted image
appears centered in the editor but is aligned on the left in the
email.

The issue also happened with other alignment (left in a centered
widget, right, ...) for example on outlook 2007 and should be solved
with this changeset.

note: 12.0 version of #29214

opw-1904827
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
closes #29954
2019-01-08 11:53:32 +00:00
Romain Derie fd80cf9e53 [FIX] portal: dont override list-group-item BS4 active color (white)
Before this commit, BS4 color for active list-group-item (white) would always
be overriden by our portal custom css to the BS4 color for inactive one.

Part of #29884
2019-01-08 12:50:24 +00:00
Romain Derie d3a7edaec4 [FIX] web, website: set correct order on modal footer button
Since 12.0, some modal footer button order were changed. The primary button
would not be the one in the modal footer corner.

This is against bootstrap but more annoyingly, users are intuitively clicking
on the secondary button, ending up closing the modal and losing form
information they entered.

This commit simply fix the regression from 12.0 as before 12.0 these buttons
were positionned correctly.

Note that a commit in master (saas-12.2) will fix all the other ones that were
wrongly positionned before 12.0.

Step to reproduce:
  - Go to an event having the possibility to register.
  - Click on 'Register Now', a modal is shown to write details (name, email..)
  - You intuitively click on 'Cancel' as it is the bottom right button
    |________________________________ CONFIRM _ CANCEL _|
  - The modal is closed, if you try to open it again your infos are lost

Closes #29884
task-1922120
2019-01-08 12:50:24 +00:00
Christophe Simonis b50883d17b [MERGE] forward port branch 11.0 up to c07b7200b2 2019-01-08 11:52:15 +01:00
Christophe Simonis c07b7200b2 [MERGE] forward port branch saas-15 up to e1c7fefe89 2019-01-07 18:19:25 +01:00
Christophe Simonis e1c7fefe89 [MERGE] forward port branch saas-14 up to cdb0c08cb9 2019-01-07 17:30:57 +01:00
Christophe Simonis cdb0c08cb9 [MERGE] forward port branch 10.0 up to d4024a713c 2019-01-07 17:30:11 +01:00
Francisco Fernández d4024a713c [CLA] PlanetaTIC signs Odoo CCLA 2019-01-07 15:34:10 +01:00
Julien (juc) Castiaux fce729e65a [FIX] web_editor: banner not horizontaly centered
When creating a banner using the web editor, the targeted image
appears centered in the editor but is aligned on the left in the
email.

The issue also happened with other alignment (left in a centered
widget, right, ...) for example on outlook 2007 and should be solved
with this changeset.

opw-1904827
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
closes #29985

closes odoo/odoo#29214
2019-01-07 13:49:33 +00:00
Antoine Prieels 2299d2563b [FIX] snailmail: Remove class on recipient's address
Layouts were not accepted by Pingen due to the fact that the class that we added to the recipient's address was not present in stable versions.
The format was therefore not adapted to Pingen.
We then remove this class to fix layouts in stable versions.

closes odoo/odoo#29976
2019-01-07 09:25:51 +00:00
Christophe Monniez 6366c24499 [FIX] test_main_flows: open operations menu in enterprise only
In community, when entering the Manufacturing app, the first view is the
Manufacturing orders list view as it's not the case in enterpise, the
two steps are only necessary in enterprise.

Note: even if it fix the tour, the main bug could still be there.

closes odoo/odoo#30016
2019-01-08 08:47:53 +00:00
Odoo Translation Bot 652cecffde [I18N] Update translation terms from Transifex 2019-01-06 01:32:05 +01:00
Humberto Arocha fe8e462822 [FIX] account: Wrong amount_currency on reconciling several lines
closes odoo/odoo#29966
2019-01-05 21:49:04 +00:00
Romain Derie 56243f4670 [FIX] website_gengo: override of static template was not working
The template `website_gengo.web_editor.TranslatorInfoDialog` was not used
anymore.
It is supposed to replace the one in `web_editor` module.

Among other things, 2972976 refactored the `web_editor` template to
contain only the modal body content. The bug might be coming from it.

closes odoo/odoo#29955
2019-01-04 16:43:19 +00:00
Arnold Moyaux 8c8b32e5e4 [FIX] mrp: manufacture user can not record production
Usecase to reproduce:
- Connect with demo user
- Create a MO w/h routing
- Confirm and produce it
- Record the production wizard

Access right error on product.product for field tracking

It happens because the wizard use a related to product.tracking howerver
it is not set as readonly on the view and send to the server as a value
on save. Since it write on a related field it will try to write on the
linked model(product.product).

This commit set the field as readonly so it is not set to the server.
The field is just used inside domain and it is invisible to the user
so it do not modify any behavior.

opw-1918684

closes odoo/odoo#29942
2019-01-04 14:15:35 +00:00
Juan José Scarafía 0babee58b7 [FIX] base: correct typo in state name
Argentina state is Entre Ríos

closes odoo/odoo#29959
2019-01-07 08:58:54 +00:00
Christophe Simonis 52057da36f [FIX] test_main_flows: more explicit trigger 2019-01-04 14:54:15 +01:00
Christophe Simonis ec9400821e [MERGE] forward port branch saas-11.3 up to 27a084eb81 2019-01-04 14:54:08 +01:00
Lucas Perais (lpe) 0e0c726805 [FIX] purchase: don't change status when writing a note through the composer
Have a RFQ in draft. Log a note or send a new message, but use the full composer to do it.

Before this commit, the RFQ was set to sent

After this commit, it stays rightfully in draft
It is mark as sent, only if the button SEND RFQ is used

OPW 1908094

closes odoo/odoo#29902
2019-01-04 13:18:14 +00:00
Nans Lefebvre 2cdc1cc9ce [FIX] sale: hide the sales menu from users without any rights
If a user has no rights on sale, he should not see the sales menuitem
on the dashboard.

opw 1921335

closes odoo/odoo#29934
2019-01-04 10:39:18 +00:00
Toufik Ben Jaa 99c319e03a [FIX] account: deadlock on install
- When installing an accounting l10n module, the method `try_loading_for_current_company`
  is called and could cause a deadlock.
  The deadlock is caused by the fact that if the installation is started
  via a web request the code tries to retrieve the current user's
  company by doing `request.env.user.company_id`.

  This causes issues since the installation code has its own postgresql
  cursor while calling `request.env.user.company_id` will create its own
  cursor.

  So two cursors exists for the same Odoo worker.
  The installation cursor asks for a lock on `res_users` while the
  second cursor (the request one) will try to read on `res_users` and
  wait the first lock to be dropped.

  The lock is never dropped since the python code isn't running anymore
  waiting for the `request.env.user.company_id` to be completed.
  Causing the deadlock.

  To fix the issue, we avoid the creation/usage of a cursor created by
  `requesŧ`.
  So to retrieve the current user's company, we read the user id on the
  request's session, then browse the `res.user` record with the
  installation cusror.

  Fix issue introduced by commit d40956c790

closes odoo/odoo#29927
2019-01-04 10:55:31 +00:00
Jorge Pinna Puissant 9cf6662880 [FIX] account: compute_fiscalyear_dates non leap years
Before this commit, when the fiscal year was setting to 29/02.
The function that compute the fiscal year dates gives an error.
This occurs when the date passed as parameter wasn't a leap year.

Now, for the non leap years we use the 28/02.

opw-1917035

closes odoo/odoo#29932
2019-01-04 10:23:44 +00:00
Alexey Pelykh 1ffc485689 [FIX] hr_holidays: extra space in state check
The condition was never validated

closes odoo/odoo#29898
2019-01-04 10:18:30 +00:00
Alexey Pelykh 11e5688d0f [CLA] Brainbean Apps OU signs Odoo CCLA 2019-01-04 10:18:24 +00:00
Julien (juc) Castiaux 033608eb11 [FIX] sale: non-consistent tests
The tests of the sale module are not constistent. Success depends on version
in use (com vs ent) and the modules installed (sale, stock, event_sale).

**Fix 1**

The "Description" field is updated by a onchange while saving the record.

**Fix 2**

The `sale_stock` module  adds a new step to click "ok" on the warning modal
shown when saling a product without enough of that product on hand. The added
step was added to test_01 (that doesn't show the modal) instead of test_02.

**Fix 3**

There is a difference between the price of the SO between community and
enterprise.

**Fix 4**

The event_sale module changes the form view thus need to perform more steps
to create a record.

opw-1912266

closes odoo/odoo#29679
2019-01-04 10:10:43 +00:00
Nicolas Martinelli 6da2e23e65 [FIX] hr_attendance: kiosk keep alive
When running in kiosk mode, it is necessary to refresh the interface
once a week since the session is garbage collected.

The garbage collection method `session_gc` relies on the last
modification time of the session file. However, the session file is only
saved when the field key `should_save` of the session request is `True`.
This happens when the session is `modified`, i.e. an item on the cookie
is set.

In practice, the session is saved at each reload of the page. Regular
RPC calls, such as the one used in commit 6e1b660f9c, do not
trigger a modification of the session file. Therefore, we create a new
route which explicitly sets the session as `modified`, which ultimately
triggers a `save` in `get_response`.

opw-1917254

closes odoo/odoo#29919
2019-01-04 09:56:55 +00:00
Nicolas Lempereur 27a084eb81 [FIX] web: attach document fix click on firefox
As of saas-11.3 there is a "Attach document" widget that is meant to
more easily add attachment.

But on firefox the click event is coming from the button, where on other
browsers it was possibly from a child element.

So the code expecting the child element did not work on firefox.

opw-1920842
closes #29903
2019-01-03 17:00:18 +00:00
Christophe Simonis d96c42ea88 [MERGE] forward port branch 11.0 up to 22637aadec 2019-01-03 15:31:05 +01:00
Raphael Collet a07a076c45 [FIX] models: avoid prefetch hell when reading fields
The method `read()` may be very slow when reading relational fields and
computed fields, because the computed fields can be computed on a recordset
that is larger than expected.

The issue occurs on model 'res.partner' when reading fields 'child_ids' and
'purchase_order_count', for instance.  Suppose we read those two fields on a
partner with 1000 contacts.  First, the one2many field is read from the
database and stored to the cache; the latter adds the value ids to the
prefetching of 'res.partner'.  Then, the fields are fetched from the cache.
When 'purchase_order_count' is accessed on the partner, the field is computed
on all its children as well...

closes odoo/odoo#29867
2019-01-03 12:45:48 +00:00
Jorge Pinna Puissant 8ac1cdde2e [FIX] web_planner: prepare_backend_url give a bad URL
opw-1920590

Before this commit, the function prepare_backend_url forced in the url
the view_type 'form'. This occurs because a misunderstand between the
fields ir.actions.act_window.view_type (That indicate if an hierarchy
in the view list exists, with as possible values : form and tree, which
can be mistaken as views types) and ir.actions.act_window.view_mode
(which is a list of allowed views).

Now, if not ask otherwise, the function give the url of the first
(the default) allowed view; or one of the allowed view if asked for it.

closes odoo/odoo#29882
2019-01-03 11:16:30 +00:00
Odoo Translation Bot d331d28fdf [I18N] Update translation terms from Transifex 2019-01-06 03:24:31 +01:00
Robot Odoo 5aa16e4507 [IMP] l10n_be_hr_payroll: Update salary rules up to 2019
Update withholding taxes and child allowances for the new fiscal year.

Documentation: https://finances.belgium.be/fr/entreprises/personnel_et_remuneration/precompte_professionnel/calcul

closes odoo/odoo#29931
2019-01-04 15:05:11 +01:00
Yannick Tivisse 3569d053d3 [IMP] l10n_be_hr_payroll: Update witholding taxes reductions up to 2019 2019-01-04 12:37:01 +01:00
Yannick Tivisse 551bffd3a1 [IMP] l10n_be_hr_payroll: Update 'bonus à l'emploi' up to 2019
Documentation: https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/instructions/deductions/workers_reductions/workbonus.html
2019-01-04 12:37:01 +01:00
Yannick Tivisse a6ba0b6678 [FIX] l10n_be_hr_payroll: Remove wrong rule
This rule is not correct, and shouldn't be applied here.
2019-01-04 12:37:01 +01:00
Yannick Tivisse f543cb2b18 [IMP] l10n_be_hr_payroll: Update salary rules up to 2019
Update withholding taxes and child allowances for the new fiscal year.

Documentation: https://finances.belgium.be/fr/entreprises/personnel_et_remuneration/precompte_professionnel/calcul
2019-01-04 12:37:01 +01:00
David Tran 1377c45f4d [FIX] sale: allow execution on multiple records
avoid singleton error when self contains multiple orders

closes odoo/odoo#29922
2019-01-04 10:47:17 +00:00
Martin Trigaux 838c9e5617 [I18N] export 11.0 source terms
To integrate recent content changes and benefit from cd4080839f and 7f8631a91

closes odoo/odoo#29933
2019-01-04 10:13:05 +00:00
Nicolas Lempereur 3125d20da3 [FIX] web: X2Many read propagates field context
Most operations on X2Many widget possibly propagates a field context
(name_create, name_search, ...) but the original read or read on an
onchange does not.

With this changeset, the field context is also used in these instances.

The assertions added in the added test failed with:
  expected: ["world"], result: [undefined]
  expected: ["world","world"], result: [undefined,undefined]

fixes #29203
opw-1914466
closes #29866
2019-01-04 09:44:49 +00:00
Nicolas Martinelli 04369bab39 [FIX] rating_project: pop group_by
- Go to 'Project'
- Group by 'Manager'
- Click on the rating

A traceback occurs.

This is because the grouping field `user_id` does not exist in the
target model.

Fixes #26060
opw-1920979

closes odoo/odoo#29900
2019-01-03 16:04:50 +00:00