Commit Graph
119814 Commits
Author SHA1 Message Date
Akash Bhavsar 2407b4d457 [IMP] maintenance: added effective date field in equipment & tools
Add effective date on maintenance equipement. The purpose is to define
when the equipment is put into service.
Adapt next preventive maintenance according to effective date

Task id: 33188
2018-08-22 10:48:13 +02:00
Jeremy Kersten 1cfaa12012 [IMP] server: --test-enable support tests directory without import
Before this commit, if import from tests directory was not in the __init__ file,
it was not possible to launch it with --test-file cli.

Now we only check in test directory if file exists.

This commit closes #26500
2018-08-22 10:08:30 +02:00
Jeremy Kersten 2431e2a9ea [FIX] web_editor, website: remove useless code / comment
Rebase failed, these lines should be no more there.
2018-08-22 10:08:30 +02:00
Christophe Monniez 3ff0948b0a [FIX] gamification: compute badge stats wihtout error
Since 960360a, when computing badge stats, a datetime was compared to a
string leading to a traceback.  e.g. when clicking in employess >
badges.

Also, due to a typo, the compute method was assigning the stats result
to the wrong attributes.  e.g. 'stats_my_this_month' instead of
'stat_my_this_month'.

With this commit, the above mentioned issues are fixed and a test is
covering these issues to avoid regression.
2018-08-22 09:28:16 +02:00
Pierre Masereel 0b2d6d7487 [FIX] stock: traceability report link
The links without href attributes, have a different style, so we cannot
differentiate them from non clickable text. So we set the href attribute
and prevent the default behaviour of the link in js.

TASK-ID: 1873101
2018-08-21 22:25:26 +02:00
TWA 326e48a112 [IMP] purchase_stock, sale_stock : Show stat button instead of m2m widget
On stock production lot, we show stat buttons redirecting to purchase
orders and sale orders where the lot has been used instead of showing
Many2many in the form view.

TASK-ID: 1873101
2018-08-21 22:25:26 +02:00
Pierre Masereel c9f899b99a [FIX] mrp: Traceability show MO final product reference
When a final product move line is shown in the traceability report is
displayed, the reference to the MO is not displayed because the finish
products move lines don't have any productio_id on it.

So to fix this we take the production_id of the move_id when it's a
finished product, and the raw_material_production_id of the move_id when
it's a consumed product that are always set.

TASK-ID: 1873101
2018-08-21 22:25:26 +02:00
Pierre Masereel 9524341a81 [IMP] stock: picking and mo traceability improvements
We now only show the move lines that are processed before (in date and
location) when we display the move lines from a picking or a
manuficturing order, before it was showing all move lines that
where processed before (only in date) meaning that if you display a
delivery, you were also seeing the other deliveries done before this
one.

TASK-ID: 1873101
2018-08-21 22:25:26 +02:00
TWA 0cd475124f [IMP] stock,mrp: Enable traceability report for non-tracked products
PURPOSE
=======

Make the traceability report available in more use cases.

SPECIFICATIONS
==============

1. Traceability Button on Manufacturing Orders
There should always be a traceability report available on the MO,
no matter if the finished product is tracked or not.

Example 1 : finished product is not tracked
            but the components are tracked
Example 2 : finished product is not tracked (qty>0)) but
            the components are tracked
Example 3 : no products are tracked

Task id: 1861928
2018-08-21 22:25:25 +02:00
Alexandre Kühn 5999ba86c7 [FIX] mail: "is typing..." notification sticky top for DESC threads
Revision on https://github.com/odoo/odoo/commit/4fa071339a8f381b1336fe326577c9decc04a1e1

There was a typo in the style of the 'is typing...' notification bar,
which resulted in applying the wrong sticky behaviour to ASC and no
sticky behaviour at all for DESC.

This commit applies the correct sticky behaviours to the notification
bar in both configurations:

      ORDER:                   ASC                           DESC

                     +--------[top]--------+        +--------[top]--------+
                     |                     |        |                     |
                     |  (older messages)   |        |  (newer messages)   |
                     |                     |        |                     |
   visible top ----> |- - - - - - - - - - -|        |- - - - - - - - - - -|
                     |                     |        |   X is typing...    |
                     | ...                 |        | ...                 |
                     | message i           |        | message i + 1       |
                     | message i + 1       |        | message i           |
                     | ...                 |        | ...                 |
                     |    X is typing...   |        |                     |
visible bottom ----> |- - - - - - - - - - -|        |- - - - - - - - - - -|
                     |                     |        |                     |
                     |  (newer messages)   |        |  (older messages)   |
                     |                     |        |                     |
                     +------[bottom]-------+        +------[bottom]-------+
2018-08-21 20:14:09 +02:00
XavierDo 7f8ffba48e [FIX] mail: remove bolt on notification request
Since the title of a notification is in a t-esc, the style wont be applied
2018-08-21 17:55:27 +02:00
Alexandre Kühn 4fa071339a [FIX] mail: "is typing..." notification sticky top for DESC threads
Before this commit, the 'is typing...' notification bar was sticky
to the bottom of the thread, independently of the ASC or DESC mode
order of threads.

This is okay for ASC, but not for DESC: it should stick to the
visible top of the thread for DESC.

As a result, this notification bar was always at the top of the
thread, without the 'sticky' behaviour:

        +--------[top]--------+
        |   X is typing...    |
        |                     |
        |  (newer messages)   |
        |                     |
        |- - - - - - - - - - -|   <---- visible top
        |                     |
        | ...                 |
        | message i + 1       |
        | message i           |
        | ...                 |
        |                     |
        |- - - - - - - - - - -|   <---- visible bottom
        |                     |
        |  (older messages)   |
        |                     |
        +------[bottom]-------+

With this commit, the 'is typing...' notification bar sticks
to the visible top of DESC threads:

        +--------[top]--------+
        |                     |
        |  (newer messages)   |
        |                     |
        |- - - - - - - - - - -|   <---- visible top
        |   X is typing...    |
        | ...                 |
        | message i + 1       |
        | message i           |
        | ...                 |
        |                     |
        |- - - - - - - - - - -|   <---- visible bottom
        |                     |
        |  (older messages)   |
        |                     |
        +------[bottom]-------+
2018-08-21 16:57:51 +02:00
Alexandre Kühn 7e7e72edfd [FIX] mail: 'is typing...' notification bar next to composer.
Revision on https://github.com/odoo/odoo/commit/0eab8f6e0b17a4ff6a859d14b14b643212cbadc1

The commit above fixed the definition of ASC/DESC on the rendering
of mail threads.

However, the 'is typing...' notification bar was still partially
using the old definitions. As a result, this notification bar was
not sticking at the visible bottom of the thread when there were
few messages:

        +--------[top]--------+   <---- visible top
        | 1st message         |
        | 2nd message         |
        | 3rd message         |
        |    X is typing...   |
        |                     |
        |                     |
        |                     |
        +------[bottom]-------+   <---- visible bottom

This commit fixes the issue so that the 'is typing...' notification
bar is always at the bottom of the thread in such case:

        +--------[top]--------+   <---- visible top
        | 1st message         |
        | 2nd message         |
        | 3rd message         |
        |                     |
        |                     |
        |                     |
        |    X is typing...   |
        +------[bottom]-------+   <---- visible bottom

Note that it fixes the case with 'few messages', without altering the case with
'several' messages:

        +--------[top]--------+
        |                     |
        |  (older messages)   |
        |                     |
        |- - - - - - - - - - -|   <---- visible top
        | ...                 |
        | message i           |
        | message i + 1       |
        | ...                 |
        |                     |
        |    X is typing...   |
        |- - - - - - - - - - -|   <---- visible bottom
        |                     |
        |  (newer messages)   |
        |                     |
        +------[bottom]-------+
2018-08-21 16:57:51 +02:00
XavierDo 2831fa7926 [IMP] core, test_mail: improve query count assertions
-remove margin
With the spirit of making tests determinists,
we can remove margins to have a real test of query count.

-mock random on assert query count
bus gc is triggered using random. Therefore, when send_many is called,
we have 1% chance to have more query. Mocking random.random to 1
will disable gc during query count tests (not during warmup).
Could be interresting to put gc collection in a cron latter

-add more info on querycount
Adding file and line number on query count failure/info will help to update
the query counts.

-update query count based on enterprise
Update all query count with enterprise values (exactly)

-normalize query counts with enterprise
voip module add a read on activity type (during create) in enterprise,
leading to one more query but also more information in cache.
Therefore, the next assertion will need one more query to access this data
in community.
Adding an access to activity type in the first assertion will allow
to have the same cache state in community and enterprise.

Task: #1878588
PR: #26476
2018-08-21 16:56:54 +02:00
David Arnold 0b72446340 [FIX] account: unproxy company currency
This indirection is the only place in the whole codebase, which indirects in
this way.

This block downstream code which relies on:
 - access to the line's company
 - while not necesarily having access to the account's company

(being line's company different than account's company)

Disclaimer: This use case is not officially supported.
However, this indirection does not make sense under the currently
supported model, neither.
2018-08-21 16:54:45 +02:00
David Arnold 7b492498eb [FIX] account_voucher: copy product in acc voucher (#26336)
* [FIX] account_voucher: copy product/qty from receipt to journal items

Before this commit, product_id and quantity were not passed
to the aml from account vouchers.

This caused inexpected behaviour, if products are a relevant dimension in cost
or revenue analysis analysis: Whereas on invoices, this product is copied to aml
on voucher, it is not.

Was PR #26336 . Courtesy of David Arnold (XOE Solutions)
2018-08-21 16:45:06 +02:00
Alexandre Kühn eea2366fd2 [FIX] web, mail, bus: no running services on top of tests
Before this commit, the web client in the JS tests environments
might be influenced by `longpolling/poll` or `mail/init_messaging`
RPCs. For instance, if we received a new direct message in Odoo
during some JS tests, it would open a thread window. As a result,
the tests on thread window will fail because of this newly and
externally added thread window.

After this commit, no service is deployed on the webclient on top
of the JS tests environment. This should prevent most undesirable
side-effects of RPCs, such as opening a thread window when receiving
a new direct message on the longpolling bus.
2018-08-21 16:07:30 +02:00
XavierDo 616fa4f6e4 [IMP] mail_bot: change Odoobot to OdooBot 2018-08-21 13:44:33 +02:00
Nicolas Seinlet e8f01b94ce [IMP] sale,sale_*: denormalize sale.order to speed up sale.report
Impacted modules: sale, sale_margin, sale_timesheet, pos_sale

This speed up a lot reports like sale.report when multiple currencies
with multiple rates are used, even with few currencies and few rates.
Using `_select_companies_rates` in SQL view bring lots of JOINs,
which slow down the view generation. This commit adds a computed
stored field containing the currency rate at the order date to speed
up report generation (database schema denormalisation).

This commit also use this new column on sale.report extensions and on
the project.profitability.report in sale_timesheet module.

Since a4d6bff197, the pos.report is
included in the sale.report. So, the same change had to be
applied on the pos.order model.

Task #1877418
Closes #25089
2018-08-21 13:28:42 +02:00
Dipalee Bhalodia 43e29e5d8f [FIX] web_editor: restore custom colors feature
- The current code found colors in the page which were not custom colors
  (because we were case-sensitive for hex values)
- Applying custom colors font font/background were inverted
2018-08-21 12:09:45 +02:00
Raphael Collet 0218c4d506 [FIX] stock: missing decorator 2018-08-21 11:03:44 +02:00
Yanina (Vauxoo) 384f6a6254 [FIX] l10n_mx: bad function renaming in COA creation
_prepare_transfer_account had been renamed _get_default_bank_journals_data instead of _prepare_transfer_account_for_direct_creation, by mistake. The original renaming was made at https://github.com/odoo/odoo/commit/87f0d2eefb77bfc6a9a0fa7f7dcd1475c7c34639#diff-ce53c5491cb2c9ab3dbbd41ecabf594f
2018-08-21 10:28:08 +02:00
jeffery chen fan 53889d9ba5 [ADD] l10n_cn: add all china cities
Make the module depends of base_address_city

Closes #23879
2018-08-21 10:20:08 +02:00
Raphael Collet b1cc28be00 [FIX] tests: clean up code
Closes #26467
2018-08-21 09:21:11 +02:00
dat-odoo ca707502a6 [FIX] purchase_requisition: vendor name management from purchase agreements.
Purchase orders created from purchase agreement behave differently depending on
the agreement type.
On one hand, if the agreement is a blanket order, the vendor must be set automatically on the
purchase order and be the same as the BO. Changing the vendor is forbidden.
On the other hand, if the agreement is a call for tender, multiple purchase order can be
created with different vendors. It that case, the vendor field must be editable in RfQ states.

This commit is related to task ID 1866975.
2018-08-21 09:05:20 +02:00
Akram Ben Aissi cae7c71635 [IMP] cli: allows to run odoo with openshift
For containers using random uids[1], use the higher level method getpass.getuser
which as the same effect but also looks consider the environment variables to
determine the user name.

Details from
http://blog.dscpl.com.au/2015/12/unknown-user-when-running-docker.html

CLA signature for akram

Closes #26452

[1] openshift or docker as explained at
http://blog.dscpl.com.au/2015/12/random-user-ids-when-running-docker.html
2018-08-21 08:34:14 +02:00
Vandan ShahandMohammed Shekha f4ee61f950 [IMP] web: mobile: add swipe support in form views
This rev. allows to navigate, in mobile, through records in form
views by swiping.

We also moved mobile-specific tests involving a form view to the
mobile test suite, since those tests became async because of the
lazy loading of the swipe lib (in the mobile suite, that lib is
already loaded).

Related to task #34727

Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-08-20 21:11:54 +02:00
Jeremy Kersten a7e94f1a83 [FIX] website: remove field from view and security
related to ac58a0ef87
2018-08-20 20:52:02 +02:00
Jeremy Kersten ac58a0ef87 [IMP] website_sale: product.public.category publish feature is useless 2018-08-20 18:07:59 +02:00
Jeremy Kersten 50217184d2 [IMP] website: make abandoned cart parameter website_specific
+ implement specific_user_account option

Now you can choose if when you create an user on a website,
it this user is dedicated to this website or not.
2018-08-20 18:07:59 +02:00
qsm-odoo 4d00958480 [FIX] website_sale: missing href on <a/> element
With BS4, those elements have no style anymore.
2018-08-20 17:59:24 +02:00
qsm-odoo 36430cae5e [FIX] website_event: adapt some layouts to new snippets and BS4 2018-08-20 17:46:46 +02:00
qsm-odoo b4fa0a510e [FIX] website_hr_recruitment: BS4, restore application form layout
Col must be direct children of rows.
2018-08-20 17:46:46 +02:00
qsm-odoo 66a46c3e3a [FIX] website: border-width of inputs was raised for no good reasons 2018-08-20 17:46:46 +02:00
qsm-odoo 604a6673a6 [FIX] website, portal: BS4, force list-group-item colors
Placing a list-group inside an element whose text color is forced is
buggy as the background of list-group items is forced to white and
the text color left untouched.
2018-08-20 17:46:46 +02:00
qsm-odoo fdd89d2a77 [FIX] web: BS4, restore some community nav elements
The 'nav-link' class was added on wrong elements.
2018-08-20 17:46:46 +02:00
qsm-odoo 340d1654f2 [FIX] web: BS4, add a btn-secondary border for community style 2018-08-20 17:46:46 +02:00
qsm-odoo cb83731c21 [FIX] mass_mailing: BS4, restore unsubscribe template
Columns must be direct children of a row.
2018-08-20 17:46:46 +02:00
qsm-odoo 0a6fe87681 [FIX] *: BS4, restore some portal breadcrumb
The new 'breadcrumb-item' class was missing at some places.
2018-08-20 17:46:46 +02:00
Yannick Tivisse 592391d2d7 [FIX] fleet: Move data from 'demo' to 'data' 2018-08-20 17:17:53 +02:00
Florent de Labarre c181033a6d [IMP] tools: replace SQL code
No need to construct the table name, can use the model name

Closes #25659
2018-08-20 16:58:38 +02:00
XavierDoandRomainLibert 0be33db68a [IMP] mail: refactor activity.js and add some test
activity.js was a little dirty with a lot of copy paste.
Most of the common logic is now in a BasicModel.

This commit also add some tests on activity view

Co-authored-by: RomainLibert <rli@odoo.com>
2018-08-20 16:00:09 +02:00
Sébastien Theys c90ff2afd8 [IMP] sale_management: allow using neither sign nor pay on SO template
Previously we required one or the other to be active. We removed this limitation for SO, thus the default value should be the company setting for both on the template as well.

Task: 1876864
PR: none
2018-08-20 15:52:54 +02:00
qsm-odoo a4a414f356 [FIX] calendar: adapt tests to https://github.com/odoo/odoo/commit/287501abbc92f7fe152dc61a296613f32c48b32c 2018-08-20 15:49:18 +02:00
Aaron Bohy fd2ff51ba3 [FIX] web: Dialog: do not open fullscreen by default
Introduced by a105e5f2. Doc was ok, code wasn't. This feature is
for mobile only, and for now it is restricted to ViewDialogs.
2018-08-20 14:45:49 +02:00
Deep Patel 287501abbc [FIX] web: restore many2manytags colorpicker dropdown
Bug revealed with BS4.
2018-08-20 13:40:20 +02:00
Pierre Masereel 49b5a5ba25 [REF] stock: remove unused field from_loc and to_loc
On move lines the field from_loc and to_loc are not used anymore
2018-08-20 13:14:45 +02:00
Pierre Masereel 8c6a363e85 [REF] stock: remove unused field ordered_qty
The field ordered_qty on move line and move is not used anymore, so we
remove it.
2018-08-20 13:14:45 +02:00
Adrien Dieudonne fb35180ee8 [FIX] web: test in graph_tests
previously added in 102a63b815
2018-08-20 12:53:40 +02:00
Cocographique 3babdebc5b [FIX] website: snippets usability improvements
- Suggest correct colors for <hr/> snippet
- Make alignment options more obvious for s_three_column
- Add alignment options for s_share snippet
- Review carousel design
2018-08-20 12:22:33 +02:00