Commit Graph
126064 Commits
Author SHA1 Message Date
Priyanka Kakadiya facacc3c19 [IMP] website_sale: make tour tooltip more visible
A tour tooltip was targeting a snippet which is at the bottom of the
page, we now target a snippet which is on top of the list so that the
related tour tooltip is more visible.

task-1942742

closes odoo/odoo#31400

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-04-16 09:10:32 +00:00
Geoffroy Larue 7f0d904d3a [IMP] sale_timesheet: profitability report
In the Project Overview, the Profitability report takes into account
Timesheet costs, but doesn't include information on Revenue.
Because of that, the user is missing crucial information to determine
the profitability of a given project.

This commit aims at fixing this issue by sending the user to the
'Project Costs and Revenues' report of the concerned project when
clicking the 'Profitability' button within the Project Overview page.

Task-1963932

closes odoo/odoo#32554

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-04-15 09:32:11 +00:00
Geoffroy Larue 637f19e621 [IMP] sale_timesheet: fix typo
Fix a tiny typo in sale_timesheet.

Task-1963932
2019-04-15 09:01:17 +00:00
jpr-odoo 10ce3f7030 [IMP] website: improve UX for logo/font size changing
This removes the 'V' box and it now validates the entered value when the
user clicks outside the box.

task-1952964

closes odoo/odoo#32291

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-16 06:37:48 +00:00
Romain DerieandMitali Patel bc6a680482 [IMP] sale_quotation_builder: uniformize back button
Before this commit, the back button was a small button top right.
But in other modules, the back button is a full width button, like on /my/order
This commit adapt the back button to have the same style by using the adequate
template.

To do so properly, the `o_portal_fullwidth_alert` div was moved from
`portal.portal_layout` to `portal.frontend_layout`.
That way, templates calling `website.layout` can also use it as it inherits
from `portal.frontend_layout`.

task-1943427

closes odoo/odoo#31387

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>


Co-authored-by: Mitali Patel <mpa@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
2019-04-11 10:30:09 +00:00
Romain DerieandMitali Patel d3a95ccdea [IMP] sale_quotation_builder: uniformize back button
Before this commit, the back button was a small button top right.
But in other modules, the back button is a full width button, like on /my/order
This commit adapt the back button to have the same style by using the adequate
template.

To do so properly, the `o_portal_fullwidth_alert` div was moved from
`portal.portal_layout` to `portal.frontend_layout`.
That way, templates calling `website.layout` can also use it as it inherits
from `portal.frontend_layout`.

task-1943427

closes odoo/odoo#31387

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>


Co-authored-by: Mitali Patel <mpa@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
2019-04-11 10:30:09 +00:00
Swapnesh Shah 634006ad81 [FIX] sale_management: fix field's attribute
on_delete had no effect

closes odoo/odoo#32596

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-15 14:00:22 +00:00
svs-odoo 761cc0d707 [IMP] mrp,stock: more consistent sml button
Set the same icon and title for stock move line buttons and change the
action of the sml button in MRP Unbuild to open stock.move.line model
instead of stock.move model.

Task #1966567

closes odoo/odoo#32570

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-15 12:06:15 +00:00
qmo-odoo 1d578c2026 [IMP] Project: Add group tasks by create_date
This commit adds the possibility to group tasks by
their creation date

Task: #1959603
PR: #32142

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-03-27 08:08:41 +00:00
Kaushalya Mandaliya b93ad321fe [IMP] mail: follower name in confirmation dialog on unfollow
Also fixing test so that it uses an existing follower.

Task-ID 1919551

closes odoo/odoo#31139

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-04-15 11:27:02 +00:00
Prakash Prajapati 5a310619cb [IMP] mail: improve document chat window
1. In the systray messaging menu, when hovering on a notification
linked to a document chat, it now shows an "expand" icon. Clicking
on icon opens the corresponding form view with the chatter.

2. Messages in a document chat window no longer show linked document
in their header, as this is redundant with title of chat window.

3. Font size of words "on" and "from" in header of message in chat
windows have been reduced in order to closely match font size of
document link.

Task-ID 1929169

closes odoo/odoo#30957

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-04-15 11:28:03 +00:00
David Beguin aa5faae41c [IMP] mass_mailing : improve heuristics to handle seen mails
Currently the assumption is that if email field doesn't exist on the target
model the mail field has to be email_from. So if one model is targeted and
does not have a field email nor email_from the seen list will raise as it is
searching at least on email_from on the targeted model table.

Better heuristics implemented here is to apply the same rule as
'get email field' from MailThread.message_get_default_recipients§). It
searches for email_normalized (address mixin), email_from, partner_email
and email fields in addition to partner_id which covers all use cases in odoo.

Related to task ID 1907292
Linked to PR #28535

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-15 09:25:27 +00:00
Thibault Delavallée 732ec79767 [IMP] link_tracker, mass_mailing: improve link tracker, click and mail statistic views
Purpose is to have more information available in list and form views. As
trying to access those models is a technical move let us give users all
necessary information to understand / debug a bit what happens.

Concerning links we add necessary view type and fields to ease understanding
of tracking data. Notably in mass mailing mailing related information is added
for clicks.

This commit is linked to task ID 1924711 and PR #30059.

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-15 09:26:23 +00:00
Christophe Simonis cd4f0d4c11 [FIX] website: activate lang before use
Sane side effect of c7fe955daa do not
blindly set written value to cache.
2019-04-15 11:14:00 +02:00
Christophe Simonis 0a09a4d8a8 [MERGE] forward port branch saas-12.3 up to 120359bf0c 2019-04-12 13:37:44 +02:00
Raphael Collet db97bb7f11 [FIX] *: stupid assignments on non-stored fields without inverse
Some tests had to be adapted because they relied on the buggy behavior:
this was particularly the case when they tried to write on readonly
related fields.

closes odoo/odoo#32460

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-11 14:55:50 +00:00
Sébastien Theys c7fe955daa [FIX] fields: prevent caching wrong value when it's altered by write
Before this commit, the field assignment would cache the value it received, even
if that value was altered during `write`. This can happen if `write` is
overridden (for example to resize images), or it could also happen if a database
procedure is altering the value.

To fix this issue, we do not cache the value that was assigned. This implies
that additional queries may be necessary to retrieve the value, but those were
already necessary most of the time, so it does not have a significant impact on
performances.
2019-04-11 14:55:36 +00:00
Pierre Paridans 1f33ee82d0 [IMP] mail: chat window send message
On a chat window on mobile, the keyboard can be closed by clicking in
the conversation, then there's no way to send your message.

This commit add a "send" icon in the input, after emoji and attachments
icon. Actually the button was already present on mobile but hidden
because of the class o_composer_button_send (used for multiple "send"
buttons). This is fixed by restricting the hidding only to the desired
button.

It also removes an unused 1px top/bottom margin on the thread composer
(wasn't visible as the buttons' background color is the same as their
parent's background).

Finally applying the brand-primary text color on the "send" button only
when not being in a "mini composer" mode instead of globally.

Task ID: 1943863

closes odoo/odoo#32568

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-04-10 07:38:04 +00:00
Martin Geubelle 120359bf0c [FIX] web: restore handle and remove button width on list
Rev. odoo/odoo@9fbb4fb wrongly removed the fixed width on handle and
button width on list views.

This commit restores it.

closes odoo/odoo#32467

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-05 13:37:56 +00:00
Martin Geubelle cdd644befc [FIX] web: correctly update modifiers in editable list with buttons
Since rev. odoo/odoo@015958d it is possible to add buttons in list group
headers. These buttons are defined in <groupby> nodes, pointing to m2o
fields. Modifiers specified on these buttons thus use fields on the m2o
comodel.

There was a traceback in editable list view, when grouping by a m2o
that defines a groupby button with modifiers as the modifiers are not
registered with the same datapoint. When updating the modifiers, one
must ensure that the modifier are related to the updated record.

closes odoo/odoo#32456

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-08 11:23:24 +00:00
Aurélien Warnon b424aba504 [FIX] sale_product_configurator: remove es6 JS code
Task#1964518

This commit removes es6 code that was unintentionaly introduced
by the product configurator for better compatibility

closes odoo/odoo#32452

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-12 06:37:09 +00:00
Christophe Simonis 3fc2577c01 [MERGE] forward port branch saas-12.2 up to be3c981423 2019-04-11 19:27:36 +02:00
Christophe Simonis be3c981423 [MERGE] forward port branch saas-12.1 up to 636df25f21 2019-04-11 18:17:25 +02:00
Christophe Simonis 636df25f21 [MERGE] forward port branch 12.0 up to c9d3653f48 2019-04-11 18:00:27 +02:00
Christophe Simonis e7a0d82c3c [FIX] account_check_printing: correct test
Since 491deeb3d4, only check related to
reconciled invoices are printed. Adapt test to take it into account.
2019-04-11 17:24:25 +02:00
Arnold Moyaux c9d3653f48 [FIX] mrp: state on workorder with 0 batch size
Usecase:
- Go on a BoM with a routing. Go on the first operation and set
the next operation(batch field) as 'Once a minimum number of products is
processed'.
- Set the batch size (minimum operation) to 0.
- Create a MO and plan it.
- The second work order has state 'pending' instead of 'ready'

It happens because the system automatically set the first wo as
'ready' and the following as 'pending' and don't check the batch
and batch_size.

closes odoo/odoo#32628

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-11 13:21:54 +00:00
Hugo Vinicius Garcia Razera 2a88e0197a [CLA] Sign Odoo CLA for hviniciusg
closes odoo/odoo#32591

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-11 11:55:38 +00:00
Yannick Tivisse 87a30cca7d [IMP] l10n_be_hr_payroll: Add an overridable method to compute costs
closes odoo/odoo#32582

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-04-11 11:19:50 +00:00
Nans Lefebvre 9365dc5d17 [FIX] account: better message on user group error
The validation error introduced in 552da8dc can pop up in contexts where
it is not expected;
e.g. not in editing user rights but while upgrading a module.
Therefore we make it more explicit, giving the user a way to resolve the error.

closes odoo/odoo#32623

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-11 10:29:30 +00:00
Xavier Morel 6bd9e71d9d [FIX] SSF: misinterpretation of onchange command (4)
From an onchange, at this point, (4) doesn't mean "no change" it means
"reset to database values". Through the interplay of client and server
reverse-engineering one another at this point the client (is supposed
to) assume the o2m results are "complete" and a diff from the
current *in-database* values rather than the in-client (sent to the
server) ones.

So a (1) should completely replace all existing values, and a (4)
should just remove all of them (but keep the record linked).

closes odoo/odoo#32617

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-04-11 07:49:21 +00:00
Goffin Simon 36d4c99828 [FIX] sale_coupon: Promotion code removed when adding in shopping cart
Steps to reproduce:
- Create a sale.coupon.program with a discount of 10% and generate coupons for it
- Go on the shop and add a product of 100€ in the cart
- Go in your shopping cart and add a promotion code
- A new line has been created in your cart with a discount of 10€
- Click on "Process to checkout"

Bug:

The discount had been removed from the cart

Technically:

When clicking on button "Process to checkout", the function "recompute_coupon_lines" is called several times.
The second time, in function "_remove_invalid_reward_lines", the valid applied coupon program couldn't be retrieved
due to the sale price of the discount_line_product_id = -1000000 €. The function _filter_on_mimimum_amount filtered
the targted program  because the untaxed_amount of the order was equal to -999900€. So the program._compute_program_amount
was all the time greater than untaxed_amount or untaxed_amount + tax_amount

It s not consistant to set a default value to -1000000 to prevent pricelist strikethrough because in some currencies,-1000000 is not enough.
Now the reward lines are not strikethrough.

X-port/cherry-pick of odoo/enterprise@2748249c0b

opw:1957671
2019-04-10 18:59:59 +02:00
Christophe Simonis 3a3f7fd586 [FIX] web: convert forward-ported test to use async/await 2019-04-10 18:11:24 +02:00
Christophe Simonis b917fdd1ac [FIX] web: correctly forward-port 8d34eb1328.
I shouldn't have trust the comment and apply the patch anyway.
2019-04-10 18:09:55 +02:00
Aurélien Warnon 2268e747c9 [FIX] survey: allow creating survey with no sections
Task#1958723

This commit fixes the survey form to allow creating, testing and sharing
surveys that don't have sections as long as they don't use the "page_per_section"
layout.

closes odoo/odoo#32159

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-10 15:03:10 +00:00
Priyanka Kakadiya 61495126ae [FIX] survey: correct score of answer in demo data
- when answer is correct, then score should be +1.

Related to Issue: 1967506

closes odoo/odoo#32612

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-11 07:02:59 +00:00
Goffin Simon 5a83cd2649 [FIX]sale_stock: Issue when clicking on "No backorder"
Steps to reproduce the bug:
- Create a SO with no salesperson
- Add a SO line with 2 storable product
- Confirm the SO and deliver only one product
- Click on "No backorder"

Bug:

A error was raised because the function "_log_activity"(called by _log_less_quantities_than_expected) requires a responsible

Partial Backport: https://github.com/odoo/odoo/commit/e1f9499d2672fb0a346f8ac74552f038f5204a64

opw:1950968

closes odoo/odoo#32592

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-10 14:35:40 +00:00
Christophe Simonis 5313cea8e6 [FIX] snailmail: add missing model entry in test declaration
This allow enterprise tests to pass.
2019-04-10 15:38:09 +02:00
Christophe Simonis e145f2b0c8 [MERGE] forward port branch saas-12.2 up to 2694174b41 2019-04-10 15:10:24 +02:00
Christophe Simonis 2694174b41 [MERGE] forward port branch saas-12.1 up to 0fb9110e46 2019-04-10 14:24:09 +02:00
Nicolas Martinelli e402c89bcc [FIX] stock_account: price unit is zero
- Set a product P to average valuation, real time
- Create a PO for 1 unit @ 100, validate the picking
- Create a PO for 1 unit @ 0 (e.g. you receive a free product)

You cannot validate the picking because of the message 'The cost of P is
currently equal to 0...'

This error message is historical, to prevent users from an incorrect
configuration.

Since we still want to prevent misconfiguration, but support the
mentioned use case, we introduce an `ir._config_parameter` for people
who 'know what they are doing'.

opw-1962249

closes odoo/odoo#32550

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-10 12:15:58 +00:00
Christophe Simonis 0fb9110e46 [MERGE] forward port branch 12.0 up to 81215120af 2019-04-10 12:27:56 +02:00
Nans Lefebvre 81215120af Revert "[FIX] mail: remove attachment as main at unlink"
This reverts commit abc45b1
Since by default the ondelete attribute of a many2one is `set null`,
this was completely unnecessary to begin with.

Bug caused by this commit:
Unlink a record that has some attachments.
The unlink first removes the record, then its related attachments.
It calls remove_as_main_attachment, which reads the attachment res_model and
res_id. This triggers a check that the related record can be read.
However the related record has already been removed, an exception is raised.
It is thus impossible to unlink a record.

Closes #32563

closes odoo/odoo#32572

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-10 08:00:06 +00:00
Lucas Perais (lpe) c43acc34b8 [FIX] account: cash basis reconciliation almost all amount
In multicurrency

Do an invoice with cash basis lines in the foreign currency
Make a payment for almost all the invoice
"almost" refers to the point where virtually all taxes will be paid

i.e., paying 90 over 100, that contains a tax of 5%
The tax paid will be an amount almost equal (to a few cents) to the
total amount of the tax
It is not negligible, but if the currency rates are in the right configuration
(i.e. 0.005888)

Before this commit: the Cash Basis reconciliation will be considered as full and will trigger
the creation of the Exchange Diff Entry.
In turn, paying the rest of the invoice will pop up an error saying that some entries are already reconciled
(with the Exchange Diff entry)
It is not *that* that an exchange rate entry has been created the first time
after all, a percentage sufficiently close to 100 has been paid
But it blocks subsequent reconciliation, hence this fix

After this commit, if the cash basis entry doesn't match at least 100% of the paid move
then, we force to not check for full reconciliation

OPW 1953027
closes #31168

closes odoo/odoo#32023

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-10 08:02:14 +00:00
Lucas Perais (lpe) 30f7c0ea0e [FIX] account: tests reconciliation helper class
Before this commit, test reconciliation was inherited by
test reconciliation widget.
It made the actual test_xx functions of the former
being executed twice

After this commit, we create an intermediary test class for setUp and helpers
And the tests for each class execute only once
2019-04-10 08:02:14 +00:00
Lucas Perais (lpe) ea00318e9e [FIX] account: revert move subjected to cash basis
Before this commit, when reverting a move
that will be subjected to the creation of a cash basis move
the process failed saying that some entries were already reconciled

That was because the process tried to create the cash basis move during
the revert.
This is  wrong, because no real cash is dealt with.

After this fix, the move lines of the original entry are reconciled
only with their revert counterpart

OPW 1938809
closes #30972
2019-04-10 08:02:14 +00:00
Christophe Simonis c9e1deb496 [MERGE] forward port branch saas-12.1 up to af313858b4 2019-04-09 20:48:01 +02:00
Christophe Simonis af313858b4 [MERGE] forward port branch 12.0 up to c1c322dd40 2019-04-09 20:43:35 +02:00
Christophe Simonis c1c322dd40 [MERGE] forward port branch saas-11.3 up to 372ecf4c09 2019-04-09 20:38:23 +02:00
Christophe Simonis 372ecf4c09 [MERGE] forward port branch 11.0 up to 492c5b6e17 2019-04-09 20:34:03 +02:00
Christophe Simonis 492c5b6e17 [FIX] survey: prefill checkboxes
Oversight of 82d733d68c

See #32149

closes odoo/odoo#32557

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-04-09 16:54:42 +00:00