Commit Graph
122244 Commits
Author SHA1 Message Date
Goffin Simon edc1cbc063 [FIX] stock: To prevent settig a wrong uom
Steps to reproduce the bug:

- Configure to use UoM
- Make an inventory adjustment for all product
- Select one product one the inventory line, and select the UoM

Bug:

All the UoMs were selectable but only the uoms in the same category of
the product are allowed.

opw:1911941

closes odoo/odoo#29238
2018-12-04 10:33:31 +00:00
len-odoo 24f7c7ce7f [FIX] web: add support for string and invisible attributes in pivot view
The pivot view may sum fields that are not really summable:
    unsigned values (e.g. in the case of refunds)
    values in different UOM, currencies (any different units really)
Which causes confusion when these fields are displayed.

We add support for the string and invisible attributes in the pivot view,
so that a field can be given a more informative name or hidden altogether.

opw 1909046

closes odoo/odoo#29144
2018-12-03 15:03:58 +00:00
Goffin Simon 7b20604f2e [FIX] website_sale: Missing fields in the product form
When installing ecommerce app in a fresh v12 database
the fields invoice_policy and description_sale were missing in
the product.template view form

opw:1911612

closes odoo/odoo#29059
2018-11-29 08:40:04 +00:00
Robot Odoo 2bfbcf5245 [FIX] survey: fix various issues in customer view about datetimepicker
Survey has troubles displaying correctly the datetime picker widget
especially when more than one has to be instanciated. This merge fixes
several issues related to the datetime widget when displaying the survey
in customer (front-end like) view.

See sub-commits for more details about each change.

This merge is related to task ID 1912194.

closes odoo/odoo#28966
2018-12-04 12:55:29 +01:00
Goffin Simon 484d335789 [FIX] payment: Manage your payment methods on website
The link "Manage your payment methods" didn't work on the website because
the variable acquirers is a list of records.

This list has been created in function "payment_method" with the route
'/my/payment_method'

opw:1913299

closes odoo/odoo#29142
2018-11-29 16:14:04 +00:00
Goffin Simon c2e3d3a779 [FIX] stock_picking_batch: Barcode not displayed in report_picking_batch
The barcode was never displayed in report_picking_batch.

opw:1910478

closes odoo/odoo#29103
2018-11-28 14:52:51 +00:00
Nicolas Martinelli 38f00af5d1 [FIX] event: badge layout
When printing the badge of an attendee, several information are not
shown. This is due to the BS4 migration.

Closes #29195

opw-1912074

closes odoo/odoo#29221
2018-12-03 14:32:56 +00:00
Alexandre Kühn 7cdfe99d44 [FIX] mail: do not auto-focus new open chat window
Revision on https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c

Before this commit, when receiving a new message from a new DM
or livechat, the newly opened chat window was automatically
focused and marking messages as read.

Chat windows that are automatically opened without any user
interaction, such as when receiving a new message from a chat,
should not be focused. Those chat windows are "passive", and
the user must click on them in order to have focus and mark
messages as read (the chat window is no longer passive as a
result). The bug has been introduced by the refactoring from
the commit above.

In fact, there was a very short period of time during which the
chat window was passive. However, due to the way chat window
server-side state synchronization works, the chat window was
automatically closed then re-opened. This resulted in some visual
flickering of the chat window ('open' > 'close' > 'open'), and
the conversation was automatically marked as read. This was a
consequence of the actions 'open' > 'close' > 'open' that removed
the passive property of the chat window.

Chat window server-side synchronization relies on a notification
that tells the state of the conversation. Due to bad design, this
notification had exactly the same format as the one for notifying
all browser tabs of a newly joined conversation.

This commit fixes the issue by distinguishing "channel join"
and "chat window state" notification, so that the former is not
treated as a chat window notification. It fixes the problem
because it was precisely the "channel join" notification that caused
the chat window to close and loose its passive property.

Task-ID 1914735
opw-1914371

closes odoo/odoo#29223
2018-12-03 16:17:59 +00:00
Nicolas Lempereur 3fd009a7a7 [FIX] l10n_ch: style imp and add 0 on account isr
It has been reported that it would be nice to have font OCRB all over
the report and number in boxes (for the ISR version of amount with
boxes).

This commit do some tweaks and adapt positions and font-size to do this.

Also a shortcut for an account number can be used in switzerland
(see d9448d7389), but in the ISR scanline the account number must be
fully printed so this commit do the zero padding (on the middle part of
the account number).

opw-1903608
closes #29000
2018-11-30 15:38:44 +00:00
Xavier Morel bedd4be0ed [FIX] doc: line blocks to literal
closes odoo/odoo#29219
2018-12-03 10:59:34 +00:00
Sébastien Theys 1d45184630 [FIX] website,website_hr_recruitment: fix crawler (job url)
Commit 2ab6ce80d6 introduced an issue where the
URL for new job offer was added in the DOM even when website_hr_recruitment is
not installed.

This is a problem because the crawler tries to navigate that URL and returns an
error because the route does not exist without website_hr_recruitment.

closes odoo/odoo#29217
2018-12-03 10:35:06 +00:00
len-odoo 8f3ac2530f [FIX] base, partner_autocomplete: remove vat from the partner selection field
Commit a6e1eb9f0a
introduced the show_vat context key, that displays the Tax ID of a customer
after its name when present, similarly to show_address.

However it appears on the field when being edited, then disappears at save,
which is confusing.
Other unclean things tended to happen: you would have "name - taxid" on customer
field, but "name" on invoice address and delivery address.
Furthermore a client could edit the name manually to erase the Tax ID, and thus
recreate a new record for the same customer.

We introduce a method to clean the name from the Tax ID, and use it so that it
is directly the client's name that is selected at edit.

Note that we also replace the standard dash in the 'name - taxid'
by a figuredash (‒, U+2012) so as to avoid potential egregious splits
because of legitimate customer names.

Similar to commit: 3cbfc40303
(same thing for show_address)

opw 1911954

closes odoo/odoo#29189
2018-12-03 09:23:33 +00:00
Lucas Perais (lpe) 9d1aa41bfb [FIX] account: randomize invoice reference if no match
Take explanation of
commit d94e8a0
but this time, have a suffix with a flavor of %(year)s

Before this commit, validating the invoice crashes

After this commit it doesn't.

OPW 1912954

closes odoo/odoo#29160
2018-12-03 08:45:05 +00:00
Lucas Perais (lpe) 31d1a62bb3 [FIX] point_of_sale: typo in event handler
OPW 1914014

closes odoo/odoo#29194
2018-11-30 16:26:15 +00:00
Olivier Dony 52a6b1e3af [DOC] mixins: remove message_subscribe_users()
It was dropped from 12.0 some time ago by b6d2351df4 and #23377
2018-12-03 02:22:57 +01:00
Odoo Translation Bot 1208ac6ce3 [I18N] Update translation terms from Transifex 2018-12-02 01:25:05 +01:00
Toufik Ben Jaa f289c9ceef [FIX] payment: set correct payment communication
- When a payment is done through a `payment.transaction` the
  communication should be the transaction's reference instead of its
  invoices reference.

closes odoo/odoo#29187
2018-11-30 12:53:37 +00:00
Raphael Collet 6a71a68046 [FIX] models: onchange sends all fields upon change in x2many
On a record with a large x2many, the web client does not load all the data of
the lines (because of paging).  If a line is modified by an onchange, at some
point the client will determine whether lines are valid (all required fields
are provided).  It is possible that the client cannot evaluate the validity of
the modified line because of missing fields.  In order to avoid this situaion,
the server sends all fields on modified lines.

closes odoo/odoo#29177
2018-11-30 09:57:11 +00:00
William Henrotin a226723e52 [FIX] mrp: avoid accessing empty data
Once we log an exception via next activity in a production, we search moves that have been updated uphill to write the useful information about the change. The issue is by default, the key 'move_orig_id' is searched while some moves could be linked with 'created_purchase_line_id' key.

This commit avoid mapping 'move_orig_id' on empty recordset and so avoid a traceback.

opw:1911399

closes odoo/odoo#29087
2018-11-30 08:47:34 +00:00
Géry Debongnie 25d63eee7c [FIX] web: prevent crash in some cases (o2m)
Recent works in the orm (see [1] for example) changed the behaviour of
the server in the case of onchanges: it tries to optimize Odoo by
sending a minimal diff to the web client in onchanges.

Concretely, this means that the web client receives commands 4 (link to)
instead of command 1 (update + record data). It also sends a minimal
diff in that case. This is a big issue for the web client, because it relied
on the knowledge of the data from the command 1 to be able to evaluate some
modifiers.

The good news is that we can mitigate the issue in one case: we do not
actually need to evaluate the modifiers in the case of a command 4
(comming from the server), because we can assume that the record is
valid. So, we simply bypass the check in that case.

Note that this should fix most of the problem, but a deeper problem
still remains: a crash can still happen when an onchange modifies a
record in a one2many (but in a different page), and we also have a
modifier which needs to be evaluated.

opw: #1904514

[1] https://github.com/odoo/odoo/pull/29086

closes odoo/odoo#29172
2018-11-30 08:56:29 +00:00
goliveirab fd9b2c9f36 [FIX] account: Bad query
Fix Error:

`ERROR: syntax error at or near ")"
LINE 7: ...        WHERE full_reconcile_id IS NULL and account_id IN ()`

This can occurs when:

- using write to some account like:

`some_account.write({'reconcile': True})`

closes odoo/odoo#29164
2018-11-29 21:23:47 +00:00
Christophe Simonis 82a1e1dcc3 [FIX] hr_expense: adapt test to new demo data 2018-11-29 19:18:56 +01:00
Christophe Simonis f5c3dafb04 [MERGE] forward port branch saas-11.3 up to c0eef42711 2018-11-29 18:38:55 +01:00
Christophe Simonis c0eef42711 [MERGE] forward port branch 11.0 up to 962298c920 2018-11-29 16:13:28 +01:00
Denis Ledoux 5644ab53ab [FIX] sale: improve team pipeline dashboard quotation counts performance
Doing the `read_group` on `sale.order` rather than
`sale.report` to get the quotations amount and count
significantly improve the performance (5x faster on big databases).

This is because `sale.report` is a view,
with a bunch of fields taking time to compute / fetch.

Besides, the algorithm to get the number of quotations
was an heuristic based on the "group by name" on the `sale.report`,
which was not as precise,
as multiple quotations could potentially have the same name,
and slowed down the query,
because it returned one line per quotation,
versus one line per team with this revision.

closes odoo/odoo#29139
2018-11-29 11:46:22 +00:00
Denis Ledoux 9fbac5fcbb [IMP] crm: improve team pipeline dashboard leads/opps counts performance
The team pipeline dashboard fields
`unassigned_leads_count`, `opportunities_count`, `opportunities_amount`

do a big search on leads, filtered
by type (lead/opp), team, and unassigned user_id (salesman)

Adding an index on user_id, team_id, type significantly
improves the filtering, and therefore the dashboard rendering,
especially when displaying a few teams only
e.g; the teams you are part or responsible of.

The index on `user_id` is removed,
as it become a duplicate as `user_id` is the first column
of this new index.
2018-11-29 11:46:22 +00:00
Nicolas Lempereur 8e7c255237 [FIX] *: fix % in translation not on transifex +da
Fix issue of %s or %(name)s present in source but not in translation
in language not available on transifex.com/odoo/

Also correct a account danish (da) translation that was reported to be
an issue.

closes #29100
2018-11-29 12:52:45 +00:00
Nicolas Lempereur cad04fa0ea [FIX] mail: have signature in chatter by default
The signature is shown by default when sending a mail and in particular
case it is not shown.

In c8d283a592 there was a small regression that in some instance the
signature that was shown before is not shown anymore. This is because
the default in those instance is to not show signature.

eg. a message sent in a chatter would not have signature in sent emails

With this commit, the previous behavior is reintroduced.

opw-1903001
opw-1896262
closes #29088
2018-11-29 13:48:51 +00:00
jem-odoo 798b77bbd3 [FIX] sale_timesheet: missing onchange
The onchange is defined on the projduct.template, but the user
can edit the product configuration from a SO: it will be the
form view of product.product.
This commit applies the onchange of the product template
on the product product.

closes odoo/odoo#29140
2018-11-29 10:47:55 +00:00
Toufik Ben Jaa e8b5ef5b5e [FIX] purchase: crash on portal when no product image
- Since commit https://github.com/odoo/odoo/commit/8108a60dc38432243bef4f934784b119c77cf91d the purchase order crashes if a
  `purchase.order.line` product has no image.

  This is due to the fact that we pass a boolean value (False) to the
  function `image_data_uri` on the template `purchase.portal_my_purchase_order`
  which crashes.

closes odoo/odoo#29137
2018-11-29 11:24:16 +00:00
Olivier Dony 52a970bce3 [FIX] base: make demo install warning more prominent
Users may not notice the warning and carry the risk of irreversibly
damaging their production database. Making the warning message more
frightening should help avoid this.

closes odoo/odoo#29128
2018-11-29 11:13:39 +00:00
Nicolas Lempereur 962298c920 [FIX] website: es_* translation typo
The translation had wrongly `</ i>` which from a report broke some
initialization of some snippet of the website editor.

es_CO, es_DO, es_EC languages are not available in transifex so this
change is done manually for them.

opw-1907752
closes #29135
2018-11-29 10:43:45 +00:00
jem-odoo 3f8519f1a4 [FIX] hr_timesheet: project stat button on analytic account
Before this commit, when more than 1 projects are linked to
a same analytic account, clicking on the stat button from the
form view of analytic account, nothing happens.
This commit fixes this case by displaying the kanban view
of all the project linked to this analytic account.

closes odoo/odoo#29131
2018-11-29 09:42:26 +00:00
Gustavo Valverde 8de2025ac5 [FIX] l10n_do: multiple corrections
1. Update tax Groups with N07-2018
   Restrict Tax groups just to the 5 available in Norma 07-2018:
   * ITBIS
   * ISR
   * ISC
   * Propina
   * Otros Impuestos
2. Do not use 'none' to hide taxes
   This affect taxes reports, as those reports evaluate the
   type_tax_use field
3. Rename Taxes and Description for N07-2018
4. Change group taxes name and missing childrens
5. Add account groups to template and CoA
6. Add various missing data

opw-1912626

closes odoo/odoo#27172
2018-11-29 08:14:11 +00:00
len-odoo a48a4b1c0b [FIX] web_editor: remove embed video option when composing an email
Embedding a video can't work because it embeds an iframe, which is not supported
by most email clients for security reasons.
(What happens when Gmail shows embedded videos in displayed emails, is that you
send a link in the email body, and it is at rendering that Gmail adds the iframe
into the page.)

In true bugfix fashion, we hide the button.
When the "res_model" is "mail.compose.message", we generate a widget with the
noVideo option.

Essentially a foward-port of v11 commit: 264f89f63f

opw 1905497

closes odoo/odoo#28912
2018-11-29 07:58:40 +00:00
Robot Odoo 05d31187d4 [MERGE] account: Improve partner suggestion in the reconciliation widget
See commits for more details.

-task:
https://www.odoo.com/web#id=1909317&model=project.task&view_type=form&menu_id=
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#28758
2018-11-29 12:32:26 +01:00
Hetashree Chauhan a5f31c324b [FIX] sale: reload targeted value
Before this commit:
when user set any target invoicing value he/she needs to refresh the
page.

After this commit:
As soon as user set the target invoice value it shows on the dashboard,
no need to refresh the page.

This commit is related to master bug

opw-1902250

closes odoo/odoo#29129
2018-11-29 09:08:50 +00:00
Robot Odoo 5a57420e48 [MERGE][FIX] portal, *: stop breaking behaviors on dblclick
* web, website, payment, website_sale

See sub-commits for details.

closes odoo/odoo#29001
2018-11-29 11:28:28 +01:00
Christophe Simonis 4ac0019bc2 [FIX] hr_expense: adapt test to new version 2018-11-28 18:20:09 +01:00
Christophe Simonis efe7ca16b7 [MERGE] forward port branch 11.0 up to bb6f6c57f9 2018-11-28 17:44:46 +01:00
qsm-odoo 02dcef80c9 [FIX] portal, *: stop breaking behaviors on dblclick
* payment, website_sale

This commit solves the problem described in the issues mentioned below
by using the new system introduced by the parent commit.

That new system is even more integrated with website "animations" but
the mentioned issues' features are not yet converted to use those (this
will be a master task to make "Website Widget" be defined in portal to
use all of those integrated features). This commit however converts an
already protected behavior of website_sale using that "animation"
integration.

Closes https://github.com/odoo/odoo/issues/27976
Closes https://github.com/odoo/odoo/issues/28704
2018-11-28 16:11:24 +00:00
Lucas Perais (lpe) c432667fbf [FIX] base,web_editor: get_view_id should return singleton
Because of 9a98a4d60e
and since the key of an ir.ui.view cannot be unique
(multiwebsite), duplicating views made several parts of Odoo crash

After this commit, we limit to one the views that are searched with their key
Responsibility is given to the user to change the priority and/or the key
in order to predict which view will be taken

OPW 1913335,1913100,1913186,1913112,1913240

closes odoo/odoo#29105
2018-11-28 15:26:48 +00:00
Christophe Simonis bb6f6c57f9 [MERGE] forward port branch saas-15 up to 925210714f 2018-11-28 16:13:24 +01:00
qsm-odoo 4f3635b2b1 [IMP] website, *: add event handler possibilities
* web

This commit introduces helpers for async handlers, especially for button
clicks. Those helpers are now used automatically for website widgets
(animations) if the 'async' word is placed in front of a handler name
in the `events` key definition.
2018-11-28 15:00:42 +00:00
Christophe Simonis 925210714f [MERGE] forward port branch saas-14 up to 8ee67f2a19 2018-11-28 15:43:17 +01:00
Robot Odoo 34b26bc7d6 [IMP] hr_attendance: faster loading of employees kanban view
**Description of the issue/feature this PR addresses:**

Addon hr_attendance adds a check_in/check_out status icon in every card of the employee kanban view. The status is figured out using computed field ``attendance_state``, itself relying on a computed Many2one field, ``last_attendance_id``.

The current way to compute the latter field seems to fetch all attendances before getting the most recent one. For each employee. Which causes the employee kanban view to load very slowly (~30 sec in 90-employee Camptocamp's instance).

This PR suggests to load only the last attendance entry.
Co-authored with @guewen

**Current behavior before PR:**

Employee kanban view loads very slowly.

**Desired behavior after PR is merged:**

Employee kanban view loads reasonably fast.

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#28953
2018-11-28 14:49:44 +01:00
Christophe Simonis 8ee67f2a19 [MERGE] forward port branch 10.0 up to 42c42832b3 2018-11-28 14:41:28 +01:00
Goffin Simon c05abb2db8 [FIX] sale: Wrong amount amount invoiced in sale.report
Steps to reproduce the bug:

Let's consider a product P with a unit price = 10

- Create a SO for two lines of the same product P
- Validate the SO and create the invoice
- Refund the invoice and validate it
- Go to Reporting > Sale report and select "Invoiced amount" as measures

Bug= -20 was displayed for the invoiced amount.

Technically, the two refund invoice lines of P were used two times in function
_compute_invoice_amount because for each SO line we catched all the refund lines
of the same product.

opw:1906445

closes odoo/odoo#29095
2018-11-28 12:34:55 +00:00
len-odoo d1490e2777 [FIX] mail: do not have _get_message_needaction crash on empty task list
Suppose that a Task is added on a task via a studio customisation.
Then the _get_message_needaction method gets called on the onchange of the
toplevel task, which triggers another call to _get_message_needaction.
During that update, we get a self with a model.newID; its ids field is empty,
so the list of tasks res itself is empty.
As a result the method crashes on a malformed query.
This can in turn prevent the completion of some higher-level operation,
e.g. a state change on the task.

opw 1909043

closes odoo/odoo#29084
2018-11-28 09:11:28 +00:00
Lucas Perais (lpe) 2e109db01b [FIX] web: context orderedBy not propagated to x2m
Have:
- Model A with a x2m to model B
- Object A with multiple objects B in x2m (that will be sorted)
- On the list view of model A, click on a column to sort by a field
- this field shall not exist in B
- open a record A (towards form view)

Before this commit, the sorting of the x2m crashed, because the key orderedBy was propagated
Due to commit e713ed2a69

After this commit, it doesn't crash

OPW 1913133

closes odoo/odoo#29094
2018-11-28 09:35:39 +00:00