Commit Graph
128290 Commits
Author SHA1 Message Date
Thibault Delavallée 0cc6390db5 [FIX] sms: do not display popover for void notification
PURPOSE

Improve SMS UX integration. Followup of merge 4287481 .

SPECIFICATIONS

Fix recent SMS merge: do not display tooltip / popover about SMS information
in chatter if there was no recipients linked to the SMS message.

LINKS

Task 1922187
2019-07-23 08:29:15 +00:00
Simon Lejeune 7ef11e3c96 [REF] stock_account: valuation layer and not admin user
Carefully sudo when necessary.

task-2034044

closes odoo/odoo#34802

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-23 08:36:31 +00:00
wan f722ef0cb0 [IMP] account, _facturx, l10n[be,it]_edi: remove account.invoice.import.wizard
Since the wizard is not shown anymore (skipped to go right to file selection), we can remove it. Small refactoring had to be done for l10n_it in order to upload files with multiple invoices inside and to detect format

closes odoo/odoo#34145

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-07-19 09:34:59 +00:00
wan 4b66aa58b9 [ADD] account: skip the transient to upload an invoice
Task 2007561
We want to avoid this intermediate screen; Instead, directly open the selection files window...
Done from dashboard button + vendor bill list view & customer invoice list view.
2019-07-19 08:54:03 +00:00
RomainLibert e0b16b22e8 [IMP] hr_holidays: Improve general UX (back2basics)
Purpose
=======

Having a clean policy in leave access right. If there
are some internal need or bugs, read this before decided
if it is an expected brhavior or not. It is what we want
in a standrard point of vew.

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

Access rights Policy
--------------------

Remove Time Off - Team Leader access right

Leave_manager_id is now requried, by default it
is = parent_id for admin it is admin by default (data
employee_admin)

3 access rights:
- Internal User
- Time Off - All Approver
- Time Off - Administrator

3 fields for "manager"
- parent_id
- leave_manager_id
- manager_id on department

Department
Is just there for information. So never use it in
default filters

Rules Policy
------------

Don't forget to take the leave type configuration into
account
* no validation means automatic
* officer validation means you need to be at least
holidays_user to approve
* manager validation means anyone who is at least
leave_manager_id can approve

Internal User
-------------

In double validation mode he:
- can only do the first approval
- can see the everyone's leaves with a anonymisation of
the leave description
- can create a leave (even if leave type is directly approved)
- can refuse its own leaves (till not reported in payslip)
- can reset to draft his own leaves and reconfirm them
- can delete a leave in draft state
- can cancel a leave if the date_start is in the future
- cannot validate its own leaves

If leave type is configured in manager mode, he:
- can approve or refuse the leaves if he is leave_manager_id

If leave type is configured in both mode, he:
- can only do the first approval or refuse for the leave
if he is leave_manager_id

Time Off - All Approver
-----------------------

In double validation mode he:
- can only do the second approval
- can see, write, read all leaves and perform the second
approval.
- Can set a leaves as reported in payslip.
- Cannot validate its own leaves
- cannot configure leave type
- cannot create leaves in batch

Time Off - Administrator
------------------------

In double validation mode he:
- can do all the approvals
- can bypass all leaves (approve or refuse).
- can configure Time Off Types
- can create batch leaves
- can validate its own leaves

Menu
----

- My Time Off (access rights: internal user)
- Dashboard
- Time Off Requests
- Allocation Requests
- My Team (rename into "Everyone", access rights: internal
user. default filters on current year and group by
employee; default view: gantt can switch to list and form)
- Managers
- To Approve (internal user who are leave_manager_id
see and can approve. See only leave he has to approve
(domain))
- Time Off
- Allocation
- All
- Time Off
- Allocation
- Payroll
- Time Off to report.
- Reporting (access right: time off administrator)
- Time Off Analysis
- Report by Department
- Configuration (access right: time off administrator)

Usability
---------

- In all list of "manager menus", add actions to change
status in mass
- In leave type data:
- move Home Working from data to demo data
- There are 2 Paid time off, get rid of the company on
it and share it on all companies (keep only the one
in data)
- Leave type like this:
- Overtime Compensation/compensatory days (keep only
one of both, to avoid having 2 same leaves in
demo data). Validation by: team leader and hr
officer, no validity date
- Paid Time Off 2019. Validation by Team Leader
and Payroll Officer. Remove validity, remove 2019.
- Unpaid. Can be taken in hours. Approved by Payroll
officer and team leader. No allocation needed.
- New leave request: order of leave type in the m2o:
1. leaves where allocation are fixed by rh and remaining
> 0 and allocated > 0
2. leaves where free allocation. Where reaming is > 0
and allocated >0
3. One already taken
4. All other leaves.
- Remove the sequence widget in leave type
- The employee should get a notification when his leave is
refused "Your "leave_type_name_" planned on "start_date"
has been refused"
- from the dashboard calendar, the reset to draft should lead
to edit (avoid user has to click on edit)
- An employee should be notified when a leave is approved
"Your [leave_type_name] on [start date] has been approved"

Leave Dashboard V2
------------------

https://drive.google.com/file/d/1pMCqDlecqM7ngvmhJJdWtkG2_GiXHyIX/view?usp=sharing

Testing
-------

Everything concerning the leave requests has to be tested.
All the access rights have been reviewed and need testing.

Migration
---------

Don't forget to keep the filters in the calendar view (otherwise RIP perfomances and usability)

TaskID: 1950998

closes odoo/odoo#33813

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-23 08:21:55 +00:00
Priyanka Kakadiya 65613f5f83 [REF] account,hr_expense,sale: enforce uom domain
Enforce the domain of the UOM not by an onchange but by a domain.

Example of an issue if the domain is enforced by an onchange:
- create a order
- add an order line
- select the product
- select an uom
> the uom presented are the one from the product category.
-Save
- edit
- select an uom
> all UOM are presented even the ones of other categories

This commit enforce this new logic at most places.

task - 2003959

closes odoo/odoo#33741

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-07-22 08:07:31 +00:00
Pratima GuptaandSébastien Theys b492bde6a1 [IMP] account, portal, web, website: move chatter below invoice
No more modal because it's not visible and less handy. Use same behavior as
sales order portal.

Adapt the invoice style to properly adapt and align with the chatter block.

Part of task-37264

closes odoo/odoo#34360

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>


Co-authored-by: Pratima Gupta <pgu@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2019-07-17 15:53:31 +00:00
Romain Derie 4d942852c8 [FIX] portal: correctly return the document in sudo
Since 1e6c3bec2c that refactored the sudo in general, the
`_document_check_access` method from portal that was supposed to return the
document in sudo mode was not returning the expected record.

It was not with the admin UID, making some code to crash, for instance:
https://github.com/odoo/odoo/blame/120f890ecf57969878399d9543b49080e7618c60/addons/stock/models/stock_quant.py#L252
Which is doing `self.with_user(self._uid).check_access_rights('read')`.

Step to reproduce:
- Install `sale_stock` module.
- Create a quotation for a portal user
- As the portal user, try to sign the quotation
- It will crash on `stock.quant` right access

closes odoo/odoo#35030

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-07-22 09:47:57 +00:00
Romain Derie a55fb7ad0c [FIX] sale: fix race condition on signature tour
Before this commit, the signature tour (130af96dc1) would fail sometimes.
Indeed, the tour is trying to get `Thank You` on the page after the sign step
but since the modal to pay will open on top of the page, the `Thank You` would
not be found.
2019-07-22 09:40:01 +00:00
jbm-odoo 2c558eb652 [IMP] base: Remove translatable field of res.lang
The technical field `translatable` of a res.lang has become useless

closes odoo/odoo#34895

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-07-22 13:46:30 +00:00
Martin Trigaux 5a6a414e2c [MERGE] Forward port of saas-12.4 to master up to aadc4a9f0b 2019-07-22 14:47:52 +02:00
Martin Trigaux aadc4a9f0b [MERGE] Forward port of saas-12.3 to saas-12.4 up to fe4caecb59
closes odoo/odoo#35059

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-22 10:05:49 +00:00
Hetashree Chauhan e532d4df0d [IMP] purchase: make products company consistence.
Purpose of the commit is to let user select only those
products which are being shared among companies or belongs to own company.

On purchase order user will only able to select those products
which are belongs to same company as purchase order or products
which are sharable by default.

task-2025168
closes: #34342

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-07-22 05:17:00 +00:00
Hetashree Chauhan 421b9dfe21 [IMP] delivery, product, sale(_management): make company consistence
Purpose of the commit is to make the multi company consistence with product,
sale order and order template.

So the Common Product Catalog setting is removed from generel settings
because its behavior wasn't really clean from a technical point of view
(disabling the rule on products access) and wouldn't work as well with
new multi-company logic.
The default logic of sharing products will be kept, but when someone
wants to limit products sharing, he will do so product by product, by
setting the company_id.

Also the default company_id on product will be blank so default product
will be a sharable by multi company.
and added company_id on sale templates so user can select his/her own
company or the templates which are common.

task-2025168
Closes: #34342
2019-07-22 05:17:00 +00:00
RomainLibert fe4caecb59 [FIX] web_editor: momentarily comment the assert
Having an assert that randomly breaks is quite annoying, as this assert
is not critical and breaks once every 100 - 120 builds. It can "safely"
be commented out before being fixed

closes odoo/odoo#35043

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-07-19 10:46:48 +00:00
Odoo Translation Bot 9225e2e9f3 [I18N] Update translation terms from Transifex 2019-07-21 06:07:25 +02:00
RomainLibert 1ebec12dc0 [FIX] lunch: use currency_id as default value
The default value for a many2one on res.currency should be a
res.currency object not a res.company one

closes odoo/odoo#35004

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-18 13:17:41 +00:00
Olivier Colson 8cded5022e [FIX] l10n_at: fix tax repartition to keep it consistent with 12.2
There was an error in this tax's repartition. A tag was wrongly added to its base.

closes odoo/odoo#34245

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-07-12 09:36:10 +00:00
Olivier Colson 056a266274 [FIX] l10n_at: make tag names unique in tax report 2019-07-12 09:36:10 +00:00
Gorash 2c27d6c925 [FIX] web_editor: avoid dialog error on email edition
Under certain unknown conditions, the range cannot be applied and
triggered an error. In order to allow the user to keep editing, we need
to prevent the dialog from showing, hence the use of `console.error`.
If this error appears, the carret is moved to the beginning of the focused
node.
If this error appears, then bullet can generate an error (I managed to
have the bug once or simulate it by manually breaking the dom and range)

We suspect a wrong snippet custom javascript code.

see: https://github.com/odoo/odoo/pull/34188

closes odoo/odoo#34871

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-15 09:26:29 +00:00
Gorash 522a0001e7 [FIX] web_editor: can use copy-past as html with only text
Some browser can send text content without tag when past html. To avoid
this error we wrap the content before parse it with jQuery.
2019-07-15 09:26:25 +00:00
Aaron Bohy e0c7c8e288 [FIX] web: execute action from new record and go back
Let's assume a form view with a readonly many2one field with a
default value. When creating a new record, the user can click on
the many2one value, which should open the related record in a form
view (stacked in the breadcrumbs).

Before this rev., this didn't work: we actually came back to the
previous view/action in the breadcrumbs, when trying to open the
related record.

closes odoo/odoo#33172

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-18 09:48:07 +00:00
Jigar Patel f9565d6334 [FIX] web: display groupby buttons only on the first group level
task-1998791

closes odoo/odoo#34007

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-07-18 05:56:51 +00:00
Sapan Zaveri b8cfe33838 [FIX] payment_alipay: fix the broken alipay tests
Backport of https://github.com/odoo/odoo/pull/34132

The test case of alipay payment is going to failed due to:

1) Now the redirect_url from the return_url is removed in commit :
https://github.com/odoo/odoo/commit/0aefe72b773a21bdd38fdc86779d3030bd5127c6
but it's still it's there in test cases so removed from test case.

2) To make the transaction done it must be in  draft, pending or authorised
state but in first test case payment process the transaction state is set to
cancel and in another payment process use the same transaction again to set
it success so before use the same transaction again just set the state to draft.

task- 2005926

closes odoo/odoo#34708

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-07-09 14:36:59 +00:00
Aaron Bohy 0899a5a0d4 [FIX] web: tests: mock scroll in beforeEach
When the 'before' (resp. 'after') hook is defined on a QUnit module,
it is executed once, before (resp. after) the whole module is
executed. When the test suite is executed several times, tests that
failed in the previous execution are always executed first,
separately from the other tests of their module. In that case, the
'before' hook is executed directly (before the execution of the
failed test), but the 'after' hook is only executed once the whole
module has been executed. This means that a lot of other tests,
coming from other modules, can be executed in the meantime.

In calendar tests, we used the 'before' and 'after' hooks to catch
scroll events. So, when a calendar test failed, and the suite was
re-run, some tests depending on the scroll failed.

To prevent this, we use 'beforeEach' and 'afterEach' hooks instead,
as they are executed before and after each test.

closes odoo/odoo#34932

Signed-off-by: Julien Mougenot (JUM) <Arcasias@users.noreply.github.com>
2019-07-17 06:57:24 +00:00
David Beguin 3a804ecac8 [FIX] mail : fix post message callback error
When posting a message (here is the livechat use case),
the _postMessage function can call the callback function.
but this parameter is not mandatory.

If the caller of this function doesn't need a callback function
to be called after execution, the _postMessage function was crashing
as callback is not defined.

This commit fix this _postMessage function by checking that
callback is defined before calliing it.

Pre-required for Task ID: 2028059
Fix Task : 2037048
PR #34917

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-16 13:49:14 +00:00
Robot Odoo 3b223c11fd [MERGE] (event)(_sale)(_product_configurator): clean up
1* Allow products access from product_id / product_template_id of sale.order.line
2* Allow use of optional products along rentals and events.

closes odoo/odoo#34170

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-07-16 17:39:09 +02:00
Martin Trigaux beba36416f [MERGE] Forward port of saas-12.3 to saas-12.4 up to 40421be73c 2019-07-16 16:36:40 +02:00
Martin Trigaux 40421be73c [MERGE] Forward port of saas-12.2 to saas-12.3 up to cf8e74a1a7
closes odoo/odoo#34907

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-16 11:44:38 +00:00
Martin Trigaux cf8e74a1a7 [MERGE] Forward port of 12.0 to saas-12.2 up to 1bd434da34
closes odoo/odoo#34901

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-16 09:14:17 +00:00
Martin Trigaux 1bd434da34 [MERGE] Forward port of saas-11.3 to 12.0 up to d8072d54ac 2019-07-16 09:22:49 +02:00
Lucas Perais (lpe) c8d10d228e [FIX] web: boolean widgets in editable list should activate the row
Put toogle_button or a favorite widget to handle a boolean field in an editable list
click straight up on the widget's button or link

Before this commit, the widget changed its appearence, but the changes were not
propagated to the model. This is because the controller will not force_save if its mode is edit
(to let changes piling up and save everything when clicking save), which is the case
of the editable list

After this commit, following what has been done at 2f5e44d40b
clicking on a widget in an editable list just activates the row for editing
but doesn't change the widget's value

OPW 2033700

closes odoo/odoo#34878

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-07-15 13:53:48 +00:00
Hetal Dhanak 044904b9d5 [FIX] purchase_stock: fix traceback upon changing schedule date
previously, when user tried to change the schedule_date, it
was being passed as a string instead of datetime. corrected
that.

Task-2034542

closes odoo/odoo#34873

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-07-15 13:38:59 +00:00
Martin Trigaux d8072d54ac [MERGE] Forward port of 11.0 to saas-11.3 up to d5dd136ba0
closes odoo/odoo#34872

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 13:32:07 +00:00
Martin Trigaux d5dd136ba0 [MERGE] Forward port of saas-15 to 11.0 up to 1d9f64c91e
closes odoo/odoo#34868

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 11:56:22 +00:00
Xavier-Do dd85e312cd [FIX] core: backport of 62533ec7 and f167ae7d
The ready code warning timeout of 2 seconds can be confusing since
it is triggered just after the 2 seconds. We can log this message
at the end in order to give the real timeout.

In JS tests, when the ready code takes too much time, a warning is
logged. As a consequence, the runbot updates the github status as a
failure, causing real pain to people who simply wants to merge their
features.

With this commit the warning is changed into an info and the runbot will
be happy.

closes odoo/odoo#34865

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-07-15 11:37:14 +00:00
Martin Trigaux 1d9f64c91e [MERGE] Forward port of saas-14 to saas-15 up to 5d4c30cb59 2019-07-15 13:15:12 +02:00
Martin Trigaux 5d4c30cb59 [MERGE] Forward port of 10.0 to saas-14 up to bb712ad701 2019-07-15 13:10:00 +02:00
Aaron Bohy aac3059873 [FIX] web: wrap char fields in list views
This fix is similar as 793933a1, but for char fields. It prevents
cells containing char fields with long value from overflowing.

closes odoo/odoo#34739

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-15 09:45:31 +00:00
Goffin Simon 0e44904267 [FIX] stock: Delivery slip with serial number
Steps to reproduce the bug:
- Select template type boxed in general settings
- Select show serial/lot number in Delivery slip (in inventory - settings)
- Print the delivery slip with a non tacked product

Bug:

The delivery slip report displayed wrong columns.

opw:2031985

closes odoo/odoo#34852

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-15 08:43:59 +00:00
Arnold Moyaux ccbd6712f6 [FIX] mrp: MO change the quantity to 0
Usecase to reproduce:
- Create a MO for 5 final units
- Reserve all the components
- Produce 3 units
- Post Inventory (debug mode)
- Edit/Unlock
- Edit a line to consume to an arbitrary amount of quantity
- Change the product qty and set it to 3.

At this point, the reserved quantity and the quantity to consume
still the same than intialy even if the final quantity was updated.

- Mark as done

Then a move is marked as done withtout quantity done and still have
reserved quantity.

It happens because the _update_raw_move function do nothing if the
new quantity to consume is equals to 0.

The arguments returns in _update_raw_move still exists for override
but are not used by the chang_prod_qty method. It's not possible to
cancel the move and then find its parents in order to log the activity.

opw-2023653

closes odoo/odoo#34471

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-07-15 11:52:47 +00:00
mreficent d9b7cc7ab7 [FIX] purchase: not setting domain is not empty domain
Previous versions of this action had a domain. It was removed at 2d3e6d7383
Set explicitly an empty domain to force the removal when upgrading the module
Similar to 2d03ed43a5

closes odoo/odoo#34581

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 10:02:28 +00:00
Daniel Blanco 0eadcb9c53 [CLA] signature for Blanco Martin & Asociados Signing CLA
closes odoo/odoo#34844

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:30:05 +00:00
Grégory Schreiner 6a2be418f9 [CLA] signature for gregory-moka
closes odoo/odoo#34803

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:48:10 +00:00
bumanit eab60bd2e0 [CLA] Update bumanit CCLA
closes odoo/odoo#34713

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:46:00 +00:00
Nicolas Vannieuwerburgh 43bec98da8 [FIX] hr_timesheet_attendance: Allow update module
In PostgreSQL, we can't CREATE OR REPLACE VIEW if there is the type of the column change.
To fix it, just drop the view before creating it

closes odoo/odoo#34851

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-15 07:04:26 +00:00
Odoo Translation Bot 4fc83f62fa [I18N] Update translation terms from Transifex 2019-07-14 06:08:03 +02:00
Odoo Translation Bot 5306fbb2c5 [I18N] Update translation terms from Transifex 2019-07-14 01:19:24 +02:00
Victor Feyens 3b4547b1cd [IMP] event_sale: clean the description along the product on wizard exit. 2019-07-12 16:14:52 +00:00
Aurélien Warnon a231295c2c [FIX] sale(_product_configurator) : UI 2019-07-12 16:14:52 +00:00