Commit Graph
117975 Commits
Author SHA1 Message Date
Vincent Schippefilt a4d00a56b6 [IMP] web: auto-assign and show access keys on ALT
This commits aims at adding an accesskey (a shortcut) to all buttons
in odoo. This is done by either by assigning an accesskey in the view
XML or by automatically assigning a key to the buttons using the first
available (not yet assigned as a shortcut key) letter of the text of the
button, failing that we use the latin alphabetical order to find the
first unused key.

Included in this commit:
    1. Using the ALT key, automatically assign
    2. When the ALT key is pressed, show the assigned shortcuts
    3. Assign a number to the menu items (enterprise)
    4. Activate number accesskeys without using SHIFT
    5. Extra logic to support the activation of the alphabetical
        accesskeys without needing to add the SHIFT key in the key
        combination (except for Firefox on linux)
    6. Assign a fixed accesskey to the search field

Not done:
    1. Executing the primary action on dialogs using SHIFT+ENTER
    2. Show the input using TAB on the appswitcher screen

Things to consider:
    1. Fixing more access keys on forms that share the same features
        (b.e. Validate in customer invoice and vendor bills)
    2. Not assigning keys to the chatter section
2018-04-10 09:39:08 +02:00
Vincent Schippefilt 02a063fd73 [IMP] web: keyboard navigation in form view
The goal of this commit is to allow fast entry of the same model using
the keyboard for navigating through the form once, by blocking the user
from advancing in the form if there is a required field or once they
went through the form once to get them to a primary action (button)

This commit includes the following changes
    1) Enable moving forward from field to field using the TAB key
    2) Entering the one to many and many to many using the TAB key
        a. When entering it, set the focus on the "add new line" link or
            button
		b. When adding a new line, set the focus on the field visible
            editable field of the new line
        c. Discard adding a new line with ESC key
        d. If the user leaves the first field empty and uses TAB, we
            will cancel the adding of a new line and move to the next
            field of the form
    3) When a field is required and not filled in, do not allow the user
        to move out of the field using the TAB key (the user is still
        allowed to use the mouse though), mark the field as invalid
        instead
    4) After going though the form once, using the TAB key on the last
        field will move the focus to the first primary button of the page
    5) When the focus is on a primary button (EDIT/SAVE), the user cannot
        move the focus forward using the TAB key. Hitting TAB again will
        display a tooltip telling to hit ENTER to activate the button.
        The mouse is still available to move the focus.
    6) When the user saves, the focus is placed on the first primary
        button of the form renderer (like VALIDATE for a new invoice)
    7) On dialogs, primary buttons should stop the users from moving out
        of them, and showing a popup if the user tries
    8) When closing a dialog, the focus will be moved back to the widget
        that opened it.

This commit does not include the following features
    1) Navigation with the keyboard on a selection one to man
    2) Navigate between tabs in a form using the keyboard
    3) Cancelling the adding of a new line in a many to many using the
        ESC key do not set the focus correctly
    4) Enhancing the focusses fields (like blue underline)
2018-04-10 09:39:08 +02:00
Christophe Monniez 4ba6d2a405 [IMP] tests: make phantomjs work on Windows
Since Python 3.2, close_fds parameter is True by default on POSIX
platforms. On Windows, it's set to False when one of the standard descriptors
is set.

This commit will give the opportunity to run phantom js tests on
Windows.
2018-04-10 09:32:30 +02:00
len-odoo eca99f1f12 [FIX] point_of_sale: fix quantity rounding
When the user set a decimal accuracy on the product quantity, the point_of_sale
(POS) frontend would display the correct rounding of the quantity according to
both the decimal accuracy and the rounding set on the unit of measure.
However the quantity used to compute the price was only using the rouding on the
unit of measure. This led to an inconsistency in what is encoded in the backend,
and thus made it impossible to close the session as the price paid by customers
did not match what is encoded.

The problem comes from the fact that there is a variable this.quantity and
another one to display this.quantityStr. Unsurprisingly, this.quantityStr
was not computed directly from this.quantity, leading to the inconsistency.

opw 1826092
2018-04-10 09:32:05 +02:00
Prakash Prajapati 3ae9dde258 [IMP] mrp: new filters on products
There was a filter 'Bom Components', that didn't filter anything. So we
make it work to show the products/product templates that are used as
components in BOM.

We've also added a filter 'Manufactured Products' that show the
products/product templates that have at least one BOM

TASK-54350
2018-04-10 09:00:17 +02:00
Prakash Prajapati f483d6cc87 [IMP] mrp: rename workorder views
Some of the workorder views had 'workcenter' in their name instead of
'workorder', so we changed them to be consistent with the models.

TASK-54350
2018-04-10 09:00:17 +02:00
Hiral Bhavsar 5cafed7fab [IMP] website_forum: better management of archived forum
Before this commit, badge, user,... was available when a forum is archived.

Now we display a msg to explain to the user that the forum has been archived.

Related to task-33955
2018-04-09 21:57:43 +02:00
Jeremy Kersten bae90d81df [IMP] website_forum: fix some plurialize translation 2018-04-09 21:28:00 +02:00
Jeremy Kersten fedff9b650 [IMP] website_sale: checkout - small changes from PO review
Rename zoom option
Now, enable Automatic Zoom without zoom will work.
Merge 2 zooms into same separator.
Add / Remove margin-padding...
2018-04-09 21:28:00 +02:00
Thibault Delavallée f86f8e488e [FIX] hr_holidays: wrong inheritance and security issue
Commit 565ab7a2e4 added a bypass to message subscription because some auto
subscription is done without the right to edit the record. However there
are two issues with this commit

 * message_subscribe API changed and code tried to pass now removed parameters;
 * sudo-ing without checking any access rights before is a security issue;

This commit fixes the call and add an access right on read. As few people
(mostly HR officers and managers) can read a leave request it solves the
issue of auto subscription while a better solution is found.
2018-04-09 18:19:54 +02:00
RomainLibert 565ab7a2e4 [FIX] hr_holidays: allow edition of validated leaves
Due to a record rule, it is not possible to add a follower to a
validated leave, as we should be able to do it, we subscribe through
sudo.
2018-04-09 17:50:59 +02:00
RomainLibert c1530f219b [IMP] hr_holidays: improves access rights of manager/officer
We need to have a clear distinction between holidays managers and
holidays officers.
For this a number of improvements have been done in hr_holidays.
For more informations about the changes see the docstrings of hr.leave
and hr.leave.allocation.

Task #34222
Closes #19270
2018-04-09 17:49:51 +02:00
Andreas Perhab b856561f89 [FIX] doc: json rpc example
Could crash if note was note installed.
Add example of parameters to connect to the database

Closes #24085
2018-04-09 17:31:19 +02:00
Thibault Delavallée 4403e6999f [IMP] test_mail: set a margin on some mail-related performance tests
Query count for some mail tests is not always the same for a given test.
This leads notably to runbot being randomly red although there is no real
error. This commit lessen the issue of having red runbot or wrongly
incremented tests by using the recently-introduced margin parameter on
performance tests.

Some work is still ongoing to find why some tests are not completely
reproducible. In the meantime let us have some warnings instead of errors.

Manual forward-port and improvement of 81a0852077.
2018-04-09 17:28:03 +02:00
Thibault Delavallée a03f8da8e4 [IMP] tests: allow to add a margin on performance tests
Purpose of this commit is to avoid errors for some performance tests that
have a slightly variable number of queries. Indeed some tests in test_mail
module vary of 1 or 2 queries due to a behavior still not found that does
not seem deterministic.

This should not be considered as a real error, but should not be considered
as completely valid. This is why a margin is accepted in some tests that
will raise a warning instead of an error. This warning tells people to
check if they have increased the query counter or if it is due to a random
effect in query count.

This is a manual forward-port of saas-11.2 commit 3fe0ee5ae6 .
2018-04-09 17:28:03 +02:00
Martin Trigaux 75f8eef26d [FIX] doc: correct reference to backend documentation
Avoids warning
2018-04-09 17:26:05 +02:00
XavierDo 6c381a3a16 [IMP] im_livechat, mail: replace emoji with unicode.
Remove the support to replace emojis by images. Most browser
now support colored emoji or at least black and white emojis.
The emojis list have been updated to ensure a correct support
for most os/browser.
Users have the possibility to install fonts localy if their os does not
have one of the default emoji font installed.
After default os emoji font, one of twemoji, emojione or noto color
will be selected.
The emoji list is now hardcoded in js in order to reduce the number of
records in shortcodes.

Also include a small fix for livechat to display message field when rating
is bad.

Task #36898
PR #23689
2018-04-09 17:19:29 +02:00
Takuya Sawada d8b99b83f8 [FIX] sale: use proforma group
To hide the pro-forma report from the sale order

Closes #24066
2018-04-09 17:17:14 +02:00
Takuya Sawada 9f6180865f [CLA] eternalharvest signs Odoo CLA
Done at #24066
2018-04-09 17:17:14 +02:00
jem-odoo 9b92732570 [FIX] hr_timesheet: changing project resets the employee
The preprocess method checked if the project_id value
was given to determine if it was a timesheet or a normal
analytic line (since a timesheet is an AAL with project_id).
The problem came in the write, when changing only the project
value, the preprocess use the timesheet case, but since the
employee field was not changed, no value was passed, and it
compute the default one. So changing the project of an existing
timesheet reset the employee to the current one.
2018-04-09 16:52:22 +02:00
Thibault Delavallée 81a0852077 [IMP] test_mail: set a margin on some mail-related performance tests
Query count for some mail tests is not always the same for a given test.
This leads notably to runbot being randomly red although there is no real
error. This commit lessen the issue of having red runbot or wrongly
incremented tests by using the recently-introduced margin parameter on
performance tests.

Some work is still ongoing to find why some tests are not completely
reproducible. In the meantime let us have some warnings instead of errors.
2018-04-09 16:52:12 +02:00
Thibault Delavallée 3fe0ee5ae6 [IMP] tests: allow to add a margin on performance tests
Purpose of this commit is to avoid errors for some performance tests that
have a slightly variable number of queries. Indeed some tests in test_mail
module vary of 1 or 2 queries due to a behavior still not found that does
not seem deterministic.

This should not be considered as a real error, but should not be considered
as completely valid. This is why a margin is accepted in some tests that
will raise a warning instead of an error. This warning tells people to
check if they have increased the query counter or if it is due to a random
effect in query count.
2018-04-09 16:52:12 +02:00
Thibault Delavallée 3bb498d696 [REVERT] "[IMP] core: tolerate a 10% deviation for number of queries"
This reverts commit d565596868. Indeed whole purpose of having tests
based on query counters is to fail every time query count is greater than
expected. Query count could be greater than expected because
 * either it is required by a bug fix or a feature and tests should be
   updated accordingly in the same commit;
 * either implementation can be improved to avoid or lessen query count
   impact and code should be updated accordingly;
 * either we have some random queries due to nondeterministic behavior;

It seems purpose of the commit was to solve the third case. However we think
hiding first two cases can be dangerous compared to solving third case.
Moreover having a threshold of 10% does not make sense. It means some complex
test case could take 30 queries more without being noticed. Some tests could
fail after several commits adding queries and finding them afterwards could
be complicated.

Another solution based on flagging some tests that have a small random
behavior will come soon.
2018-04-09 16:52:12 +02:00
Jeremy Kersten 8decf4c956 [FIX] website_sale: multi-image - enable first image in carousel
Before this commit, the first thumbnail from the multi image carousel was
always disabled since there are no atribute data-slide-to.

Now we force a '0' string instead of 0 falsy value to have explicitely
data-slide-to="0" after the qweb rendering.
2018-04-09 15:57:24 +02:00
Sanjay Jamod bd9398e24b [IMP] mrp_bom_cost: Improve layout
remove shift between set price and bom cost

task-39561
2018-04-09 15:39:19 +02:00
Sanjay Jamod ca45e889a3 [IMP] product: Standard Price on product list view
task-39561
2018-04-09 15:39:19 +02:00
Sanjay Jamod 030f454fab [FIX] mrp: Display correct BoM count on state button
- Display correct bom count for product, before this commit it was
 not displaying the bom count when we have bom for template without variant.

task-39561
2018-04-09 15:39:19 +02:00
Sanjay Jamod 49af604c20 [IMP] mrp_bom_cost: TestCase for Compute Price from BoM
- Tested the flow and verify computation made in hierarchical order
- Tested with different Unit of Measurements
- Tested with 3 level of componets and sub-componets
- Tested with Work Operations
- Tested with Inventory Valuation

task-39561
2018-04-09 15:39:19 +02:00
Sanjay Jamod 87f6c16dcf [IMP] mrp_bom_cost: Compute price from BoM
Purpose
=======
Compute cost of product(s) based on it's BoM

Specification
=============
real_time: not with FIFO otherwise open the
wizard with the bom price as default new value

periodic: directly set the cost on the form view

Add a server action in order to directly set the price
on selected product.
When getting price from a bom with a sub-bom it will take the
cost of the sub bom except if the sub-bom is set with the bom
itself in the server action (in this case the sub bom cost will
be used).

Capacity is not used for this functionality

task-39561
2018-04-09 15:39:19 +02:00
Sanjay Jamod 8f268469d5 [IMP] product_extended: Rename module product_extended -> mrp_bom_cost
task-39561
2018-04-09 15:39:19 +02:00
Martin Geubelle 7c936c68f9 [FIX] web: forward-port
The rev. odoo/odoo@6397ce7 has not been correctly foward-ported.
The view option `sidebar` has been renamed `hasSidebar` in odoo/odoo@32b8cec
2018-04-09 15:11:29 +02:00
Thibault Delavallée 82f88bfa71 [MERGE][REF] mail, note: move reminder feature from mail to note
Purpose of this merge is to link reminders to notes. The whole feature is
therefore moved to node module that extends activities and systray.
See sub-commits for more details.

This merge is related to task ID 1833628. Closes #24129.
2018-04-09 15:10:46 +02:00
Akash Bhavsar afacf3a348 [IMP] website_blog: Add category to blog tags, Archives collapsed
This commit allow to sort blog tag by category.

And display archives by default folded to avoid
5 years x 12 months => 65 list items open

Task-34417
2018-04-09 14:57:13 +02:00
Alexandre Kühn d7bc291b6a [FIX] im_livechat: missing resource in external lib
Before this commit, the livechat button was not visible at all.
This is due to missing resources in the external lib of livechat.

Task: 1834875
2018-04-09 14:48:24 +02:00
Goffin Simon ec7f88c334 [FIX] account_asset: Access error with shared product with deferred revenue
Steps to reproduce the bug:
-Let's consider a multicompany environment with company A and B
-Let's consider a shared product P for A and B
-P has a deferred revenue type D set on it
-D is defined in A
-Let's consider a user U in company B
-U creates a SO with P and try to generate the invoice

Bug:

A access error was raised because U is not allowed to see D and
D is needed to genrate the invoice.

opw:1825944
2018-04-09 14:47:31 +02:00
Dharmang Soni 807c4c3f5e [REF] mail, note: move reminder feature from mail to note
This commit refactors f488dc58c3 that added reminder feature in activities.
After merging it was suggested specifications were not correct and it has
been decided to move the whole reminder feature in note.

Reminders are now notes instead of activities. Now when having note appµ
systray proposes to create a note / reminder. A note.note record is created
with info given by the user. If a date is given in the systray quick create
then an activity is scheduled on this note.

This means user can create records in activity systray that are not
activities but notes used as reminders. Those will use the first availableµ
note column for the user.

As reminders are now notes the support of activities not linked to any
document is removed, as well as archiving activities and tests linked to
that behavior.

This commit has been not carefully tested nor in-depth reviewied. It is
considered as too important for the upcoming freeze. This closes task ID
1833628. Closes #24129 . Many thanks to @dpr-odoo for its quick development
and good work on this task.
2018-04-09 14:35:06 +02:00
Goffin Simon 026781ec3e [FIX] account: Validating a statement with old posted moves
When validating a statement with old posted moves, the lock date
was checked by function, _check_lock_date and then it was impossible
to validate the statement even if all the moves were already posted.

Backport of this commit: 86a0d31251

opw:1830804
2018-04-09 14:33:29 +02:00
Dharmang Soni c56491b11b [IMP] note: pimp note form view
Purpose is to maximize size of editor to focus more on the note content
edition.
2018-04-09 14:18:15 +02:00
Dharmang Soni 77822180de [IMP] note: update summary of application
Indeed notes will soon be more about todo-list and reminders.
2018-04-09 14:17:24 +02:00
Dharmang Soni 75dd065eaa [IMP] note: update note default columns
Purpose is to have first column holding all todos and reminders. We then
add a few columns for today / tomorrow / later to help people organize
themselves.
2018-04-09 14:16:50 +02:00
Nicolas Lempereur 90da0f5a64 [FIX] note: css margins of next activity
Fix CSS so it is more in line with other kanban tiles and avoid
unecessary margins.

opw-1817718
closes #24128
2018-04-09 12:07:04 +02:00
Prakash Prajapati 92735de68d [IMP] product: product view change the group string
Rename 'Purchase Bill' into 'Vendor Bills' to be consistent with the
labels of module purchase.

TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati 5b12cac294 [IMP] stock: picking view completion date and filters
- We show the completion date of a picking when it's done
- We add the filter that show canceled picking
- We remove the filter that show confirmed picking as it doesn't exist
  anymore

TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati f6d7b33d50 [IMP] stock: Lot/SN warning message improved
TASK-38741
2018-04-09 11:23:59 +02:00
Pierre Masereel 298327dc53 [IMP] stock: warehouse order point improvement
- Set groups on group by and filters

TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati 9473b94093 [FIX] stock: fixed width for responsible field on batch picking
TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati 9046b9fa55 [IMP] stock_account: No create button in product valuation tree view
TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati ccafe50500 [IMP] product_expiry, stock, delivery: Delivery slip report improvement
- Delivery slip of a picking not done will show the initial demands
- Delivery slip of a picking done will show details of what have been processed
- Remove the shipment backorder message
- Remove the Weight and show the Shipping Weight

TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati 9a65dda391 [IMP] stock: Picking operation report improvements
- Remove the commitment date
- Remove 'Origin' term in picking report
- Add report header below barcode
- Arrange fields space
- Change fields sequence

TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati 4dfea20569 [IMP] purchase: rename labels
TASK-38741
2018-04-09 11:23:59 +02:00