Commit Graph
93268 Commits
Author SHA1 Message Date
Rémi Rahir eba119b38f [FIX] iap: typo
typo missed during merge. We rename end_point to endpoint as it is the correct denomination.
2017-10-13 15:09:20 +02:00
Christophe Simonis 6df0bf2a67 [FIX] web: correct expectation in new test introduced by previous forward-port 2017-10-13 14:26:46 +02:00
Martin Trigaux 6286dc4809 [FIX] hr: force a name to employee creation
The name field is a stored related on the resource.resource record.
The name on the resource is required.

If no name (and no resource_id), the creation fails as trying to create a
resource without name (non-null constrain)

Force in the view to indicate to the user that a name is required but without
adding the constrain at the database level.
required=True on the fields adds a non-null constrain on the SQL column but the
related values are populated *after* the INSERT so it would fail depending on
the given values (e.g. a resource_id value but no name)

Fixes #20126
Closes #20128
2017-10-13 14:21:32 +02:00
Christophe Simonis 1da064a1d3 [MERGE] forward port branch saas-16 up to 8ee9024a4c 2017-10-13 13:13:11 +02:00
Yenthe V.G 1ea19d8bad [FIX] base_setup,auth_oauth: correct labels
Authentification is not English but French

Closes #20095
2017-10-13 09:28:13 +02:00
Richard Mathot 8ee9024a4c [FIX] hr_org_chart: lambda employees are not allowed to read jobs
If we want to display job titles in this marvellous widget, we then have
to read them with higher access rights.
2017-10-13 09:11:57 +02:00
Christophe Simonis aeae519a65 [MERGE] forward port branch saas-15 up to 945dd32eb0 2017-10-12 21:44:28 +02:00
Christophe Simonis 945dd32eb0 [MERGE] forward port branch saas-14 up to 91e2264b28 2017-10-12 18:43:14 +02:00
Simon Lejeune 38fbf04183 [FIX] mrp: bom structure tree view
The tree views were removed in the new webclient but the reference of
the bom structure tree view was still there.

Closes #20108
2017-10-12 17:38:16 +02:00
Christophe Simonis 91e2264b28 [MERGE] forward port branch 10.0 up to ba519bde84 2017-10-12 17:30:01 +02:00
Josse Colpaert 855a56ba29 [FIX] mrp: lots of component should always be visible in move view of MO
When you open a move of a component in a manufacturing order, we cannot
see the move lines and so add a new on if there are no move lines in it
with finished lot. We now always display the list of move lines if
product is tracked by lot/serial or has finished lots.
2017-10-12 17:07:22 +02:00
Siddharth Gajjar df89473617 [IMP] mrp: change OEE color depending on the target of workcenter 2017-10-12 16:37:17 +02:00
Christophe Simonis ba519bde84 [MERGE] forward port branch 9.0 up to 40d4cdd39f 2017-10-12 16:23:17 +02:00
rde 47b376e66d [FIX] link_tracker: python3 can't concat bytes to str 2017-10-12 16:20:42 +02:00
rde a91a3a5633 [IMP] website: warn user about key change when editing special file name
The idea is to warn user if he created a special file (website.page with
supported extension) and he wants to change the file's name, which will at the
end also change the key).
If this special file has been t-called elsewhere, they t-call wont work anymore
This is why warning user is needed.

Note that this is different than the already existing page_search_dependencies
that is just checking if the URL is present in menus, templates, blog or pages.
This is about checking if the key is present somewhere. (we assume that if the
key is present, it is surely about a t-call.

Technically, the flow is:
1. Get supported extension
2. Get key dependencies
3. Check if user modify name
4. If name changed and it is/was a supported extension (special file) and it
   has dependencies (surely t-call) then warn user these call wont work anymore

--

search_page_dependencies is also improved by returning links to be clickable
(on delete dialog eg) and splitting template/page results.

it also refactor dependencies warning that was creating HTML in javascript into
using XML template
2017-10-12 16:20:42 +02:00
rde a8fc544c5c [TYPO] website: change some texts 2017-10-12 16:20:42 +02:00
rde 53920fae31 [FIX] website: key from page's view was not unique in every cases
Before this commit, if you created a page with the same name as another one
(which is allowed) it would set the same key for that second page.
Indeed, the code was setting correctly the path uniqueness but it was then
setting the key based on the name and not on the unique url we found free.

Now, the key is correctly uniquely set and even better, it is now completely
independant from the url and has its own 'find unique' method to be sure it is
correctly working.
It was not clever to have key & url being linked.

To be more clear:
1. Create page 'aboutus'
	key  is 'website.aboutus'
	name is 'aboutus'
	url  is '/aboutus'
2. Create page 'aboutus' ->
	key  is 'website.aboutus'
	name is 'aboutus'
	url  is '/aboutus-1'
Problem: key should be unique (for t-call for specific files & website_version)
Cause: key is set based on name which is not checking for uniqueness like url.
Two possible solutions:
	1. Set key based on url (which is being checked for uniqueness)
	2. Create & Use a specific method to get unique key
Fixed with solution 2 which is more clean.

--

It also fix an invisible 'bug':
Saving a page being in menu would cause the menu's URL to get it's trailing '/'
to be removed. It was only a problem when you were getting the warning about
dependencies (the menu wouldn't be recognized as dependencies because of the
removed '/')
2017-10-12 16:20:42 +02:00
rde 7692f52ad5 [FIX] website: page url were not checked anymore for uniqueness
Before this commit, if you created 2 pages with the same name/url it could
create both the pages with the same url.

Now, like before, it is correctly adding a suffix (eg '-1') when you create a
page with an URL already taken
2017-10-12 16:20:42 +02:00
rde 553e24ccd1 [IMP] website: button to easily back to page manager from form view
Before this commit:
When you were on the page manager and you were editing a website.page's
content, it would redirect you to the website.page's ir.ui.view's form view in
the backend.
From there, you would'nt have an easy way to get back to the page manager:
your only option was to go to the website module and click on 'go to website'
and then click on menu/manage pages.
It was not convenient when you were editing multiple page quickly or just
taking a look into some pages.

Now, you have a button on the ir.ui.view's form view to get directly on the page
manager.

Note: this back button is obviously invisible for ir.ui.view not related to a
website.page
2017-10-12 16:20:42 +02:00
rde 3549078ef4 [REF] website: function inverse on computed field is_homepage
Before this commit, we were using data[] array from json call to write on
website model accordingly of is_homepage value.

Now, we use the newly created inverse function of the computed field to handle
that to make it more clear
2017-10-12 16:20:42 +02:00
rde cd6c898643 [FIX] website_sale_options: public user can't add item to cart
Before this commit, clicking on add to cart as a public user* would throw an
error because it would access uom.name on which public user has no right.
*From the product page (/shop/product/xxx) having an optional product, the
access error is really on the optional product.

Now, we allow user to read name with sudo().
2017-10-12 16:20:42 +02:00
rde c400789d6e [FIX] website_sale_stock(_option): prevent negative stock & traceback
Before this commit, multiple tabs/session adding items to cart  could lead to
negative stock displayed in the quantity field.
In some case, it could throw a traceback because the wanted product had
became unavailable in the meantime, causing the cart to be updated and the
line to be deleted from the cart. But then, this line was being accessed again.

Now, negative values are prevented at the screen. And there is a check on the
line record to be sure it exists before accessing it.
2017-10-12 16:20:42 +02:00
Géry Debongnie d4cf4374d1 [FIX] web: allow widget many2many_tags to display more than 40 records
Before this commit, the widget many2many_tags only loaded the first 40
records. This was difficult to see, because there were not so many views
with a lot of tags.
2017-10-12 16:15:06 +02:00
Géry Debongnie 66b692a5eb [FIX] web: fix display issue with fieldSelection
When displaying a many2one values, in edit mode, the option did not
properly display some characters.
2017-10-12 16:14:49 +02:00
Géry Debongnie 7d448d57e3 [FIX] web: fix issue with default_get/onchange and one2many
Before this commit, there was a bug when creating a new record which
contains a one2many with an onchange.  The commands sent to the onchange
did not contain the full information.

Here is how you could reproduce the issue: install expense, go to the
expense list view, select the 2 lines, then, in the 'action' menu in the
control panel, choose 'Expense: submit to manager'.  In the new expense
sheet, you could see that there were two lines in the one2many
expense_line_ids.  However, these lines are empty.  The reason is that
the commands sent in the onchange were 2 commands 0, with {} as data.

So, in short, the BasicModel did generate the proper commands, but with
empty data, in the specific case when we have a non empty one2many in a
default_get, then an onchange.

To solve this issue, I had to fix 2 things: the internal data struture
was wrongly updated, and the commands should be generated with all the
data, and not only the changes.
2017-10-12 16:14:47 +02:00
qdp-odoo 945f05a310 [FIX] account: copy=False on account.move.line's payment_id field. 2017-10-12 16:14:40 +02:00
Josse Colpaert 055c03e899 [IMP] stock: no danger decorator for receipt
When a stock move is in reception, we don't want to color in red the
move in the picking as the reservation will always succeed.
2017-10-12 15:40:07 +02:00
Laurent Smet b44a482c53 [FIX] account: fix session.currencies in reconciliation js tests
In the JS tests environment for the reconciliation widget, session.currencies is missing.
Then, it causes some troubles for 2f3b469dee
2017-10-12 15:25:41 +02:00
Raphael Collet ebd8206555 [10.0][FIX] pos_cache: unable to refresh cache in a multi-company context 2017-10-12 14:51:49 +02:00
Martin Trigaux ae9ed02f38 [I18N] remove fuzzy Portuguese translations
Was leading to errors with missing %s
opw-776243
2017-10-12 14:09:12 +02:00
qdp-odoo 8c8af672dd [FIX] account: removed deprecated-and-broken menuitem 2017-10-12 13:59:42 +02:00
qsm-odoo 03ef19e40c [FIX] web, hr_timesheet_sheet: make m2o friendly-usable outside of views
Before this commit, m2o external button was always floating outside the
m2o main DOM element, on the right. This induced problems when using the
m2o outside of views (like in Odoo Studio). Now, the m2o design is made
so that this button is inside the m2o, except in form views where we
expect the button to overflow in the tables' right paddings.
2017-10-12 13:39:17 +02:00
qsm-odoo e3dd0dee42 [FIX] web_editor: restore iframe editor code view mode
Broken since https://github.com/odoo/odoo/commit/2972976962617d4b8a0113bae58c640ab41cdff8
2017-10-12 13:33:25 +02:00
qsm-odoo c1156915c1 [FIX] website: load xml dependencies of website.prompt
The deprecated-but-still-used website.prompt requires some static XML
to be loaded to work. In the case of creating a new website page, this
XML was implicitely loaded by the "Content" menu... but when the user
is on a translated page, this menu is not there. Anyway, this static
XML loading should be done by the website.prompt function itself if
necessary.
2017-10-12 13:31:36 +02:00
Carlos Dauden 40d4cdd39f [FIX] account: Field total_invoiced in res.partner doesn't include archived children 2017-10-12 13:20:57 +02:00
Nicolas Martinelli 179de9b55f [FIX] sale: layout sequence
- Create 2 companies A & B (not linked)
- Create a user Demo allowed in both companies
- Create a Sale Layout Category ('TEST')
- In company A, create a SO and add 'TEST' to the line
- Switch to company B, create a SO and add 'TEST' to the line
- In the Sale Layout Category, change the sequence of 'TEST'

An access error appears.

On a SO, `layout_category_sequence` is a stored related. It means that
when we change the sequence of the layout, all SO are updated, including
the SO to which we don't have access (in this case, the SO of company A,
since our user has switched to company B).

While it seems that `layout_category_sequence` was intended to be used
in order to keep the historic value of the sequence, this is not the
actual behavior. Indeed, the method `order_lines_layouted` uses the SO
lines in their original order, which doesn't use
`layout_category_sequence`.

In summary, this related field causing an access error is never used.

opw-774787
2017-10-12 13:02:33 +02:00
Yenthe V.G df124080b6 [FIX] web_calendar: Instantiate moment correctly
Without instantiating the moment it will throw errors to some users.
Desired behavior after PR is merged: No longer undefined errors for end users
Fixes #18994
Fixes #18618
2017-10-12 12:33:11 +02:00
Yannick Tivisse eb7a098592 [FIX] website_hr_recruitment: Avoid exponential sitemap generation
Purpose
=======

Currently all the possible routes for /jobs are put in the sitemap.

Each time you create a job, you add at least 250 links in the sitmap (The country can be set on the route)

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

This commit backports the behavior of this commit in v11.0 (https://github.com/odoo/odoo/commit/1b52b00d2aa96b9360d50a0f0960f1febb5e607e)

Don't generate sitemap entries for other routes than /jobs/
2017-10-12 12:10:52 +02:00
rgarnau b8dac2ff32 [FIX] web: integer not properly parsed
The parsing of the integers does not escape the thousands separator.

issue: Integers are currently not properly parsed. For example, create
a database in Spanish language, install product_expiry and in settings
activate Lots & Serial Numbers. Go to Products and create a new product.
Choose to track by lots and specify the use_time, life_time, etc.
When saving, all integers are set to 0
2017-10-12 10:34:40 +02:00
Goffin Simon 20aaa69eef [FIX] account, hr_expense: registering a payment for a multiple lines expense sheet
When registering a payment for an expense sheet with several expense lines, only
the first line of the expense sheet was linked to the account move line of the payment.
So the payment was considered as partially reconciled.

Now when a payment is registered for an expense sheet with several expense lines,
the user is redirected to the manual reconciliation widget to link the move line of
the payment to all the expense lines. In this way, the payment will be considered as fully
reconciled.

DO NOT FORWARD-PORT! ONLY FOR v10

opw:772505
2017-10-12 09:49:29 +02:00
Martin Trigaux 74452f947f [I18N] web: fix bad translation
The languages are not on Transifex so manually correcting the files.
opw-776115
2017-10-12 09:32:36 +02:00
Goffin Simon 8aca743c6e [FIX] website_sale_delivery: Incorrect price displayed for Delivery Method
The price on a delivery.carrier is computed according to the currency of the SO
in function "get_price".

opw:771773
2017-10-12 09:29:27 +02:00
Christophe Monniez fc76b1d565 [REM] remove any openid reference
Purpose: openid is not used anymore in Odoo, therefore it can be
safely removed.
2017-10-12 08:43:21 +02:00
Jairo Llopis d329b946d6 [FIX] website_portal: improve mobile layout
This commit closes odoo/odoo#19267
2017-10-11 17:56:23 +02:00
Odoo Translation Bot 38155cd786 [I18N] Update translation terms from Transifex 2017-10-11 17:17:17 +02:00
Laurent Smet 2f3b469dee [FIX] account: fix unreconciled amount on reconciliation widget
Try to reconcile a bank statement of 1000 to an invoice of 650 amount.
The balance amount of 350 is missing on the resulting account.move and
the bank amount is 650 instead of 1000.

task: https://www.odoo.com/web#id=36342&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
2017-10-11 16:07:36 +02:00
David Vidal ee7cfba917 [FIX] website_sale: Avoid compute tax for every company
When a product has multiple company taxes and b2c prices is enabled, price is
not computed properly and adds to the base price every company tax present.

This patch filters the company set on the company so taxes are computed just
for that company.
2017-10-11 15:55:20 +02:00
Dharmang Soni 2564d66fe0 [FIX] mail: smooth scrolling in discuss for iOS app
In the iOS app, the content immediately ceases to
scroll when you remove your finger from the touchscreen.

Now, he content continues to scroll for a while after
finishing the scroll gesture and removing your finger
from the touchscreen.
The speed and duration of the continued scrolling is
proportional to how vigorous the scroll gesture was.

This Css property is the only way we find to have
the same behavior in the android app and in the iOS app.
2017-10-11 15:11:45 +02:00
qsm-odoo bc623461b3 [FIX] website_sale: allow to properly click on mobile checkout button
Part of the button was hidden by the (invisible) right column content
when using some particular themes.
This is because of a messy XML structure that cannot be safely repaired
in a stable version. This commit fixes the bug with CSS.

Note: this may need to be backported to 9.0 and the XML structure should
be improved in master.
2017-10-11 15:01:32 +02:00
Christophe Simonis 5a9f1539e1 [MERGE] forward port branch 9.0 up to 99703583d4 2017-10-11 13:59:22 +02:00