Commit Graph
117975 Commits
Author SHA1 Message Date
Odoo Translation Bot bc54fc47bd [I18N] Update translation terms from Transifex 2018-05-13 00:25:38 +02:00
Kishan Gajjar c1f04bef83 [IMP] hr_timesheet: make it easier to encode timesheets
In this commit, we do two small changes to make it easier to encode
timesheets.  The main issue is that we want to solve the following
situation: a user clicks on a cell in a timesheet grid view to open a
list view, then clicks on 'Create' to create a new timesheet. This will
open a form view, but some fields which could be prefilled are not
filled.

- do not reset task_id in some cases. This is important for the onchange
  call which comes after a default_get, when there is a default project
value set.
- do not set employee_id if there is default_employee_id in context
  This is useful when we open timesheets from the 'All Timesheets'
menu item, then add a new line, select a different employee, and open it
in the grid view (by clicking on the + icon from a cell).  This opens a
list view, which is editable, but when we create a new entry, it ignores
the employee value.

Note: a commit in enterprise adds support for properly passing contexts
in grid view, see
https://github.com/odoo/enterprise/commit/f23003917f18b52bb69483cdaac3cb2164230aa6

Task: #35414
2018-05-11 16:19:26 +02:00
Fabien Meghazi 02deb4a662 [FIX] server: fix typo introduced in 9ffb51e1c2 2018-05-11 15:42:29 +02:00
Viral Thakar d1c731e88c [IMP] pad: add mobile support for pad widget
In mobile devices, the pad widget did not behave in a satisfactory
manner.  Also, once it was in fullscreen mode, it was not possible to
come back to normal mode.

Task: #31545
PR: #15817
2018-05-11 14:36:57 +02:00
Nicolas Martinelli af41ab8010 [FIX] payment_adyen: bytes/str comparison
When returning from the Adyen payment website, SHA signature check fails
because of an inconsistent bytes vs string comparison. This is due to
`base64.b64encode` returning bytes in P3.

opw-1841103
2018-05-11 13:41:22 +02:00
Nicolas Martinelli 3c61cd0992 [FIX] sale_timesheet: set company currency
Make sure the compoany currency is USD, otherwise the tests fail.

opw-1841170
2018-05-11 13:34:46 +02:00
Nicolas Martinelli ed9dbffe07 [FIX] sale: All Channels Sales Orders
The 'All Channels Sales Orders' report should filter out canceled
orders.

opw-1839938
2018-05-11 13:32:48 +02:00
Nicolas Martinelli c9bdda2c68 [FIX] account: display negative value in portal
The residual amount of a customer invoice or a credit note is displayed
in the same way in the portal view. This can be confusing for the end
user since there is no way to distinguish both.

We display the residual amount as negative in case of a credit note.

opw-1841432
2018-05-11 13:30:04 +02:00
Nicolas Martinelli 9a450ac162 [FIX] account_payment: prevent payment of credit note
A credit note is not supposed to be paid by the customer, so do not
display the payment button in the portal view.

opw-1841432
2018-05-11 13:30:04 +02:00
Yoshi Tashiro c6df2fb1d7 [FIX] sale: Remove outdated comments
The comment "Note that once a Quotation becomes a Sales Order, it will be moved from
the Quotations list to the Sales Order list" isoutdated since 10.0 - sales
orders are also visible in the quotation list.
2018-05-11 12:02:28 +02:00
Ray Carnes 7ee2bfce9f [IMP] google_spreadsheet: Add widget="url" to the URL field on tree view
Users can now click this field, instead of having Odoo open the Form View to click it.

Benefits:
1. Saves the user from clicking TWICE (they only have to click ONCE with this PR)
2. Keeps the list view of all spreadsheets open (user has to GO BACK to see the list without this PR)
2018-05-11 11:55:05 +02:00
David f236b095cb [IMP] membership: Always display associate_member on members tree views
Whatever the state of the association the associate_member is
relevant in order to follow where the membership status of the partner
comes from.
2018-05-11 11:50:47 +02:00
Swapnesh Shah e293cdafb1 [IMP] project: Display tasks label on rating stat button
Added label_tasks in task form view for rating

closes #22895
2018-05-11 11:43:00 +02:00
Fabien Meghazi 9ffb51e1c2 [IMP] server: improve logging for ThreadedServer#server_bind 2018-05-11 11:37:16 +02:00
Nicolas Lempereur 1dae7ea1d6 [FIX] web_editor: inline space in source code
Backport of 57f7c68106
2018-05-11 11:06:05 +02:00
Jeremy Kersten 1fe1e51dd2 [IMP] website_event: add tooltip to explain online event.
opw-1845012
2018-05-11 09:56:16 +02:00
stefanorigano 9d0e0e9787 [FIX] *_portal: nav in title
Adapt modules' portal navbars according to ba38d22
2018-05-11 09:56:11 +02:00
stefanorigano ba38d22f9d [FIX] portal: nav in title
The commit fix an issue causing the portal navbar to overlap/inherit wrong style in customised websites.

The previous layout used to add the entire portal navbar inside an <h3>, causing inner elements to inherit the titles style.
According to WC3 standards, titles can have phrasing content only.
Titles reference > https://w3c.github.io/html-reference/h3.html
Phrasing content reference > https://w3c.github.io/html-reference/common-models.html#common.elem.phrasing

By chance this issue was not visible on runbot, but was severely affecting our website and probably clients ones too.
This commit wrap the portal navbar in a standard bootstrap navbar structure, fixing the title issue and provinding some imp. too:

- Search is now available for mobile
- Modules can inject a custom/botstrap class (eg. navbar-default) ot customize design if needed
2018-05-11 09:47:09 +02:00
len-odoo 6c6c4b89a0 [FIX] mail: parse eml/msg attachments
When parsing an email with some eml or dmg attachment, the parsing would
generate an attachment with empty content.
Since this content is later encoded in base64, it would crash trying to encode
None.
We simply do not process attachments without content.

We add a test to check that parsing mail with some empty attachment doesn't
crash, since the crash implies that the mail gets stuck on server
and is never fully processed by Odoo.

opw 1814014
2018-05-09 16:49:34 +02:00
Christophe Simonis 79cfc85b91 [FIX] stock: correct model name in new test 2018-05-09 16:47:14 +02:00
Goffin Simon dff1e96ed3 [FIX] purchase: Wrong property fields in multicompany
Steps to reproduce the bug:
- Enable multi companies and multi-currencies
- Multi company: Your Company and Test
- Users: Admin and Demo
- Login as admin user with the current company: Your Company
    - Allowed companies: Your Company, Test
- Login as Demo user with the current company: Test
    - Allowed companies: Test
- From the admin user with the current company: Test, do the following configuration in the product,
   - product: iPad mini, select vendor: Delta PC with price $100 with company: test, currency: USD
- Change the admin's company from Test to Your Company, do the following configuration in the vendor,
   - vendor: Delta PC, set supplier currency: EUR and payment terms: 30 Daya Net Payment
- Log in with the demo user
- Create SO for that product by selecting routes: Make to order and Confirm it.
- Open the PO which is generated from this SO

Bug:

The Currency and payment terms were set with the data set for Your Company

Excpected behavior:

Nothing is set for supplier currency and Payment terms as nothing is set for the company: Test

Closes #24564
opw:1841379
2018-05-09 16:21:23 +02:00
Goffin Simon 475027b988 [FIX] point_of_sale: Set the correct cashier
After reopening the session in the POS by another user,
the cashier was not correctly identified.

Back-port of this commit: a9caef0ebb

opw:784422
2018-05-09 16:06:51 +02:00
Christophe Simonis 5a751fa200 [MERGE] forward port branch saas-11.2 up to aae54ecc15 2018-05-09 15:45:20 +02:00
Josse Colpaert 0ca60a8d01 [FIX] delivery: delivery with carrier but not linked to so
When a delivery with free_over=True was not linked to a SO, it raised
an error.

opw:1843829
2018-05-09 15:39:34 +02:00
Romain Derie b65cb86697 [IMP] website: remove page creation in menu manager + menu container
This commit:
1. removed the possibility to create page from the menu manager.
   The usability of this feature wasn't great since create menu as a new page
   would redirect to that newly created page without saving the menu manager
   state.
   Plus, there is already the 'NEW' button on the navbar to create a new page,
   the menu manager should, as its name hint, only manage menus.
2. Handle a new case (officially at least) of menu: menu container.
   Those menu are simply menus with '#' as URL. It will be usefull to create a
   menu as a dropdown list container.
   Note: We should take care of a menu's URL being updated to '#' to avoid the
         menu's page URL to be also edited to '#'.

opw-1825883 & opw-1824263
2018-05-09 15:38:58 +02:00
Christophe Simonis aae54ecc15 [FIX] test_mail: bump expected query count 2018-05-09 14:51:11 +02:00
Christophe Simonis eeae2b80ea [MERGE] forward port branch 11.0 up to b793e23ae5 2018-05-09 13:55:27 +02:00
Christophe Simonis 4431c8c843 [FIX] website: GeoIP Legacy compatibility
Some IPs (like google-proxy ones) are not bound to a specific country.
Legacy Database used to set country_code to 'EU' for these one. geoip2,
on contrary, does not set the country. Read information from `continent`
attribute in this case.

opw-1844888
2018-05-09 11:40:56 +02:00
Nicolas Martinelli b793e23ae5 [FIX] stock: incorrect PO sequence
- Create 2 companies A & B
- Create a sequence for PO in each company
- Set User A in Company A and Admin in Company B
- Create a MTO product with a 'Buy' route
- Create a SO with User A using the product, validate

The PO created uses the sequence for Company B instead of Company A.

The creation is done as `sudo`, and ultimately `next_by_code` will use
the company of the Admin.

opw-1839656
2018-05-09 11:25:39 +02:00
Romain Derie 665fcb62cf [FIX] website: always show menu if its a container with visible menus
Before this commit:
1. If a menu was used as a container (dropdown) and had an unpublished page_id
   (website.page), we would never show that menu (and so its submenus) even if
   it has visible submenu.
   Some users are stuck with this since they:
   a) create a new page 'A' (unpublished by default) included in menu.
   b) create a new page 'B' (unpublished by default) included in menu.
   c) set 'B' as a submenu of 'A' in the menu manager
   d) decide to publish the website.page linked to menu 'B'
   Then, since menu 'A' is linked to an unpublished page, the menu 'A' and 'B'
   are never visible.
2. If a menu is being created with an URL that match a website.page URL, the
   m2o relation will automatically be set (website.menu.page_id).
   Still, if the user type the URL without the leading slash, the m2o won't be
   set.
   This could be misleading since on the page property in the page manager the
   URL is being shown without the leading slash even if it is stored in DB.

Now:
1. We always show menu container if they contains visible submenu, even if the
   container menu is linked to an unpublished page
2. The page URL search is more clever and will match URL even if the only
   difference is the leading slash.

This closes #24635
2018-05-09 11:02:16 +02:00
Jairo Llopis 285ead28e3 [IMP] Handle XMLRPC calls from standard controllers
This way, XMLRPC calls can get request details form the standard
`odoo.http.request` system.

Move jsonrpc to the same controller while at it, for coherence.

Fix #24183
2018-05-09 09:46:15 +02:00
xmo-odoo 020906659e [FIX] orm: "relate" binding type on actions
When ir.values was removed and the "action" ir.values were merged
directly into the actions themselves, "client_action_relate" was
discarded as unused (and possibly too similar to
client_action_multi?). *However*:

* it was actually used implicitly as "relate" was the default key2 of
  the <act_window> XML tag
* and it had a crucial difference from client_action_multi:
  client_action_multi is shown on both form and list views by default
  and only on list if multi=True, whereas relate is shown on *either*
  the form or list view (tree if multi else form)

This means without relate the actions which should be only visible on
the form view are now on both list and tree, which leads to
overpopulated `Action` menus and odd behaviours (e.g. actions relying
active_id on lists, which id do they get and why?)

=> reintroduce relate as "action_form_only" for the specific case of
multi=False and either no key2 or a key2 of client_action_relate. If
multi=True then binding_type=action.

Fixes #20124

Followup: Task 1843603 to remove #multi and redundancy
2018-05-09 09:45:29 +02:00
jem-odoo cca15358b6 [FIX] hr_timesheet: do not copy AA when copying project
When duplicating project, its analytic account
is copied. This came from the ancient inheritS
between the 2 models.
This commit prevent copying the AA. However,
if 'allow_timesheet' is checked, a new analytic
account will be created when duplicating the project.
2018-05-09 09:11:00 +02:00
Christophe Simonis 7b67a1474b [FIX] web: deactivate test using removed feature
Note: test skipped (and not removed) as feature will be back in future
version
2018-05-08 19:20:05 +02:00
Christophe Simonis 013ce7f889 [MERGE] forward port branch 11.0 up to f2e105eeca 2018-05-08 19:08:18 +02:00
Christophe Simonis f2e105eeca [MERGE] forward port branch saas-15 up to d3a040cebe 2018-05-08 18:12:03 +02:00
Christophe Simonis d3a040cebe [MERGE] forward port branch saas-14 up to 1813f42dbc 2018-05-08 17:18:48 +02:00
Goffin Simon 652e336deb [FIX] base_vat_autocomplete: address format of swedish company
Swedish Postal Codes are 5-digit codes with the following format: XXX XX

Before the fix:

With VAT=SE556242088401

For [zip_code] [city] = [171 42] [SOLNA]

we got [zip_code] [city] = [171] [42 SOLNA] because 'zip_code' didn't allow whitespaces

opw:1841010
2018-05-08 17:15:36 +02:00
Nicolas Lempereur d595e3a258 [FIX] tools: mail transcoding css space consistent
The transcoding of a mail (transforming CSS into inline styles on the
element nodes of the mail) used the form:

 property:value;

So when a mail is saved, it would be eg. with `style="property:value;"`
and when it is being edited "property:value" is removed if available via
CSS stylesheet given the structure.

But the sanitize_style (introduced in bfe7aafa7) adds an espace before
the value (which is more pretty but was probably not choosen in
transcoding to decrease size of mail):

 property: value;

so the inline style would not be removed when editing possibly causing
conflict with the editor.

With this commit, the sanitize_style doesn't add a space. It could have
been changed in transcoding but the code is already rather slow and we
don't want to use a regex replace or two string replace instead of the
current one string replace.

opw-1841107
2018-05-08 16:46:23 +02:00
Nicolas Lempereur b739e65940 [FIX] web_editor: optimize big mail transcoding
The browser may throw an error when a big mail such as one with
hundreds thousands of tags is being transformed to have a style
more compatible with mail clients.

The error would be:
 "Uncaught RangeError: Maximum call stack size exceeded"

This happens in jquery because we hare too many nodes (there is an
ongoing issue at https://github.com./jquery/sizzle/issues/403) so this
commit replace that part by a DFS traversal over DOM nodes.

There was also an issue that not having the option "style-inline" would
still cause some style code to be ran albeit it was intended not to be
solved in 55c7d2d5b0.

opw-1841107
closes #24550
2018-05-09 12:35:40 +02:00
Christophe Simonis 1813f42dbc [MERGE] forward port branch 10.0 up to 14f59f4b78 2018-05-08 16:23:54 +02:00
Aaron Bohy 5bcede7dea [FIX] web: ActionManager: store evaluated context
... in session_storage.

The current action is stored in the session_storage (stringified),
so that it can always be restored on F5 (useful for dynamic
actions). Before this rev., it was stored with it's 'raw' context,
i.e. before its evaluation. However, when this context is an
instance of a CompoundContext, it is meaningless once restored.

So this rev. ensures that the action is stored with its evaluated
context.
2018-05-08 15:48:47 +02:00
ppr-odoo e9e8fd24cf [IMP] mail: hide 'mark all read' buttton on mobile devices
This commit is related to task ID 1838321

PR #24412
Task #1838671
2018-05-08 15:26:06 +02:00
Martin Trigaux 96c7390a37 [FIX] _crm: remove outdated es_CR translations
It was containing a bad translation "Inicaitiva / Oportunbidad" while the
correct one "Iniciativa / Oportunidad" was already done in Spanish.

Remove files to avoid getting the wrong translations.

Regional translations can be used for different terms, avoid to use the same
to make it easier to maintain.

Fixes #24613
2018-05-08 14:59:43 +02:00
Christophe Simonis 14f59f4b78 [MERGE] forward port branch 9.0 up to 468e2e454e 2018-05-08 14:51:36 +02:00
Mohammed Shekha 2bd92cc581 [FIX] web: use correct href in link for m2o
With a better href, many2one in readonly mode  can be opened in new tab.

Related to task: #32919
2018-05-08 14:46:17 +02:00
Nicolas Lempereur e9454e79e2 [FIX] website_event: typo tickets not disappear
Since 809aaf9e, when clicking on "Register Now" on a ticket registering
page, the ticket list disappeared because of a typo.

opw-1841488
closes #24607
2018-05-08 13:53:29 +02:00
jem-odoo ccece68ebc [FIX] sale_timesheet: wording in plan project 2018-05-08 13:38:51 +02:00
Samuel Piquet 2884f76488 [FIX] repair: remove useless rules
The manager had less rights than the user.
As the manager is also a user, this had no effect.

Closes #24523
2018-05-08 13:24:47 +02:00
Samuel Piquet 08cd80a315 [CLA] signature for Sa3m
Done at #24523
2018-05-08 13:24:42 +02:00