Commit Graph
117156 Commits
Author SHA1 Message Date
Odoo Translation Bot 40eca1e3e7 [I18N] Update translation terms from Transifex 2017-05-15 12:23:37 +02:00
xmo-odoo b5e7b7eee3 [FIX] P3: mixed whitespace indentation
Completely forbidden in Python 3
2017-05-15 12:17:46 +02:00
xmo-odoo 54ae611131 [FIX] testfile: can import during iteration
Hence modifying sys.modules blowing up the iterator.
2017-05-15 10:08:38 +02:00
Christophe Matthieu 1c5ea99b7b [FIX] web: display a translation alert when saving the form view
In the form view, when the user saves a record (with a multilang instance),
an alert is displayed to display all modified translatable fields.
2017-05-15 10:06:58 +02:00
Cédric Pigeon 477b8176c1 [REF] stock: allow domain selection hook
Add hook to allow override of domain in orderpoint scheduler.

Closes #16909
opw-743020
2017-05-15 09:57:18 +02:00
Odoo Translation Bot d052f2d330 [I18N] Update translation terms from Transifex 2017-05-14 07:08:31 +02:00
Odoo Translation Bot edb8221cbb [I18N] Update translation terms from Transifex 2017-05-14 04:31:11 +02:00
Odoo Translation Bot 12a049e551 [I18N] Update translation terms from Transifex 2017-05-14 00:28:46 +02:00
Joren Van Onder 3d3391da86 [FIX] pos_mercury: take into account rescue sessions
If there are open rescue sessions there will be multiple opened
pos.session records with the same user.

A better solution would be to make the POS client send back the
pos.session id it belongs to and use that instead, but this would be
unsuitable for a stable release. It will instead be done in master.

opw-743318
2017-05-12 19:14:01 -07:00
Nicolas Lempereur 89e644000a [FIX] web_editor: don't resize iframe in content
In 4e0e376b0 an iframe for the readonly preview was added when
displaying html fields.

In e5112ee00 this iframe was only used if style-inline was set in the
widget options.

This brought an incompatibility if the not iframed preview contained an
iframe (eg. a youtube video which is then resize to a 30px height) which
is solved by this commit.

opw-725161
closes #16955
2017-05-12 16:21:14 +02:00
Xavier Morel 4ad1ae6896 [FIX] P3: exceptions compatibility changes
* exceptions have lost their ``message`` attribute
* ``raise type, value, tb`` has been removed so add a compatibility
  shim to pycompat to raise a new exception with an existing traceback
2017-05-12 16:18:02 +02:00
Xavier Morel 07ab8b6cd2 [FIX] P3: Exception.message removed 2017-05-12 16:15:40 +02:00
Xavier Morel 3dd3790597 [FIX] P3: raise exception with existing traceback
In Python 2, to raise a new exception but reuse a traceback requires a
special form of ``raise`` (``raise etype, evalue, tb``).

In Python 3, this is now done via a ``with_traceback`` method on
exception objects.

However this requires a bit of trickery as the former is invalid
syntax in Python 3, hence pycompat bridge created via an exec for
Python 2.
2017-05-12 16:15:39 +02:00
David Monjoie b57283619c [FIX] web: display field node string in form dialog title
Previously, the string attribute of the field node was ignored
in the title of the form dialog and it always displayed the
string value of the python field definition instead, which is
a default value instead.

Additionally, I took this opportunity to add tests for other
similar dialog titles which actually worked already with the
string attribute of the field node but were not tested yet.
2017-05-12 14:53:48 +02:00
David Monjoie 42d95cbfc3 [FIX] web: keep focus on checkboxes after rerendering
Previously, when a checkbox was re-rendered, it was losing focus
since it was removed and re-created. Now, if the checkbox itself
is the origin point of the re-rendering, we give the focus to the
newly re-rendered checkbox, resulting in a seamless experience
just as if the checkbox was never removed and re-rendered.
2017-05-12 14:53:48 +02:00
qsm-odoo f5d337680a [FIX] website: fix missed forward-port
A forward-port ported this commit:
https://github.com/odoo/odoo/commit/c12f2cd5ccc72a680ab741b4ce16d3913dd3854e#diff-473476fda8a8b38a9ee4480eb2bf2e2eR150
But ignored that a more recent one did remove the related code:
https://github.com/odoo/odoo/commit/0eafeab1#diff-473476fda8a8b38a9ee4480eb2bf2e2eL173

The result was misindented breaking code.
2017-05-12 14:12:30 +02:00
Géry Debongnie 310588b813 [FIX] web: prevent duplicated footers in dialogs
In some cases, we had duplicated footers in form view dialogs.  It
actually happened when the view was reloaded, which is not particularly
frequent, but happens most of the time the user clicks on an action
button, which does not close the window.

To reproduce the issue, you can open the lunch module, click on the
'Feeling Lucky' button.  It will open a form view with a special button
in the footer: 'I'm feeling lucky'.  Clicking on that button will return
an error (no order matches the criterion), and will trigger a form
reload.  Then, you will see two footers: one in the modal footer, the
other one in the form renderer.

The solution to this issue is to make sure, when we update the view and
a footer tag is found in the form renderer, to replace the current
footer buttons by these new buttons.
2017-05-12 14:05:17 +02:00
xmo-odoo 021de21e8c [FIX] P3: replace PyPDF by PyPDF2
PyPDF is unmaintained and abandoned (as noted on its home page
http://pybrary.net/pyPdf/) and was never updated to Python 3. PyPDF2 is
a fork which provides a mostly compatible API and is P3-compatible.

Replace PyPDF by PyPDF2.
2017-05-12 13:28:57 +02:00
Josse Colpaert c91c3726a7 [FIX] mrp: for the cost calculation and traceability, we need to include all moves
When calculating the cost price or the traceability between the consumed
and produced quants in a production order, we need to take into account
the extra moves that are added in the action_done (move_validate)

opw-715541
2017-05-12 12:24:12 +02:00
fka-odoo 13ee5596c6 [IMP] base: Adapt address format for Japan.
Purpose
=======

ja_JP: the implemented language font in Odoo is not Japanese but Chinese.

In Japan address structure is different:
First: Postal code
Next: City +  ward (like a neighbourhoos name)
Next: Building (all buildings have names)
Name: Customer or Company

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

New address structure for Japan:
%(zip)s
%(state_name)s %(city)s
%(street)s
%(street2)s
%(country_name)s

In Countries form view, add one selection field which set the customer name position in reports base on the customer country settings.
2017-05-12 11:30:46 +02:00
qsm-odoo f83f9d702a [FIX] website: slideshow image gallery was not responsive
The slideshow image gallery code was quiet old and ugly. This commit
refactores it so that it works better, especially its responsiveness.

Before this commit, the number of thumbnail images was limited to 10.
If there were more images than 10, the user was able to navigate
between groups of 10 images thanks to arrow buttons. The problem is
obvious: on small devices, 10 images is too much. Now this "10" limit
is not fixed, it is determined according to the width of the browser
at the time the user loads the snippet.

Some animation and style was also wrong in some cases.
This commit was made as a 10.0 fix, the snippet should keep improving
in advanced versions.
2017-05-12 10:08:27 +02:00
Xavier Morel a5a10e75ab [FIX] P3: file builtin removed
* replace with open()
* forbid file() builtin since reports-removal was merged
2017-05-12 09:27:17 +02:00
Xavier Morel b86e5fa477 [FIX] P3: exec keyword -> builtin function 2017-05-12 09:27:17 +02:00
Jérome Maes e7e8ecc77b [FIX] project_timesheet_holidays: fix tests
Handling datetime is not a good idea, mostly
when computing different in terms of days.
Forcing the hour (time) will set the tests correctly
regarding the working hours, and the datetime
difference, independently of the execution time
of the test.
2017-05-11 18:27:33 +02:00
Richard Mathot d994f51c60 [FIX] website_sale: hide horizontal rule if there is no availability warning 2017-05-11 18:18:25 +02:00
Thibault Delavallée 7010a918c7 [FIX] website_event_track: add missing onchanges
It makes no sense to use track proposals without displaying tracks.
2017-05-11 17:56:08 +02:00
Thibault Delavallée 59d918059b [FIX] website_event(_track): correctly delete unwanted website event menus
Previously to commit https://github.com/odoo/odoo/commit/531d641375f5cee7d3a5e629f6b1eaceee8b2739 website
menus checkboxes change did remove all menu entries. They were then
created again depending on checked entries.

That commit changed that behavior to try to create only missing menu
entries and remove only extra entries. However the extra entries removal
was not correctly done.

This commit now checks existing menu entries and remove menu entries that
should not exist depending on checked options. Only standard menu entries
are removed aka menu entries generated by the event module. This means
custom menu entries added for the event should be kept to avoid loosing
customization.
2017-05-11 17:56:08 +02:00
Thibault Delavallée 0d4ed7abf5 [FIX] hr_timesheet: compute default employee at create instead of having a default value
This way existing analytic lines won't have to set the current user
as employee when installing hr_timesheet module.
2017-05-11 17:25:41 +02:00
qsm-odoo 7fc788b694 [FIX] website_sale: "Confirm order" button had fixed width
Putting fixed width on button is obviously always a bad idea as
traduction may change the inner text size. Besides, removing the
fixed width does not change the design anyway.
2017-05-11 17:05:38 +02:00
Jérome Maes 0c9c530233 [IMP] sale_timesheet: add test for revenue computation 2017-05-11 16:58:58 +02:00
Jérome Maes dcd7b0f5c3 [FIX] sale_timesheet: correctly handle multi currency and rounding 2017-05-11 16:58:45 +02:00
Jérome Maes fa0769c41c [IMP] project_timesheet_holidays: add tests
Tests to check the timesheet generation
when validating leaves.
2017-05-11 16:58:37 +02:00
Jérome Maes 486fe737b6 [IMP] hr_timesheet: add test cases
Add some tests case  about logging timesheet
2017-05-11 16:58:30 +02:00
Jérome Maes 6820863c59 [FIX] project_timesheet_holidays: correctly set the employee for generated timesheet 2017-05-11 16:58:23 +02:00
xmo-odoo bc4391471e [FIX] P3: lint away some already cleaned up stuff
These issues were checked/cleaned previously but the linter was not updated.
2017-05-11 15:27:02 +02:00
xmo-odoo 6659d5a7d2 [FIX] P3: metaclasses handling
* cross-version metaclass spec
* more formally deprecate browse_record and browse_null since they
  were using metaclasses anyway
* update docstrings referencing the latter
2017-05-11 15:25:36 +02:00
Nikunj Ladava 048f122f3d [IMP] account,sale,...: Remove 'internal category' menuitems when not useful
Purpose
=======

Internal categories are only useful for accounting & inventory.
-> so they should be only visible for such modules

Also terms are confusing: internal category -> category  "internal" is not obvious

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

- remove internal categories menus from:
    sales
    website_sale
    pos

- rename menu in:
    purchase
    inventory

- add menu to:
    accounting
    products must be visible even if account.accountant is not installed
    categories only visible if account.accountant is installed

- rename categories in product form:
    - category
    - pos category
2017-05-11 15:15:16 +02:00
Aaron Bohy d068c4cac1 [FIX] sale: group_sale_layout shouldn't imply group_user
Because when it does, it can create a cycle in the graph of
implied groups. This happens when the option 'Sort products
in sections with subtotals and page-breaks' is checked in the
Sales settings. In this case, being in group_user implies to be
in group_sale_layout, and being in group_sale_layout implies to
be in group_user.

This is a problem for groups display in the 'Users' form view: the
employee groups are no more linear, and thus no more displayed as
a selection field, but there is an 'Employee' section where each
of the employee group can be checked. Activating the option in the
Sales setting should have no impact of the groups hierarchy of HR.

Moreover, there have been several imilar issues on production
databases, probably due to this cycle, but that we haven't been
able to fully understand/reproduce yet: with this option in the
'Sales' settings activated, after a mysterious operation, the
'Users' form view was broken, because the selection field
'sel_groups_'for HR was still referenced in the view, but didn't
exist anymore (as HR groups weren't displayed as a selection field
anymore).
2017-05-11 15:14:07 +02:00
qsm-odoo 40a026d5b2 [FIX] web: implement <newline/> form tag behavior
Before this commit, the new form view implementation was rendering
<newline/> tags as real <newline/> DOM element. The wanted behavior
is now restored:
- As outer group direct child, produce a <br/> tag, forcing the next
  group children to be on a new line
- As inner group direct child, produce nothing but forces the creation
  of a new <tr/> (for the next group children)
2017-05-11 15:09:25 +02:00
qsm-odoo 97517a1cc2 [REF] web: label creation on form view rendering
The original goal of the commit was to implement a missing behavior
for label tags in form view. This finally need some deeper refactoring
for it to work so this commit does not introduce any change in behavior,
only comments explaining the problem.
2017-05-11 15:09:25 +02:00
qsm-odoo 23beee818a [FIX] web: do not lose field/label pair on field rerendering
When a field widget switches between readonly and editable states, it is
fully rerendered. Labels have sometimes to get a specific class when
their associated field is (become) readonly and without any value. This
condition was evaluated on the initial widget and not on rerendered
ones.

Note that this commit only restores an already implemented behavior
broken by https://github.com/odoo-dev/odoo/commit/8f9362809e91ff7c2876ab464017abb13a4e0974
... but this time a test will prevent a new breaking
2017-05-11 15:09:25 +02:00
Martin Geubelle ef643783a5 [FIX] web: deal with malformed default_order
Even if the `default_order` attribute should be like 'name,id desc,coucou'
we want to support the syntax 'name, id desc, coucou' (i.e. with spaces after
the comma).

The commit also patches the mock server.
2017-05-11 14:48:35 +02:00
Christophe Matthieu 2e69c189b1 [IMP] web: calendar test: Error message when the screen is too small 2017-05-11 12:57:59 +02:00
Christophe Matthieu cc141dcce1 [FIX] barcode: Avoid making requests to onchange method on each scan
Usecase: A person scans various products in a warehouse or the network is slow.
Only one request per product must be made, the rest is changing the number locally
and all performed scans (products or actions) must not be lost.
The mutex ensures that the scan is performed in the correct order.
2017-05-11 12:57:44 +02:00
Christophe Matthieu eae62af904 [FIX] account: remove automatic reconciliation button for manual reconciliation
Functionality deprecated since v9
Add also some small rendering fixes for manual reconciliation:
* display congrats only once
* display journal_id as required
* use isValid to create a new proposition line
* Can erase all proposition lines in manual reconciliation
2017-05-11 12:57:32 +02:00
Thibault Delavallée 6b490ef247 [FIX] base, report: fix choose report template broken by 'new report'
Report module has been cleaned and moved into base at https://github.com/odoo/odoo/commit/e80238042c9d93d492ea8b06b0041aced0d81dcd.
However there are leftover references to report module. This crashes
the template choice feature.
2017-05-11 12:35:23 +02:00
Yannick Tivisse 19935c2c38 [FIX] sale: Display correclty 'Pro-forma #' on invoice report
Purpose
=======

When sending a proforma by email, the email template is correclty rendered. But 'Quotation #' id displayed on the printed report instead of 'Pro-forma' #

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

- Retrieve correctly the context key in the template
- Remove the associated ir.actions.report.xml as we cannot pass a specific context from there
2017-05-11 12:25:53 +02:00
Yannick Tivisse 2a5cd52d83 [MERGE] various: Improve readability on mobile by adding default kanban views
See each commit message for more information about the impacted modules.
2017-05-11 11:40:14 +02:00
Kishan Gajjar 72553c6022 [IMP] base: Add kanban views for all menuitems used in mobile
Purpose
=======

Improve readability on mobile

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

Activate Kanban view on those so it could be displayed by default on mobile instead of view list

List of impacted modules:

- base : kanban for currencies

- base : kanban for users

- base : kanban for Companies
2017-05-11 11:38:42 +02:00
Kishan Gajjar 8b40c29736 [IMP] various: Add kanban views for all menuitems used in mobile
Purpose
=======

Improve readability on mobile

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

Activate Kanban view on those so it could be displayed by default on mobile instead of view list

List of impacted modules:

- report_intrastat: kanban for intrastat

- google_drive: kanban for Google Drive(Templates)

- anonymization: kanban for anonymized fields
2017-05-11 11:38:42 +02:00