Commit Graph
126256 Commits
Author SHA1 Message Date
jbm-odoo ec07e72845 [IMP] base,*: Reorganize access rights groups
Purpose
=======

Access group terminology is missleading. Yous have to be manager to administrate
an application. This task consists to rename groups to be understandable for everyone.

Groups should be reorganised on the users form to be more explicit.

Specification
=============

1/ Rename 'Manager' to 'Administrator' in users groups.
2/ Define a hierarchy on access groups by using the category_id in the manifests
   A category 'Operations/Project' will create a category Project with a parent
   category 'Operations', and something smart is already developed (in modules/db.py)
   to avoid duplicating categories.
3/ Add a group in expenses to be able to approve expenses reports for my team.
4/ Add a group in timesheets to be able to approve timesheets for my team.
5/ Remove partially the useless crap in ir_module_category_data.xml
6/ Sort access rights groups on users form according to its parent category

closes odoo/odoo#29362

Signed-off-by: "Yannick Tivisse (yti)" <yti@odoo.com>
2019-03-05 09:08:12 +00:00
Gert Pellin c0222efd13 [IMP] point_of_sale: warn when session too long
Log a next activity on the PoS.Session if open since more than a week
(responsible = pos user)
"Your PoS Session is open since xx/xx/xx, we advise you to close it and
to create a new one."

closes odoo/odoo#29234
2019-02-22 13:22:15 +00:00
William Henrotin b21aee4b88 [FIX] stock: location domain on reordering rules
The model reordering rules (stock.warehous.orderpoint) has two fields
waherouse_id and location_id. This commit will restrict the domain on
location_id depending on the warehouse set. The user can now choose only
locations child of the warehouse view location or location with no warehouse parent.

Task : 1933828

closes odoo/odoo#30760

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-02-27 11:34:17 +00:00
Geoffroy Larue 496d7fad74 [IMP] project: edit project form small reorg
Add a new group in the settings page, allowing to put some others
settings on the right side of the page (needed in enterprise).

Task-1942377 Closes #31212
2019-02-19 09:11:45 +00:00
Christophe Matthieu f1a5f2d3a4 [FIX] web_editor: clean or hide image handle data according to image size
closes odoo/odoo#31183
2019-02-19 09:37:25 +00:00
Christophe Matthieu 658be774fe [FIX] website: avoid double start edition
issue: 'enable_editor' and click on 'edit' before loading edition, or
double click on 'edit'
2019-02-19 08:43:51 +00:00
Christophe Matthieu a9f5d4fd9f [FIX] website: hide edit menu when the user click on save an wait reload 2019-02-19 08:43:51 +00:00
Christophe Matthieu e31b4050f0 [FIX] website: remove 'enable_editor' from the URL before edition 2019-02-19 08:43:51 +00:00
Christophe Matthieu e2f7b588e6 [FIX] web_editor: use website color for popover edition 2019-02-19 08:43:51 +00:00
Christophe Matthieu 4630afb671 [FIX] web_editor: speeder edition of field char on website_blog
Before this fix, the customize button was updated with each character,
which slowed down the fast insertion of characters and used resources
unnecessarily.
2019-02-19 08:43:51 +00:00
Hugo Adan f7fc5bc0d5 [FIX] account: Fix forward-port of ec25b9d
since the fix of the forward-port has missed checking the chart template
too
https://github.com/odoo/odoo/commit/2bba89c4ad5d393a15e02f0b7435ea7c63935bb0

Check the chart template is required because company could have a chart
template and any record at  ['account.move.line', 'account.invoice',
'account.payment', 'account.bank.statement'] models

closes odoo/odoo#31218
2019-02-18 20:18:56 +00:00
Romain Derie edce2fd6d0 [FIX] website: keep only specific views on _views_get recursive calls
Before this commit:
If a view A was doing a t-call on a view B and view B had view C as child.
And view A had view D as child.
And view D also t-call view B (that as mentionned above has view C as child).
And view D was inactive.

Then COWing C to set it as inactive would make `get_related_views()` on A to
return both generic active C and COW inactive C.

This rare case appeared for customize option that were enabled by default, like
wishlist, compare..

Disabling this customize option would show both the generic customize view and
the COW customize view.
Resulting in the customize toggle being shown twice, one enabled and one
disabled.

Detailed explanation:
1. `website_sale.products` would call `_views_get()` with `options=True` for its
   t-call node `website_sale.products_item`, returning the full view tree,
   including COW wishlist.
2. `website_sale.products` would then call `_views_get()` on its child views
   with `options=extension.active`.
   It is the case for `website_sale.products_list_view`, which also has a
   t-call node `website_sale.products_item`.
   It would then perform the same `views_get()` as in step 1. but with
   `options` set to the view active state, in this case False.
   At that point, the `_view_get_inherited_children` method would filter by
   active before filter_duplicate, leaving the generic view over the specific
   one as it should.

closes odoo/odoo#31286
2019-02-20 14:31:02 +00:00
Christophe Simonis f6540c26ff [FIX] stock: correctly correct report view 2019-02-20 18:59:46 +01:00
Christophe Simonis d98bf74579 [FIX] stock: correct report view
Oversight of previous forward-port
2019-02-20 18:31:04 +01:00
Christophe Simonis 7dcbd15278 [FIX] base_import_module: typo in view declaration 2019-02-20 18:25:52 +01:00
Christophe Simonis db1c7765cb [MERGE] forward port branch saas-11.3 up to 2c495502aa 2019-02-20 17:37:22 +01:00
Nicolas Martinelli 7151f98358 [FIX] base: _name_search of state
When creating a new customer, the selection list for the state is empty
unless the country is filled in.

This is an issue since users usually fill the address fields in the
sequential order: street, city, state, zip and then country. Since no
state proposal is displayed, users tend to create a new state.

Introduced in 5fcf891e07.

opw-1941579

closes odoo/odoo#31273
2019-02-20 10:41:09 +00:00
Pierre Masereel 7d24d77511 [FIX] sale_stock: display picking in portal
When a picking is linked to a sale order, it is not displayed anymore
ont the user portal.

This comes from a fix in rev: https://github.com/odoo/odoo/commit/7825d008279702b3a5017196aa0345a0e48810c9
that hides the shipping_adress div, which is the one targeted by the
xpath for shoing picking. To fix this behavior, we changed the xpath.

TASK-ID: 1939813

closes odoo/odoo#31267
2019-02-20 09:47:21 +00:00
Nicolas Lempereur d2b55ab607 [FIX] sale_quotation_builder: warn edit product description
On the quote builder, we have a description per product that is either:

- the description of the product on the quotation template
- the quote_description of the product

and if it is empty we can edit it on the quote builder.

But if we have several of them, we only see several empty editing blocks
without knowing which product it refers to: thus if we removed the line
it could have adverse effects by removing something not related.

With this change, there is an alert when editing that explain each
line description being.

opw-1943009
closes #31263
2019-02-20 07:53:13 +00:00
Nicolas Lempereur e8cb9c0e45 [FIX] base: better branding with view inheritance
To edit a view on the website, we use the branding mechanism.

This mechanism adds informations to node which can be edited about how
or where the change should be saved, for example:

```
  <template id="a">
    <div><b>hello</b></div>
  </template>
```

might be rendered to someone that can edit it:

  `<div data-oe-model="ir.ui.view" data-oe-id="5" data-oe-field="arch"
     data-oe-xpath="/div[1]"><b>hello</b></div>`

when something is changed: we will send the modified content, the view
id (eg. 5 for view `a`) and the xpath in this view of what is replaced.

If a view is overridden, there is mechanism to distribute the branding
to children, for example:

```
  <template id="b">
    <div>
      <b>hello</b>
    <div>
  </template>
  <template inherit_id="b">
    <div position="inside">
      <b>world</b>
    </div>
  </template>
```

The branding can't be on the parent div that will contain other content,
because the other content is in another template and should not be saved
in template `b`, so this would be rendered like this:

  `<div><b data-oe-model="ir.ui.view" data-oe-id="6" data-oe-field="arch"
    data-oe-xpath="/div[1]/b[1]">hello</b><b data-oe-model="ir.ui.view"
    data-oe-id="7" data-oe-field="arch" data-oe-xpath="/div[1]/b[1]"><b>
    world</b></div>`

This changeset fixes two issues:

- if we have a primary inheriting view: the xpath are wrong in the
  primary inheriting view part, they are computed on the view applied on
  its inherit_id; the part of the inherit_id view have the primary
  inheriting view ID instead of inherit_id view id.

- if we have `<div t-call="..."/>` in a view, the branding of view
  should be distributed to children and not affect t-call part: this was
  done for `<t t-call="..."/>` but not for `<anyothertag t-call/>`.

The added test failed on all assertions before the change:

- "test_branding_primary_inherit" would not distributed
- "test_call_no_branding" would distribute branding on `t-call`

opw-1937757
closes #31039
2019-02-20 12:05:05 +00:00
Olivier Dony 3e5ab60cf2 [FIX] web: avoid long menu dropdown overflow
The Actions/Print dropdowns may overflow the screen in case of very long
lists of menu entries, when based solely on the default BS4 styles for
`dropdown-menu`.

The `o_dropdown_menu` class forces a vertical limit and a scrollbar when
this happens, and should be applied to those control-panel dropdowns to
prevent this UI glitch.

See also 1c1c0897e8 which adapted
dropdowns to BS4.

closes odoo/odoo#31251
2019-02-19 14:56:11 +00:00
Lucas Lefèvre 2be9d73f64 [FIX] hr_payroll: Use jquery API to generate benefit buttons
Use the proper jquery API instead of handcrafting dom elements.

closes odoo/odoo#31091
2019-02-18 15:28:15 +00:00
Yannick Tivisse ac1ec35af0 [FIX] hr_payroll: Convert a method into a helper function 2019-02-18 15:28:15 +00:00
Yannick Tivisse 8fa8ffdf27 [FIX] hr: Add a multi company ir.rule on hr.employee model 2019-02-18 15:28:15 +00:00
Yannick Tivisse 980cbb2516 [FIX] hr_payroll: Refine access to benefit types for officers/managers 2019-02-18 15:28:15 +00:00
Yannick Tivisse 4cb33cee16 [FIX] hr_payroll: Allow Leaves Officers to validate/refuse leaves
Currently payroll officers access rights are required to validate/refuse leaves.

Fix this undesired behavior.
2019-02-18 15:28:15 +00:00
Lucas Lefèvre 40436f5f67 [FIX] hr_payroll: use js framework datetime_to_str 2019-02-18 15:28:15 +00:00
Lucas Lefèvre c02222085b [FIX] hr_payroll: clean datetime parsing and formatting
Use ORM Datetime and Date methods instead of `strftime`
and `strptime`.
2019-02-18 15:28:15 +00:00
Yannick Tivisse 624a1fc56b [FIX] resource: Make get_leave_days_data private 2019-02-18 15:28:15 +00:00
Yannick Tivisse 9cbc68b8ab [FIX] resource: Make get_work_days_data private 2019-02-18 15:28:15 +00:00
Yannick Tivisse 8a9c9bb10f [FIX] hr_payroll: Remove duplicated import 2019-02-18 15:28:15 +00:00
Yannick Tivisse 8b2cd25878 [FIX] hr_payroll: Use ref only once in a for loop 2019-02-18 15:28:15 +00:00
Yannick Tivisse 219c19f5f7 [FIX] hr_payroll: Batch some calls to create and methods 2019-02-18 15:28:15 +00:00
Yannick Tivisse 507e098d5a [FIX] hr_payroll: Unlink all benefits at once
unlink() invalidates the whole cache, it's an anti-pattern
to use it in a loop! Accumulate the records to unlink and
do it at the very end.
2019-02-18 15:28:15 +00:00
Yannick Tivisse cffe008351 [FIX] hr_payroll: Make method api.model 2019-02-18 15:28:15 +00:00
Yannick Tivisse 1f39611fcc [FIX] hr_payroll: Generate all benefits at once without SQL
It's easier, shorter, more logical to verify that a conflict will happen,
rather than combining multiple hacks to hide errors.

On the other hand, the method will now be called only once when generating
benefits on leaves/attendances for several employees
2019-02-18 15:28:15 +00:00
Yannick Tivisse 4ea60907f1 [FIX] hr_payroll: Fix linting issues 2019-02-18 15:28:15 +00:00
Yannick Tivisse 2a4b883b17 [FIX] hr_payroll: Make some methods private 2019-02-18 15:28:15 +00:00
Yannick Tivisse 3af4e24721 [FIX] hr_payroll: Replace constraints methods by sql constraints
It's a one-liner instead of 6 lines of Python with extra ORM overhead
2019-02-18 15:28:15 +00:00
Julien (juc) Castiaux 6b7f1ef091 [FIX] digest: remove unnecessary context
The `company` context is explicitly set by `action_send` while the
template previewer doesn't set it. This inconsistency leads to
error when previewing the digest template.

opw-1939007

closes odoo/odoo#31195
2019-02-18 14:42:32 +00:00
Alexandre Kühn e3714eeea6 [FIX] im_livechat: instantly receive messages from new livechat
Before this commit, when new messages were posted in a new
livechat, the operator received them after a delay. This
may take up to a minute before receiving the notification.

This behaviour was causing a bigger issue: those notifications
may never be received by the operator. This case happened when
the operator was receiving more recent notifications while
notifications from new livechats were pending.

The delay was caused by the operator not yet subscribed to
notifications on the newly created livechat. It is only on
the next poll of longpolling that the subscription occurred,
then followed by dispatching the notifications to the operator.

This commit fixes the issue by dispatching new messages of new
livechats directly to the operator. This is done by enforcing
the operator to make another polling when a new livechat is created,
so that he is always subscribed to those livechats. As a result,
new messages are received instantaneously.

opw-1933951

closes odoo/odoo#31199
2019-02-18 13:16:04 +00:00
Christophe Matthieu 6739a5c1d4 [FIX] website: don't not edit not editable contents or branded hr, br... 2019-02-18 09:45:38 +00:00
mgh-odoo 9b169f8805 [IMP] mail : autofocus items in autocomplete inputs
With this commit, when using autocomplete inputs in Discuss
or chat windows, the 1st item is automatically auto-focused.

Example of autocomplete inputs:
- Discuss: "Add or join a channel" in sidebar
- Chat window: when clicking on "New Message" from systray
    messaging menu.

As a result, we can use keyboard keys to navigate and select
the desired item.

Task-ID 1894447

closes odoo/odoo#30207
2019-02-19 09:56:26 +00:00
Vandan Shah 3cbae36557 [IMP] *: Add progress bar on kanban views based on activities
Purpose
=======

If the activities are available on a model (i.e. inherits mail.activity.mixin),
add a progress bar based on the activities if nothing is defined yet.

closes odoo/odoo#24777
2019-02-19 11:01:40 +00:00
Vandan Shah a44e4ac6c4 [IMP] web: improve kanban tooltip
1) Remove the total record tooltip from kanban group.
2) Remove progressbar help from kanban view.
3) Improvements in testcase since we have removed total record tooltip.
2019-02-19 11:01:40 +00:00
Nicolas Lempereur 5062a26d18 [FIX] website_crm_partner_assign: deadline->expected closing
In the backend interface, lead/opportunity date_deadline is named
"Expected Closing" or sometime "Expected Closing Date" but on the
frontend it was named "Deadline" for opportunity.

opw-1941273
closes #31244
2019-02-19 12:19:31 +00:00
Christophe Matthieu 859ce50903 [FIX] web_editor: clean or hide image handle data according to image size
closes odoo/odoo#31183
2019-02-19 09:37:25 +00:00
Christophe Matthieu 41b470456c [FIX] website: avoid double start edition
issue: 'enable_editor' and click on 'edit' before loading edition, or
double click on 'edit'
2019-02-19 08:43:51 +00:00
Christophe Matthieu 9fff365d4a [FIX] website: hide edit menu when the user click on save an wait reload 2019-02-19 08:43:51 +00:00
Christophe Matthieu e3ad11d972 [FIX] website: remove 'enable_editor' from the URL before edition 2019-02-19 08:43:51 +00:00