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.
closesodoo/odoo#37117
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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.
closesodoo/odoo#37111
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
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
closesodoo/odoo#37040
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#36968
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
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
closesodoo/odoo#37174
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
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
closesodoo/odoo#37077
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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.
closesodoo/odoo#37173
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
To avoid slowing down search like "{relational_field}" contains "{value}"
we always need to return the lazy name_get() for each [_]name_search method
closesodoo/odoo#36735
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
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.
closesodoo/odoo#37129
Taskid: BugsLogistics
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
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`.
closesodoo/odoo#37097
Taskid: BugsLogistics.
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
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
closesodoo/odoo#36147
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#37128
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
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>
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
closesodoo/odoo#36788
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
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
closesodoo/odoo#37114
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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.
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.
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.
closesodoo/odoo#37101
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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.
closesodoo/odoo#37091
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
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>
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.
closesodoo/odoo#37089
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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.
closesodoo/odoo#37055
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Prior to this commit, the Time Off Analysis report was showing the
leaves of all employees and not the ones selected.
closesodoo/odoo#37048
Taskid: 2073345
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
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.
closesodoo/odoo#37045
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
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.
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
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
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
closesodoo/odoo#36495
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
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).
closesodoo/odoo#37072
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Fix: A simple user is allowed to confirm sending sms wizard.
Improve SMS wizard: remove things about policiy and creation of
iap account.
closesodoo/odoo#37016
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
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
closesodoo/odoo#36987
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
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.
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.
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
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
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.
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
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