Commit Graph
90864 Commits
Author SHA1 Message Date
Khoi Nguyen f2c7e44efe [FIX] web: no M2ODialog when pressing enter in a many2one
Before this revision, pressing ENTER when inside a many2one field
triggers a 'focus out' event. In particular, if one creates a many2one
record and uses the ENTER key to click "Create and Edit", two dialog
windows appear: one to actually create the associated record, and a
second to alert the user that they are creating an associated record.
The latter appears every time the many2one field loses focus.

This commit changes the 'key up' event for many2one fields to ensure
that the ENTER key does not trigger a 'focus out' event.
2017-07-14 10:35:35 +02:00
Cedric Snauwaert a562f5ced1 [FIX] account: fix the broken reconciliation widget
Lot of features were not working and this commit fixes that
- Create entries upon reconciliation
- Add buttons at the end of the process to view/close bank statement
- Fix partial reconcile
- When changing partner, correctly fetch counterpart account and fix search domain
- Add ability to reconcile without choosing a line (will automatically create a line)
- some other small fixes
2017-07-13 14:17:58 +02:00
Elkasitu 0c496136a9 [FIX] web: Discard from form view to form view
Clicking on the discard button in a form view whose previous view is
another form view wouldn't do anything.

This is fixed by making the view_manager trigger_up a history_back event
and then the history_back callback will handle cases in which there is
only one view and only one action, which used to be rejected
2017-07-13 13:10:30 +02:00
Géry Debongnie 60ee6bbda5 [FIX] mail: add test to proper module
Because of a rebase, I erroneously added the test in a new
FieldMany2ManyTagsEmail module.  It then failed, because the demo data
were not the same.
2017-07-13 12:37:07 +02:00
Thibault Delavallée b9a9922b62 [FIX] web: execute action with null active_id instead of undefined
Indeed pyeval that evaluates the context explicitly handles null value
differently from undefined values. Let us therefore avoid crashes when
it manipulates the context.

Example of crash

 * click on forecast in project kanban view without having already created
   forecasts;
 * click on 'Assign' to create a new forecast;
 * selecting a task crashes because of the domain on task field that is
   evaluated using pyeval with an undefined active_id in context that
   pyeval cannot handle;
2017-07-12 14:47:09 +02:00
Géry Debongnie 9ee00dd265 [FIX] mail: prevent crash when chat system is not ready
When a chatter is created, appended, and destroyed before being ready,
bad things could happen.  This is because the code in start/other
deferred was executed regardless if the widget was still alive.  And,
some mechanisms, such as _getBus, depends on the event system.  If the
widget is destroyed, it will be remove from the component tree and such
functions will then return undefined.

To protect agains those issues, we simply make sure that the deferred
are only resolved when the widget is still alive.
2017-07-12 13:41:51 +02:00
Adrian Torres ed2a77e50e [FIX] web: Fix FieldRadio's o_horizontal/vertical (#18163) 2017-07-12 09:45:46 +02:00
Martin Geubelle 8881e61ec8 [FIX] mail: make many2many_tags_email widget work
This widget hasn't been rewritten with the new views.

The purpose of this widget is to open a popup for each invalid partners
(without email) in a many2many to fill the email. If the email is not set, the
partner will not appear in the tags and its id will not be sent (which should
not be the role of a widget but that's the way it is).
2017-07-11 17:22:43 +02:00
Jérome Maes 83e3254519 [FIX] sale_timesheet: reactive tests
Disabled by mistake. I'm a looser sometimes ...
2017-07-11 17:16:00 +02:00
Christophe Simonis 1581d31b3e [MERGE] forward port branch saas-15 up to 0f2a06e29b 2017-07-11 16:06:17 +02:00
Christophe Simonis 0f2a06e29b [MERGE] forward port branch saas-14 up to 2fd28b2298 2017-07-11 15:08:36 +02:00
Géry Debongnie 3d16453865 [FIX] web: only send fields present in view in onchange
Before this commit, all x2many fields values were sent to the server in the
onchange call. If a x2many field was not present in the view, then it
was sent as an empty list [], which is totally wrong.
2017-07-11 14:40:34 +02:00
Géry Debongnie 50dd6bcd47 [FIX] web: increase timer for js tests
A few builds fail when run in 'primetime', because the js test suite
takes more than 120 seconds (on the slow runbots). With this commit, we
increase our timer to 180s to make sure that this does not happen again.
2017-07-11 14:40:31 +02:00
Christophe Simonis 2fd28b2298 [MERGE] forward port branch 10.0 up to 0ac49ee1e4 2017-07-11 11:05:19 +02:00
Christophe Simonis 0ac49ee1e4 [MERGE] forward port branch saas-11 up to d52f0a29b4 2017-07-11 10:45:36 +02:00
Christophe Simonis d52f0a29b4 [MERGE] forward port branch 9.0 up to 479facb783 2017-07-11 10:34:07 +02:00
Goffin Simon e43b54cf3c [FIX] sale: Wrong taxes amount printed in SO
Steps to reproduce the bug:

-Create a tax group TX with two taxes: 15% and 5%
-Create a SO with one line and set TX on it
-Print the SO

Bug:

Only the first tax of TX was taking into account

opw:748923
2017-07-10 15:14:35 +02:00
Christophe Simonis 479facb783 [MERGE] forward port branch saas-6 up to e26d85e836 2017-07-10 15:07:43 +02:00
Christophe Simonis e26d85e836 [MERGE] forward port branch 8.0 up to 49407e46cb 2017-07-10 14:58:37 +02:00
Goffin Simon 2b307b37ff [FIX] product: Print Price list
When printing a report, if the company logo or report layout
is not set, it will return an action (ir.actions.act_window)
to set the layout or the logo.
But this change of actions does not forward the data parameters
to print the price list. So it raised an error.

PS: the problem comes from function "set_report_template" which doesn't
take the data parameters into account when it is called from "res.company.report.form".

opw:749724
2017-07-10 14:50:04 +02:00
Goffin Simon fafdd027fa [FIX] sale: Wrong taxes amount printed in SO
Steps to reproduce the bug:

-Create a tax group TX with two taxes: 15% and 5%
-Create a SO with one line and set TX on it
-Print the SO

Bug:

Only the first tax of TX was taking into account

opw:748923
2017-07-10 14:05:20 +02:00
Martin Geubelle f6985ca21c [FIX] purchase: correctly link purchase order and invoice
When creating an invoice from the purchase order, the later one wasn't correctly
linked anymore (and the invoice couldn't be found through the stat button).

The link is actually done with an onchange at the invoice creation.

The problem here was that the readonly attribute was set on the fields
description but it was not overriden in the view. The onchange was taken into
account in previous versions but with the new views, the correct behaviour has
been implemented: if a field is readonly, the onchange won't write on it.
2017-07-10 13:00:53 +02:00
Richard Mathot 9e08da51ef [FIX] product: allow to create products even when dumb people do delete default category
(or at least give 'em a hint on what's happening)

opw-751701
2017-07-10 10:46:47 +02:00
Lucas Perais (lpe) 8bd56bb466 [FIX] website_sale, website_sale_options: fixing prices of product vs options in the modal
Before this commit, having an option on a product, the modal had every prices set to the one of the option
This was brought about by commit c8a434306f which was designed for the pricelists and striked prices

After this commit, we keep the intended behavior for pricelists while controlling that options would not mess up the modal
The prices that are displayed are the right ones.

OPW 744943
GH-17342

[FIX] website_sale, website_sale_options:fix the modal of options

Before this commit, the add quantity button were not working at all

This commit corrects the behavior by browsing the dom for anything that looks like a product section

Closes #17353
2017-07-10 10:44:43 +02:00
Richard Mathot 57089bbc78 [FIX] account: wrong variable name due to fwport 2017-07-10 08:40:02 +02:00
Richard Mathot 7522e29927 [FIX] event: a user may not have set its timezone 2017-07-10 08:21:16 +02:00
Joren Van Onder 2c605ab08f [FIX] point_of_sale: allow easier template extension of PosTicket
Fixes #17704
2017-07-07 17:57:28 -07:00
Joren Van Onder 49407e46cb [FIX] sale_margin: convert standard_price to SO currency before using 2017-07-07 16:01:36 -07:00
Invitu 7102fcfc4f [FIX] point_of_sale: also clone orderline price
Otherwise during e.g. bill splitting of an orderline which had it's
price overridden you end up with the original price again.

Fixes #17810
Closes #17811
2017-07-07 16:00:38 -07:00
Olivier Dony e8271ffcc7 [FIX] mail: avoid attaching auto-notifications to foreign parents
`parent_id` fields are common in many models, and thus default values
for those fields are sometimes passed in the context.

Because mail.message also has `parent_id` field, it would automatically
use the default when an automatic message was being posted. While of
course, the parent_id value comes from a different model.
This "adoption" by a random "parent message" is unexpected,
not desired, and it can even cause a very surprising AccessError if the
parent message is not readable by the user.

Forcing the `parent_id` value during the creation of an automatic message
avoids this confusion.

One way to trigger the bug was to use the "subtask" stat button to create a
child subtask for a project task (it relies on the parent task ID
passed in the context)
2017-07-07 18:34:54 +02:00
Martin Trigaux 326ff3699a [FIX] point_of_sale: use local variable in labmda
NameError: free variable 'order' referenced before assignment in enclosing scope

opw-751576
2017-07-07 15:39:47 +02:00
Martin Trigaux 3418c91f13 [FIX] product: fallback in category_all does not exists
self.enf.ref returns None if the record is not found.
Introduced at af11e74c
opw-751602
2017-07-07 14:42:31 +02:00
Christophe Simonis 0f2b2c4e2b [MERGE] forward port branch saas-15 up to 514a1a76d8 2017-07-07 14:18:07 +02:00
Christophe Simonis 514a1a76d8 [MERGE] forward port branch saas-14 up to 5b28570769 2017-07-07 14:14:55 +02:00
Christophe Simonis 5b28570769 [MERGE] forward port branch 10.0 up to aef7748845 2017-07-07 14:13:07 +02:00
Christophe Simonis 96fa86779b [MERGE] forward port branch 9.0 up to 9cc799f511 2017-07-07 14:00:39 +02:00
Martin Geubelle 5241d479b2 [FIX] *: add color option on m2m_tags widgets in kanban
There is a bit of magic in the kanban with many2many: the widget many2many_tags
is automatically set on many2many fields.

Since the previous commit, the `color_field` needs to be explicitly stated
in the options for the tags to be colored.

In kanban views where tags were previously colored, we thus have specified the
widget and the color option.
2017-07-07 13:40:50 +02:00
Martin Geubelle a29f7f671b [FIX] *: explicit color_field attribute for m2m_tags
Since the previous commit, the `color_field` needs to be explicitly stated
in the options for the tags to be colored.

The previous behaviour (always read the field `color`) was leading to server
warnings if the field was not present on the comodel.

Thìs commit set the `color_field´ for every many2many_tags on fields that have
a `color` field on the comodel.
2017-07-07 13:40:50 +02:00
Martin Geubelle e26ccdd0b6 [FIX] web: explicit color attribute for m2m_tags
Before this fix, the field 'color' was hardcoded in the m2m_tags widget,
which means that:
 - one couldn't specify another field (problem for custom models, with x_...)
 - if the related model didn't have the field 'color', a warning was raised
   by the server

Now, the color attribute needs to be specified on the widget options if one
wants to display colored tags.

If the color is not specified, the tags will be displayed in grey.
2017-07-07 13:40:36 +02:00
Yannick Tivisse 15aa164eaf [FIX] account: Fix forward-port mismatch on res_config.py 2017-07-07 11:38:16 +02:00
qdp-odoo 1fda216887 [FIX] l10n_fr_certification: set auto_install to False
Due to recent decision by the French government this might not be mandatory for french companies
2017-07-06 17:01:33 +02:00
Yannick Tivisse afefa1b771 [FIX] account: Display the correct records on 'Invoice' button
Currently it shows all the invoices, not the sales invoices that are paid or validated
2017-07-06 16:47:40 +02:00
Yannick Tivisse 1f277a3572 [FIX] account: Bring back the 'Invoice' stat button on partner form
It has accidentally disappeared in saas-15.
2017-07-06 16:17:23 +02:00
Géry Debongnie 56dae80994 [FIX] web: prevent crash with invisible x2m and onchanges
When an invisible x2many field is modified by an onchange, we had a
crash because the reset function did not return a deferred in that case.

This happens because the signature of _render in AbstractField allow for
an undefined return value, but the reset method should return a
deferred.

This was an issue for example in stock: editing the
pack_operation_product_ids one2many field in a stock.picking could
trigger an onchange on another invisible one2many (with no inline views).
2017-07-06 15:04:04 +02:00
Christophe Simonis 7dc731db83 [MERGE] forward port branch saas-15 up to 1f16d34aaa 2017-07-06 13:54:22 +02:00
Christophe Simonis 1f16d34aaa [MERGE] forward port branch saas-14 up to 5009752dcf 2017-07-06 13:53:17 +02:00
Nicolas Lempereur 1927654977 [FIX] web_editor: typo locale lost promise 7cb865f
There was a lost promise which made website_form loaded before the
languages informations (such as date format) was loaded.

The server expect the format of the client thus that could lead to wrong
or invalid dates.

opw-749544
closes #18074
2017-07-06 13:25:57 +02:00
Christophe Simonis 5009752dcf [MERGE] forward port branch 10.0 up to 1206cc3f7d 2017-07-06 13:05:24 +02:00
Christophe Simonis 1206cc3f7d [MERGE] forward port branch saas-11 up to 5f7f3209e0 2017-07-06 12:30:51 +02:00
Christophe Simonis 5f7f3209e0 [MERGE] forward port branch 9.0 up to 2b06da6ed0 2017-07-06 12:10:12 +02:00