Commit Graph
130396 Commits
Author SHA1 Message Date
Florent Lejoly 397f86b962 [FIX] website_slides: remove creation of quizz in reporting
Currently in the slide.question view it is possible to open a form
to create new questions for quizzes, but it is impossible to fill the form with
the required information to create a new question. So the create button has no purpose.
This as "slide_id" is required but can't be set in the form.
Now the option to add question from the reporting tab 'Quizzes'
is removed as the questions (with the answers) are added in the form from
slide.slide.

closes odoo/odoo#37117

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-19 08:36:46 +00:00
wan 978f9ce2c6 [FIX] account: onchange in reconcile model
The onchange on tax_ids and second_tax_ids was only recomputed when
tax_ids changes (duh) so the variables show_force_tax_included and
show_second_force_tax_included were not set when coming back to the
formm after having saved a line with one tax.

closes odoo/odoo#37111

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-19 08:12:32 +00:00
Krunal Trivedi 78c0934f76 [FIX] website_slides: display bug after submitting quiz
After submitting the quiz, buttons and validation content was rendering  on top
of the quiz instead of under it. This display bug is fixed in this commit.

Task-2072564

closes odoo/odoo#37040

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-18 06:00:01 +00:00
Julien Mougenot 43d91c289a [FIX] base: document layout reset colors button
Fixed the button allowing to reset to the logo colors in the
document layout configurator.

Before this commit, the custom_colors boolean asserting that
the colors used by the layout are different than the ones computed
from the logo and used to revert to those colors was in readonly
and couldn't be toggled.

Now, the boolean is editable and allows to revert the colors properly.

Task 2072557

closes odoo/odoo#36968

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-16 14:30:07 +00:00
Simon Lejeune d5111aec9f [REF] sale, sale_stock: dates
Remove the "sale.group_sale_order_dates" group and settings, all the date
fields are always displayed but we put schedule_date and commitment_date
(for which the label was renamed "delivery date") on the same line (with
a design to make the schedule date looks like a suggestion for the
delivery date).

task 2057802

closes odoo/odoo#37174

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-20 07:02:22 +00:00
Martin Trigaux 543a5523a3 [FIMP] base: remove all translations when writing False
This "bugprovement" resolve the old issue of writing on a translatable
field a falsy value.

Before this commit, only the translation value was removed. When no
translation is present (or when the value is not set), the value is
retrieved directly from the source field.

Before 18d9c2cab2, it was still possible to go around this issue by
removing manually all ir.translation entries and writing with a user
in en_US.
This is no longer possible as writing on a translatable field always
uses translations when in multi-language environment, without
exception of en_US.

When writing a falsy value on a field, the expected behaviour is to
reset the value and see that falsy value after saving, not the old
value stored on the source model.

Remove all translations and force to update the column.

Removing one individual translation is still possible in the
translation popup.

Task id: 2062415

closes odoo/odoo#37077

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-18 14:56:41 +00:00
Simon Lejeune 2425c7b223 [FIX] mrp: set planned date when creating order through procurement
If it isn't set manually, it defaults to now and the result is not
consistent with planned date end. We make it an hour before totally
subjectively.

closes odoo/odoo#37173

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-19 15:03:21 +00:00
mreficent c101708636 [DEL] hr_attendance_presence (remnant)
https://github.com/odoo/odoo/commit/f6fdde96bddfedf8764cd8a73089e44340d476ae deleted the module, but https://github.com/odoo/odoo/commit/e9d989827686d1089c1ea1c9a6b47b62a09e2de4 added a remnant due to a bad rebase.

closes odoo/odoo#37170

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-19 18:43:46 +00:00
RomainLibert e1eca412fb [FIX] hr_contract: change the company when changing employee
closes odoo/odoo#37164

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-19 15:37:54 +00:00
Xavier ALT bea0a9edfe [FIX] base, *: ensure name_search() returns lazy name_get() result
To avoid slowing down search like "{relational_field}" contains "{value}"
we always need to return the lazy name_get() for each [_]name_search method

closes odoo/odoo#36735

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-11 17:11:33 +00:00
Arnaud Baes 81e198aa5d [IMP] stock: Warning on internal picking types.
As there's technically no way to hide partially a selection field,
we raise a warning when the user set a `stock.picking.type` as
internal without having the setting `stock.group_stock_multilocations`
enabled.

closes odoo/odoo#37129

Taskid: BugsLogistics
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-19 13:36:00 +00:00
Arnaud Baes 5ac0c268b2 [FIX] purchase: wrong source document browsed.
For some reasons, when the `mail_compose_message` wizard tries to
read the name of its source document, the id and the model are
sometimes mismatched as a `purchase.requisition` or a `purchase.order`.
To avoid this we force the `active_model` and `active_id` in the context of `action_rfq_send` to be always referring to the current `puchase.order`.

closes odoo/odoo#37097

Taskid: BugsLogistics.
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-19 09:15:26 +00:00
Sébastien Theys b6288e5446 [IMP] *: remove image_64 and clean views
There are too many image sizes. Since they are stored resized this takes time to
generate when saving a new image, it's more rows on the attachment table, more
files on the disk, ...

64px is close enough to 128px that it can be removed without a big impact on
download size.

It will even reduce download and number of requests when both images are
displayed because now only one has to be downloaded and then benefit from cache.

The difference between the two is typically around 1.5kB which is negligible
these days, especially when the request overhead is around 0.5kB already, not
even taking into account other factors such as latency.

If a 64px image must absolutely be returned, it is still possible to pass the
size parameters to the image route. But the current guideline is to handle
resizing in the views when necessary.

Views
=====

- remove width and height attributes when existing CSS rules are overriding them
  (eg. `.oe_kanban_avatar` in the right context)
- add CSS rules instead of width and height attributes when possible
- use `object-fit: cover;` where width and height are forced to avoid distortion
  of non-square images
- for products, use `object-fit: contain;` instead, keep ratio but without crop
- add new CSS rules where the expected size was max 64px*64px before due to the
  image size itself
- remove `img-fluid` where using size classes to avoid conflicting rules

task-2060865

closes odoo/odoo#36147

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-09-19 10:23:39 +00:00
Nicolas Martinelli e3d2b018c2 [FIX] website_event: track publishing
When an event is published/unpublished, the 'Is Published' value appears
twice in the chatter.

This is because `website_published` is defined as a related of
`is_published`, and `is_published` is tracked. The button calls
`website_publish_button` which triggers a `write` on
`website_published`, the latter triggering a `write` on `is_published`.

The situation is quite exceptional: we usually don't define a related on
a field of the same model. Therefore, we can simply change the field
tracked.

opw-2073804

closes odoo/odoo#37128

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-19 09:46:30 +00:00
Nicolas Lempereur 5c408dd442 [FIX] web_editor: element inline bar over modal popover
In the inline editor (eg. task description), the inline bar of an
element (eg. link or image) has higher bootstrap z-index than modal that
can be opened via this bar (eg. croping window for an image, link
editing for a link).

So the bar would be over the modal opened by the bar which is
unexpected.

This was solved in 12.3 f2969923 by setting the inline bar to z-index of
$o-wysiwyg-zindex (defined to 1000).

This is the equivalent of 12.0 #37119 fix.

opw-2073761
closes #37125

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-19 09:46:08 +00:00
William Henrotin de2725c173 [FIX] stock: remove dummy field from depends_context
This commit removes 'location' and 'warehouse' from the api.depends_context
of _compute_quantities() as:

1. They are not needed. They are never changed in a single transaction in the current code
2. The ORM doens't support the fact that they are sometimes passed as list instead of integer

closes odoo/odoo#36788

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-19 08:00:14 +00:00
RomainLibert 02599afd49 [FIX] hr: Rename Gilles Gravie
closes odoo/odoo#37122

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-19 09:38:49 +00:00
Josse Colpaert cfae528e53 [FIX] l10n_ro: states were moved to base
closes odoo/odoo#37115

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-19 08:37:22 +00:00
Samuel Degueldre 16f23e8246 [FIX] web: fix m2mtags widget to be able to use 'SAVE & NEW'
PURPOSE

Previously when the 'SAVE & NEW' button was pressed in the 'create and
edit...' menu of the many2many_tags widget was pressed, the modal window
would close and the button would act exactly like the 'SAVE & CLOSE'
button. This was due to the fact that whenever a new record was created
and added to the field, it would reset the many2one field it uses for
display, which would destroy the edit modal.

This commit fixes that by not notifying the underlying many2one field of
any change until the modal is closed by the user. This has the
disadvantage that tags display, if visible behind the modal 'shade',
will not be updated until the modal is closed, but restores the
functionality of the save&new button. It also adds a test for this
behaviour

task-2070454

closes odoo/odoo#37114

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-09-19 08:48:41 +00:00
Gorash fa6dcc7332 [FIX] web_editor: fix add/remove columns in table
closes odoo/odoo#37079

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2019-09-19 07:40:47 +00:00
Gorash 42df7f84a4 [FIX] web_editor: checkbox without text change can now be checked 2019-09-19 07:40:47 +00:00
Gorash d1f25b178a [FIX] web_editor: recursive checkbox check
In multi-level checkboxes, if there is only one checkbox per level, the
expected behavior is that all checkbox will be checked if one of them is
checked. This was not the case before this commit.
2019-09-19 07:40:47 +00:00
Gorash f7c2cb088c [FIX] web_editor: fix link style being lost on edit 2019-09-19 07:40:46 +00:00
Gorash 175c75b9b5 [FIX] web_editor: min-width for custom colors in color picker
The custom colors were displayed as a single column while it actually
had enough space to expand itself.
2019-09-19 07:40:46 +00:00
Gorash 65d0809786 [FIX] web_editor: prevent popovers from overflowing the editable
When setting align right on a picture, the popover of the picture was
partially overflowing the editable zone, rendering it useless.

This commit mimicks the behavior of Odoo 12 by disabling the fact
that the popover follows the picture.
2019-09-19 07:40:46 +00:00
Xavier ALT 5c1c092265 [FIX] base: flatten if ir.model.field.selection selection ids
The `get_technical_translations()` method was returning wrong list of list
for field selection values; instead we flatten the results to get a correct
domain.

closes odoo/odoo#37101

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-18 16:41:17 +00:00
Cedric Snauwaert 335d9d1210 [FIX] account: fix outstanding credit/debit widget not shown
If the journal is set to post entries at bank reconciliation, payment entries that are validated have their associated account_move in draft.
Or we still want those to appear in the invoices/bills as outstanding credit/debit.
This commit fixes this problem by adapting the domain used to fetch the payment lines that should be displayed as outstanding debit/credit.

closes odoo/odoo#37091

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-09-18 15:05:51 +00:00
Nicolas Lempereur d2f01f7cc6 [FIX] web_editor: re set style of custom color in editor
The style for custom color in the editor color menu from 12.0 was
dropped in 12.3 (correctly because of the changed structure) but in 12.5
the HTML structure changed again and the CSS is once again necessary.

opw-2073734
closes #37090

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-18 15:37:42 +00:00
Pierre Masereel 11b23d3771 [FIX] pos_discount: don't show multiple prices
When you add a discount, the price is changed on the product, and so
when you have enabled options to display the discount, the product is
shown as discounted. So we are modifying the lst_price too (like for
tip) to avoid having differences between prices.

closes odoo/odoo#37089

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-18 14:20:25 +00:00
Pierre Masereel ae2c10ec99 [FIX] point_of_sale: avoid tip price modification
When a tip is added, the price of the product is changed, and so we
don't want to recompute the unit price if quantity is changed.
2019-09-18 14:17:01 +00:00
wan ebbc9accae [FIX] account_facturx: posting a pdf on draft move
When a draft move is created and saved, we cannot post a pdf on it
anymore because facturx expects a default journal entry type to be in
the context in _import_facturx_invoice.
In this case, it is not in the context anymore because it has already
been saved on the account.move on which we try to post the pdf.

closes odoo/odoo#37055

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-18 14:07:38 +00:00
Kevin Baptiste 5b3509daaa [FIX] hr_holidays: filter Time off Analysis on active ids
Prior to this commit, the Time Off Analysis report was showing the
leaves of all employees and not the ones selected.

closes odoo/odoo#37048

Taskid: 2073345
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-18 13:50:05 +00:00
svs-odoo 75fa619f7c [FIX] repair: warning if negative quantity
Before this commit, you can start a repair order with negative value
into its operations (who will cause a dead end when user will try to end
it). So, now a check is done when user tries to start it.

closes odoo/odoo#37045

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-18 08:06:05 +00:00
svs-odoo dd45b5123d [FIX] repair: don't warns quantity for consumable
When user confirms a repair order for a consumable product, they always
get a warning wizard about insufficient quantity.
But as we don't track quantity for consumables, this wizard is useless.
2019-09-18 07:50:59 +00:00
svs-odoo 36b1843b43 [FIX] repair: forbids add service as repair parts 2019-09-18 07:50:59 +00:00
wan 8b24456ecf [IMP] account: change order of column of account.move.line trees
Task 2072312

closes odoo/odoo#37017

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-18 12:45:59 +00:00
wan 754d2ef6aa [IMP] account: review the keyboard navigation for the reconciliation widget
Task 2072312

* Ensure that the css is from Odoo and not from the browser
* Only use up/down to navigate
* Use Enter to validate a line
* Remove the accesskeys
2019-09-18 12:45:59 +00:00
wan dbd867eb8e [IMP] account: usability changes
Task 2072312

* Change the label "/" by "Draft <document type>" for draft entries (change name_get() of account.move)
* New left-bar menu for a chart of account & general ledger view: Take into account the company (for multicompany, avoid having  the number 7 if the current company doesn't have 7xxxa accounts)
* New filter "Accounts With Entries" for the chart of accounts
  Show only account which has at least 1 journal entry on it
* Show the move_id on the move line tree view
2019-09-17 15:42:30 +00:00
Odoo's Mergebot c3f6f1f262 [IMP] point_of_sale: Small changes to the POS Config view
An "iface_payment_terminal" field was present but never used. We
remove it.

Add a class on the list of IoT Devices to override it easily in pos_iot
and increase the width of the labels.

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

closes odoo/odoo#36495

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-18 18:01:53 +02:00
Antoine Prieels 9e11adcf9a [FIX] point_of_sale: Black receipts
Some parts of the receipts had a black background, making them
unreadable. The origin of this problem was that the white background
was not applied correctly to the whole receipt. The rest of the receipt
had a transparent background which was then changed to black when
converting the receipt to an image. The parts of the receipt that had
no background were the followings:

- The parts that were out of the screen if the receipt was too long.
We fix this by explicitly specifying a height when generating the
canvas.

- `html2canvas` applies the background to a rectangle starting from
(0, 0) up to (width, height). In our case, `body` has a margin of 8px.
Our receipt was then placed in a rectangle from (8, 8) to
(width + 8, height + 8).

closes odoo/odoo#37072

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-18 12:13:36 +00:00
jbm-odoo a5af052d67 [IMP] stock_sms: Fix non admin flow and improve first confirm box
Fix: A simple user is allowed to confirm sending sms wizard.
Improve SMS wizard: remove things about policiy and creation of
iap account.

closes odoo/odoo#37016

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-18 13:08:53 +00:00
Aaron Bohy eafe7eae79 [FIX] web: list: optional fields icon above resize handle
Because of the z-index, the resize handle of the last column was
over the optional fields dropdown icon, making it impossible to
click on. The z-index seems unnecessary, so we remove it.

Task 2067477

closes odoo/odoo#36987

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-18 11:31:43 +00:00
Aaron Bohy 7cb8f26726 [IMP] web: list: add test case
Thought there was a bug, but it's actually working fine, so no fix
needed, but the test is written (and it doesn't exist yet), so we
keep it.

Also fixes a selector to make an assert relevant in an existing
test.
2019-09-18 11:31:43 +00:00
Aaron Bohy 45eb9fca28 [FIX] web: MockServer: handle whitespaces in archs
Before this rev., the mocked fieldsViewGet treated whitespaces in
inline subviews as TextNodes, and processed them as subviews. As
a consequence, it crashed later on when the View tried to parse it.
2019-09-18 11:31:43 +00:00
Aaron Bohy 6c15557a87 [FIX] web: editable list: re-compute widths on window resize
This rev. adds a (debounced) handler to react on window resize
events in editable list views, in order to recompute the (fixed)
column widths.

Task 2067477
2019-09-18 11:31:43 +00:00
Julien Mougenot 8b6f3580d8 [FIX] web: list selectors synchronisation
Changed the way the header selector behave when the selection changes.

Before this commit, the header selector was only checked when clicked and
was unchecked as soon as any other record was unchecked.

Now, the header selector reflects the current visible selection:
if all of the other visible selectors are checked, it will be checked.

Folded records are not considered visible, thus only records from active groups
and from the current pager will be taken into account.

Task 2068280
2019-09-18 11:31:43 +00:00
Julien Mougenot 62452aad41 [FIX] web: handling of invalid formats in list views
Added handling of invalid format types in multiple edition in list views.

Before this commit, in multiple edition, a field that was edited with an invalid value format
(e.g. a numeric field receiving a string value) didn't trigger a field_changed and no prompt
was shown; the record was simply idle with an dirty value.

Now, the list controller also listents for set_dirty events and automatically triggers
an error modal + discards all changes when receiving one.
2019-09-18 11:31:43 +00:00
Vincent Schippefilt cc9467b750 [FIX] snailmail: support write with multiple records 2019-09-18 11:31:43 +00:00
Julien Mougenot ff9a0b87e6 [FIX] web: list: m2o doesn't trigger fieldChange when empty
Gives time to the user to enter an actual value in m2o in list views.

Before this commit, emptying a many2one field (selecting all > BACKSPACE or DELETE)
triggered instantly a field_change. This was an issue in multi edition as a field
changed triggered instantly a save on selected records without giving time to the
user to enter a new value.

Now, many2ones only trigger a fieldChange when selecting a new valid value.

Task 2068280
2019-09-18 11:31:43 +00:00
Aaron Bohy 708a5b6566 [FIX] web: list: multi edit boolean with ENTER
This rev. solves the similar issue as 801c603218, but with boolean
fields.

Scenario: select several records, select a boolean cell, press
enter to change the boolean value.

Task 2068280
2019-09-18 11:31:43 +00:00