Commit Graph
130869 Commits
Author SHA1 Message Date
Raphael Collet 4b1cb41cf7 [FIX] models, fields: cache consistency for one2many fields
Issue: after many2one updates, the cache of the corresponding one2many
fields was inconsistent when the latter depends on `active_test`.  One
of the values in cache was updated, while the other was left intact.

We simplify the cache by not making the field depend on context: the
cache value contains all the records in the relation (corresponding to
`active_test=False`).  The value of the field is automatically filtered
by the `active` field when the value is accessed.

This makes it easier to maintain the cache value, guarantees its
consistency, and avoids queries to read the one2many field with
`active_test=False`, after having set it with `active_test=True`.
2019-09-30 15:42:36 +00:00
Pierre Rousseau 333f1087cf [FIX] stock_sms: do not send mail notifications
The aim of this commit is to remove the mail notifications when there is no more credits on IAP accounts for SMS integration with stock.

Task-ID 2077783

closes odoo/odoo#37559

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2019-09-30 12:32:06 +00:00
Pierre Rousseau 3469821b73 [FIX] crm_iap_lead: set status readonly
The aim of this commit is to set the state readonly in the tree view.

Task-ID 2077783
2019-09-30 12:24:24 +00:00
David Beguin fed533bcf2 [FIX] livechat : fix rating per user in livechat frontend view
rating_per_user was instanciated the wrong way, as all the key pointed to the
same reference. Once a value was modified in the value dict, all the other
values in rating_per_user were also updated.

Task ID: 2076656
PR #37511

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-30 15:54:51 +00:00
David Beguin c7d6fc84a8 [FIX] rating : set rating_last_image/feedback to readonly
It's a non sense to be able to write on rating_last_image/feedback field as it is a related
to a computed field based on the last rating, given by someone.
We should not even try to corrupt data !

Task ID: 2076656
PR #37511
2019-09-30 15:54:51 +00:00
David Beguin 41b2d9cc86 [FIX] livechat : use main rating image instead of white one for livechat frontend view.
As the percentage bar is translucid, white rating icon is not really easy to see.
Using the main rating image - red for :(, orange for :| and green for :) - is more
convenient.

Also, this fixes the height of rating chart as the bottom border was not visible when 0%.

Task ID: 2076656
PR #37511
2019-09-30 15:54:50 +00:00
David Beguin 8d359aa5a5 [FIX] livechat : use visitor name when visitor start livechat
If the visitor starts a livechat session, his anonymous name was 'Visitor'.
Since visitor info are now stored, we can use the visitor name instead, if a visitor
can be retreived.

Task ID: 2076656
PR #37511
2019-09-30 15:54:48 +00:00
David Beguin 74fa5c2955 [FIX] livechat : add placeholder to receive conversation copy and fix translation
This commit adds a placeholder to the field where the visitor has to put his email
to be more self speaking. (Otherwise, the visitor could not know what to put on this field)

Task ID: 2076656
PR #37511
2019-09-30 15:51:20 +00:00
David Beguin f15a4a31cf [FIX] livechat : do not close livechat after feedback-rating, positive or negative
Since there is now a possibility for the user to ask a copy of the conversation,
livechat window should not be closed after feedback, to let the user choose to
receive a copy.

The behaviour was no aligned between positive and neutral/negative feedback.
Before, when sending a positive rating, the rating was not sent as a message on the channel
and the window didn't close.
But for neutral/negative feedback, the window was sending the rating as a message on the channel
but the chatter closed immediately.

Now, the rating is sent as a message for any type of rating.
If this is a neutral / negative rating, the reason field appears.
After sending the reason, the window stays opened.

Task ID: 2076656
PR #37511
2019-09-30 08:07:41 +00:00
Katherine Zaoral 8de9ce5f7a [FIX] l10n_ar: data and demo data
- AFIP code in UOMS saved as char
- fix missing account_id in demo data
- Remove demo data that was throwing error
- merge res country data to csv file.
- move res currency AFIP code data to csv file

closes odoo/odoo#37457

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-09-30 15:02:00 +00:00
Julien Mougenot 652414ca4e [FIX] web: grouped list multi edit with m2m
Before this commit, m2m fields were not updated when multi editing
in a grouped list.

Now, the fields are updated no matter how many levels of groupBys
are applied to the list.

Part of task 2078807

closes odoo/odoo#37589

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-09-30 12:53:18 +00:00
Romeo Fragomeli 53bb1387b5 [FIX] web: control panel: error by clicking on padding on mobile
o_control_panel have this layout:
 +-------------------------------------+
 |  PADDING                            |
 |  +----------------------------------+
 |  |  breadcrumb      o_cp_searchview |
 |  |  o_cp_left       o_cp_right      |
 |  +----------------------------------+
 +-------------------------------------+
As you can see, there is a padding on the edge of the widget.

In Odoo 12.0, before the control panel refactoring (odoo/odoo@40dd121938)
the search view was a widget by itself (addons/web/static/src/js/views/search/search_view_mobile.js).
Note that in this case, once the following condition:
"ev.target === this.el" was reach the normal behavior
was executed.

But now the search view is embedded in the control panel.
There is a side effect: clicking on the padding of the control panel
triggers the "_onOpenMobileSearchView" and the condition is always true.
Therefore we try to open the search more even if it doesn't exist.
But anyway, the search view (full) shouldn't be opened when we click on
the control panel.

After this commit, the listener is scoped to o_toggle_searchview_full,
to avoid this side effect.

Steps to reproduce:
* Open any app with a control panel (e.g. accounting)
* Select a record (e.g. an invoice)
* Click on the padding of the control panel (BUG)

closes odoo/odoo#37587

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-09-30 12:27:57 +00:00
oco-odoo fdc3555c8d [IMP] account: filter receivable and payable accounts so that they are not selectable as tax accounts on repartition lines
closes odoo/odoo#37572

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-30 09:21:36 +00:00
oco-odoo 2727b383b9 [IMP] account: filter tax tags on account.move form view
So that we only allow chosing the ones that are available for taxes, in the right country.
2019-09-30 08:48:33 +00:00
Antoine Vandevenne (anv) 897a4baecf [IMP] product(_matrix): clean demo product for matrix
Before this commit, the product 'My Company Tshirt' had too much PTAL and PTAV which lead to an overloaded matrix.

This commit removes the 'Sleeves' attribute, reorder the other attributes and remove the Size attributes '2XL' and '3XL'.

task-2052537

closes odoo/odoo#37543

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-30 11:57:18 +00:00
Antoine Vandevenne (anv) 06bd183ec2 [IMP] product(_matrix), *: add configurator hint to template name
Before this commit, it wasn't easy to find a demo product template that opens either with the product configurator or with the matrix from a list view.

To fix that, this commit appends '(CONFIG)' to the name of all demo product templates that open with the product configurator and '(GRID)' to all demo product templates that open with the matrix.

task-2052537
2019-09-30 11:56:24 +00:00
Romain Derie 3408c4dd1e [FIX] http_routing: restrict lang matching to installed lang
When accessing an URL, there is some computation to check if you try to access
a lang. Part of this job is to get the closest language available.
For instance, you could try to get `/fr_BE/..` and it would redirect to
`/fr_FR/..` if french is installed but not belgian french.

There is a known issue when loading files/assets from a module starting by the
same letter than a lang, in debug assets.
Only reported case was `hr_XXX` modules which would be redirected to `hr_HR`
lang (croatian).

So, the issue would only occur when:
1. Debug assets is enabled
2. hr_HR lang is activated
3. only hr_XX modules would be impacted

But since 269aa59411, the issue would appear even if `hr_HR` was not activated.

This commit restore the issue to its minimal case, when `hr_HR` lang is
activated.

closes odoo/odoo#37494

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-09-30 14:04:07 +00:00
ryv-odoo 8d7004b5d4 [FIX] mass_mailing_sms : fix display name contact list
- In the sms marketing app, the count of valid sms
recipient for contact list was not consistent in all app.
Fix by appling the mailing_sms context value also in the
mailing mailing form.

TASK_ID : 2075733

closes odoo/odoo#37248

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-30 14:28:30 +00:00
ryv-odoo 32a74bea01 [FIX] mass_mailing : move name for mass mailing.
The name for a mass mailing is now automatically generated, then
put the name field in settings and only visible/editable on debug mode.

TASK_ID : 2075733
2019-09-30 14:28:30 +00:00
ryv-odoo 0d513785f7 [FIX] mass_mailing : fix editable tree view
- Now tree view is editable, because of that it was possible to change
subject and targeted model in mass mailing. Fix make it readonly explicitly.

TASK_ID : 2075733
2019-09-30 14:28:30 +00:00
ryv-odoo 100249f172 [FIX] mass_mailing_sms : sms on record chatter
- For the sms marketing, by default the sms is now log
on the chatter of the record (like with the sms composer).
But can be disable it with keep arhives unchecked (in debug mode only).

TASK_ID : 2075733
2019-09-30 14:28:30 +00:00
ryv-odoo b002973f0e [IMP] sms - mass_mailing_sms : unsubscribe sms improvement
- In the sms marketing, the sms_allow_unsubscribe is now False by default
and move the field in the setting page.

- Improve the unsubscribe link for the sms : adding "\nSTOP SMS : "
message before the link.

TASK_ID : 2075733
2019-09-30 14:28:28 +00:00
ryv-odoo 2d5260e11b [FIX] sms - mass_mailing(_sms) : small fixes
- In the mail/sms marketing, when we send a mass mailing (sms or not)
with the mailing list selected, all the mailing list is take in account,
domain is not correctly modify. Fix the onchange function.

TASK_ID : 2075733
2019-09-30 09:37:11 +00:00
ryv-odoo e572187af3 [FIX] mass_mailing_sms : small view bugfixes
- In the sms marketing form view, a space is missing between the text
and a next_departure field -> Fix

- In the sms marketing form view, the sms content is now required
order to fix traceback due to a empty sms (when the sms was send).

- In the the sms marketing tree view : change the name field
with the subject field
(due to the change with name -> subject of mailing)

TASK_ID : 2075733
2019-09-30 09:31:59 +00:00
ryv-odoo 70519489e9 [IMP] mass_mailing(_sms) : improve mail/sms marketing forms
- In the mail/sms marketing form, compress all blue ribbons into
one to avoid multiple space between ribbons.

- In the sms marketing form, we add a clicked stat button to have
the same information that the kanban view.

- In the mail marketing form (when sms is enabled), when the state is in draft, stat buttons
opened and replied was present for no reason (only with sms marketing installed).
Fix by adding correct invisible condition.

TASK_ID 2075733
2019-09-30 09:27:17 +00:00
ryv-odoo eebeefcf8b [IMP] mass_mailing(_sms) : revamp/fix mail marketing views
- Revamp the kanban view of the mass mailing (and mass SMS)
model to be more concise and readable. Also fix the issue of no border progress
bar in community version (same view).

- In the kanban view of mail marketing, when mailing list model is
targerted, the count of record was not correct.
Create a display condition if mailing list is used to fix the issue.

TASK_ID : 2075733
2019-09-30 09:17:29 +00:00
Lucas Lefèvre d43a63d5f6 [FIX] hr_holidays: Automatically set leave dates with 2 week calendar
Commit c7f11aa fixed computation leave length but
forgot to adapt the code when a 2 week calendar is used.
This leads to a traceback when creating a leave for an employee
with a 2 week calendar.

This commit rectifies this.

closes odoo/odoo#37566

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-30 12:29:58 +00:00
Simon Lejeune ad31097d8e [FIX] stock, delivery: put in pack and discard
rev[0] writes the qty done on the move lines directly in put_in_pack,
meaning hitting discard in the delivery wizard left the move lines with
a changed qty_done. We fix that by editing the quantities in
_put_in_pack in the stock module and getting the right move lines in the
delivery modules: meaning, get the normal or suggested ones (a fix
missed by rev[1]) then with quantities or 0 quantities.

[0] e03c1a836f
[1] f6d88a2e8d

closes odoo/odoo#37563

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-30 11:58:38 +00:00
Jigar Vaghela 92d57bafd5 [IMP] l10n_in: GSTIN number value from journal gstin partner insted of company vat
closes odoo/odoo#37471

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-09-27 11:39:39 +00:00
Jigar Vaghela ea9e8a37d6 [IMP] l10n_in*: multi GSTIN Using journal
=======
Purpose
=======

    government rule that "GST registration should be obtained by a taxable person under GST in each of the State or Union Territory, from where the taxable supply of goods or services is made"
    So we managed this using journal
    User create journal and partner for other states
    After user can select journal in Sale order, Purchase order and warehouse

========
Solution
========

    -Add a field on the journal to define the GSTIN
    -Add sale and purchase journal field in warehouse
    -On the SO/PO, add the journal field and based on the warehouse journal it set automatically fill if warehouse journal is set.

task 1917619
2019-09-27 11:39:39 +00:00
RomainLibert 85eeaccf06 [FIX] tools: use user friendly message in case of error
closes odoo/odoo#37058

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-18 10:14:12 +00:00
wan f60acb4f49 [FIX] account_bank_statement_import: unused variable
There was a useless variable left at the refactoring of https://github.com/odoo/odoo/commit/97c3f0f0257774af0e064b0085e2b6c5b65d9efe

closes odoo/odoo#37020

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-30 11:25:59 +00:00
Simon Lejeune 971c376c5c [REV] mrp: Explicitely label by-products
This reverts commit 42834e4eb3.

finished_workorder_line_ids contains finished products and by products.
Naming the section by-products is not clear when the settings isn't
enabled.

closes odoo/odoo#37588

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-30 11:31:03 +00:00
Debauche Stéphane 2dc1f2ea73 [FIX] rating, typo error in `_compute_rating_image`
closes odoo/odoo#37583

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-30 11:08:34 +00:00
qsm-odoo bd701e1e03 [REF] website_theme_install: remove dead code in theme install code
closes odoo/odoo#37569

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-30 10:00:51 +00:00
Xavier Morel 0c7f7b186d [FIX] web, mail: move admin login warning to mail
Fixes #33254:

* was in mail despite using mail.channel (which breaks if mail is not
  installed, and web doesn't depend on mail)
* changes to sudo() broke previous behaviour (of having odoobot
  message the admin, we ended up with the admin messaging themselves)
  so fix that
* also get the channel and message with the user's context, otherwise
  since we're during the login procedure the context could be as
  little as just the lang from the browser and apparently channel_get
  automatically creates a translation which would break if the
  browser's lang is not installed in Odoo

closes odoo/odoo#37580

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-09-30 10:34:42 +00:00
Jairo Llopis 974913c316 [IMP] Support psycopg2.sql module
[`psycopg2` includes a submodule called `sql`][1] which provides more safety and comfort when dealing with raw SQL queries.

As of today, it works fine with Odoo unless SQL query logging is enabled.

This patch fixes that problem, allowing usage of that module.

[1]: http://initd.org/psycopg/docs/sql.html

closes odoo/odoo#37561

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-30 08:08:07 +00:00
Vincent Schippefilt e06117bd85 [FIX] web: multi-hell-ditable list
only activate multi-edit on list with specific attribute.
When the attribute multi_edit="1" is set on the tree view the user
can select a/some records and it will activate the multi-edit
with confirmation dialog (even for a single record).
Also, on-change are not applied when using multi-edit

closes odoo/odoo#37525

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-30 08:57:23 +00:00
Romeo Fragomeli e8301cacb7 [FIX] account: missing fields in invoice line form view on mobile
Due to the merge of account.invoice.line and account.move.line
some views doesn't exist anymore.
On desktop, we only need editable list view to do the job but
it's not the case on mobile!

On mobile, the kanban view is loaded instead of "tree" and
the form view is opened when we add a record.
Before this commit, the corresponding form view wasn't usable
on mobile and some fields were hidden like product_id.

As kanban view and form view are important on mobile, we get them
back like on saas-12.3. So the workflow is quite similar as before.

Steps to reproduce:
* Open Odoo in mobile
* Go Accounting App
* Create a new record
* Add a new line
* There is no product field (BUG)

Task ID : 2061797

closes odoo/odoo#37424

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-09-30 09:05:03 +00:00
Geoffroy Larue 9a39194813 [MOV] hr, resource: unavailability methods
Move and adapt gantt unavailability related methods (
_get_work_interval() and _get_unavailable_intervals() ) from
hr.employee to resource.resource. This move allows the unavailability
to be generated for users without related employees (like in FSM in
enterprise).

Task-2069861

closes odoo/odoo#36785

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-09-30 07:59:10 +00:00
Antoine Vandevenne (anv)andRaphaël Collet 5350c6576a [FIX] base_automation: prevent automations from triggering on new records
Before this commit, automations triggering on new records caused onchanges to break out-of-context record rules, hence preventing to create the record.
This commit filters out new records from the list of records matched by the domain of an automation.

task-1998636

closes odoo/odoo#37360

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Co-authored-by: Raphaël Collet <rco@odoo.com>
2019-09-30 07:23:03 +00:00
fw-bot ea11adf982 [FIX] sale: show payment token in sale payment
purpose of this commit is to show payment token while making payment with sale order

before this commit:
in SO payment, there is a filter for s2s acquirer, and becuase of that filter, if brings
tokens of the acquirer which is set to s2s currently

after this commit:
payment token will be shown for particular user, now it will not depends on mode of acquirer

task- 2028285

closes odoo/odoo#37562

X-original-commit: 0ebfe8575a8bac0f6b4c0ba1f1084701d73c4c74
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-30 08:27:13 +00:00
Laurent Smet 223b338f49 [FIX] account,l10n_be: Fix accrual accounting wizard
- Remove the useless domain set on the field.
- Fix the belgium PCMN to work with accrual.

closes odoo/odoo#37560

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-30 07:30:32 +00:00
Richard Mathot cc3f0313a2 [FIX] hr_holidays: don't do accrual allocation of time off for archived employees
opw-2071886

closes odoo/odoo#37451

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-30 05:59:54 +00:00
mreficent 84f7d33f72 [FIX] l10n_si: account_cancel module was removed
In https://github.com/odoo/odoo/pull/36304 was removed the module
account_cancel, but missing remove the dependence. Now is
removed.

closes odoo/odoo#37553

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-29 16:49:40 +00:00
Nicolas Martinelli 01c567c376 [FIX] mrp: Time Cycle computation
- Create a workcenter with a capacity of 500 units
- Create a BOM with a routing generating one work order in the WC
  created
- Create 3 MO with the following real durations:
  MO 1: 1000 units produced in 420.95 seconds
  MO 2: 1000 units produced in 120.28 seconds
  MO 3: 1000 units produced in 60 seconds
- Create a MO for 1 unit

The Duration expected is computed as

The Time Cycle is computed as:
  (420.95 + 120.28 + 60) / (1000 + 1000 + 1000) = 0.20041
The Total Expected is computed as:
  0 + 0 + (1.0 * 0.20041) * (100.0 / 100.0) = 0.20041

0.20041 seconds is not realistic based on the previous MO real
durations.

This is because the Time Cycle doesn't take into account the workcenter
capacity. If we can produce 60 units in parallel in 60 seconds, that
doesn't mean we can produce 1 unit in 1 second. Therefore, the Time
Cycle should be multiplied by the WC capacity, which gives a Time Cycle:

   500 * (420.95 + 120.28 + 60) / (3000) = 100.205

Which is much closer to the real duration.

opw-2070759

closes odoo/odoo#37548

X-original-commit: 9d3a73f64feb3b9e71c50a04adb6206b6393c757
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-27 17:51:21 +00:00
Victor Feyens da5a51eb32 [IMP] product: useless field declaration in product kanban
To simplify sale_renting view inheritance (enterprise).

closes odoo/odoo#36920

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-09-29 17:27:59 +00:00
Victor Feyens 5312368e46 [IMP] sale_product_configurator: empty line on configuration cancel. 2019-09-29 17:27:59 +00:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
Olivier Dony cc6c0c8b21 [IMP] http: remove outdated logic for redirects
Section 7.1.2 of RFC 7231 requires preservation of URL fragment
through redirects. Our old JS redirection code was necessary when
browsers did not consistently implement it. Apart from a few odd
and marginal exceptions they all do it now, so we can stop that.
2019-09-28 03:54:54 +02:00