We did not add the description of the invoice line on the print-out
of the invoice. (probably because description is not translatable
and the name of the product is)
If a product is set, the name of the product becomes the description (label)
on the invoice line, but of course this depends on the language.
So, we only add the description if it does not correspond
to either the English (/standard language) or Arabic product description.
(People can always add both languages in the same field)
Of course, if the product is not set, it will also just show the description (label).
Also put the : of the payment reference in Arabic on the other side.
closesodoo/odoo#81620
X-original-commit: 3485c7ad368d9c841d75a0b0614082b8989e2afc
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
We had a constraint(raise) that said that the delivery date needed
to be after the invoice date, but this is putting too many
constraints.
However, we put a help message to say that they should put the
date of the last delivery. Also, the delivery date should not be
changed once confirmed like the other information in the invoice.
X-original-commit: 9e1a0fb37930de3c8cbc0ecf88052e5ddf55d474
Part-of: odoo/odoo#81620
Before this commit users were not able to edit their settings if they
had a linked employee for a company that was not currently active for
them.
This is due to the fact that since the employee_ids field is considered
`safe` to read/write by your own user the fields were loaded in sudo and
thus bypassed the security rules that were meant to prevent that issue.
The security rule is now enforced as a domain on the `employee_ids`.
TaskId-2715341
closesodoo/odoo#81612
X-original-commit: b5b105eabd90419a5856e8279e277743c5915fc9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
When having a shipper for a DO, if the user creates a backorder, the
information won't be sent to him.
To reproduce the issue:
(Use demo data)
1. Create a sale order SO with 2 products
2. Add Shipping: UPS US
3. Confirm SO
4. In the associated picking, deliver one of the products and create a
backorder
5. Process the backorder
Error: In the chatter, there is a label for the first picking but there
isn't any label for the backorder
When confirming the sale order, the backorder is first created and then
the initial picking is sent to UPS. As a result, considering the current
body of `send_to_shipper`, the field `carrier_tracking_ref` of both the
initial picking and the backorder is defined with the same value (i.e.,
the tracking number of the initial picking)
Therefore, when processing the backorder:
https://github.com/odoo/odoo/blob/f29da79ef64a8166e54544d1787912be5665076a/addons/delivery/models/stock_picking.py#L126-L129
`carrier_tracking_ref` is already defined, so `send_to_shipper` won't be
called
OPW-2678549
closesodoo/odoo#81599
X-original-commit: 89f9281b096e24583ff7780a1bb42f0c4b7b477e
Related: odoo/enterprise#22980
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Prior to this commit, the color presets generated by the color palette
would always be visible by the user which could lead to confusion.
Most users would click on the presets and edit them instead of editing
the color palette.
This commit groups the presets into a collapsed section under the color
palette to incentivize the user to click on the color bubbles instead.
task-2687469
closesodoo/odoo#79921
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
All lunch locations were showing regardless of the company the user is
logged in.
Now only the lunch locations of the current company are showing.
closesodoo/odoo#81603
Taskid: 2710417
X-original-commit: 3e87770bb8faf2a58ba0b429148f64256537a4da
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The test `test_unused_accrual_postponed` was expecting at least 25
holidays to be accrued, but started failing around mid-December.
closesodoo/odoo#81592
X-original-commit: c2865b7f5b654a61d4b2690133797aa39712b00d
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
When Freezegun is used with the `start` and `stop` method and the test
fails before the `stop`, the time stays frozen for all the other tests.
When it happens on runbot, a lot of tests brake with a lot of noise as
they are false negatives.
X-original-commit: 048796dc125b0d494f3c2fcd12625a84ee5cd91d
Part-of: odoo/odoo#81592
Tests showed that users didn't understand the goal of the search bar
above the snippets block under the tabs.
This commit changes the placeholder of the search bar to better
indicate its purpose.
task-2607728
closesodoo/odoo#81222
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
SPECIFICATION
Before this commit, when clicking on the 'See Results' button
the page was loaded on the previous one.
After this commit, the page will open in a new tab.
We also took the opportunity to replace all the '_blank' value
occurence by the 'new' value as '_blank' value is not a valid
value for the 'target' field of the 'ir.actions.act_url' model.
LINKS
Task-2700305
PR : odoo/odoo#80858
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Expected behaviour
When buying something on the website, the amount to be paid for the client
should take into account the choice of the shipping method.
Observed behaviour
When choosing a different shipping method than the default one, and only
if this method is a third party acquire, the total amount is updated on
the website, but the amount the client will be asked to pay doesn't take
into account this change, being computed according to the default shipping
method.
Steps to Reproduce this Issue
1. Select a product on the website and add it to the cart
2. View and validate the cart
3. Change the shipping method
4. Click on the "Pay now" button
Problem Root Cause
This issue comes from the fact that the amount was written in the view when
creating the cart view and wasn't updated by a change of shipping method.
Related issue
opw-2686369
closesodoo/odoo#81587
X-original-commit: 617ed0ef47d1496b912d5b85a494e3cda897da4d
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
mass_mailing used to show the body_html but now shows the body_arch
field instead (and body_html only in debug mode). As a result, one demo
that had only defined body_html showed an empty field. This moves
the body_html of that demo into its body_arch.
task-2710460
closesodoo/odoo#81586
X-original-commit: a313276e7a84eac053b0b35b290e3f3132c051e2
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Set up a [TEST] product with a tax A
Create a SO with [TEST] and a tax B and confirm
Open POS, import the created SO
[TEST] will be imported with tax A
while tax B should be pulled from the sale order line instead
opw-2699793
closesodoo/odoo#81580
X-original-commit: 0a5cbfeb7edcce6e6bb915d6e61c736491695ada
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
When an attendee's registration was archived, their seat was still
considered taken, which could be problematic such as in cases of
limited seat availability.
Only non-archived registrations are now counted as seats. The same
error as with regular registrations will be raised if there are not
enough seats available to un-archive a registration. These ValidationError
messages now show the name of the fully booked event.
A few python tests are included to verify the impact of (un)archiving on
seats availability for events and for event tickets.
The appearence of archived registrations was also not different in form
and kanban views, which is somewhat confusing and inconsistent with the
aspect of archived records in Odoo. Actions buttons are not available on
archived records.
Filtering in the archived records needed to be simplified from a "Custom
Filter" to a one-click feature, already available for many models.
Task-2646298
closesodoo/odoo#77715
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Improvements of the Inventory Adjustements page, among which:
- Add a new 'Apply All' button (without the need to select a record)
- Show the date at which the last count was done
- Add warning icon next to duplicated SN
- Allows to change the lot_id when empty and no quantities are set
closesodoo/odoo#78361
Signed-off-by: Arnold Moyaux <arm@odoo.com>
When inserting a new paragraph by pressing 'enter', it would
automatically close the mega menu.
As inserting a new paragraph triggers a historyRevert at the editor
level, it was leading to two issues:
- The widgets of the public root were stopped then restarted. The
StandardAffixedHeader (the public widget for the header), as an
Animation, would start its effects when started, which would close its
dropdowns. This commit changes the _updateHeaderOnScroll method to close
opened menus and dropdowns only when the animation has scrolled.
- Opening the dropdown was a recorded step. When history was reverted,
it would close it. Now toggling the mega menu is done with the editor
observer unactive.
task-2668908
closesodoo/odoo#81559
X-original-commit: 675430d53f6ef048b77afe95395bd760d3f5a2be
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
[1] changed the structure to adapt it to the new dropdown menus. This
commit changes the css according to these changes so that mega menus are
correctly displayed inside the extra menu items dropdown from the auto
hide menu.
[1]: 29b9280c44534d2f210dbcea83e0049365949f48
task-2668908
X-original-commit: fdd06d70fa78098cbfe0bd5200acd2fa171f4576
Part-of: odoo/odoo#81559
This commit adds the possibility to modify some background colors of the
mega menus so that the templates are fully editable.
Some of these templates have a column with an extended background, using
the :before css pseudo element.
As this is not a DOM element, it cannot be changed from javascript.
It was decided that using shapes would not produce the same effect as
the designer intended, and that it would be too confusing for the user
to be provided with an option allowing to extend the background of a
column.
Therefore, these specific s_mega_menu_gray_area elements must have their
background hardcoded.
task-2668908
X-original-commit: f01c74118ad4c772fb18866956ab9fb214f781fa
Part-of: odoo/odoo#81559
Co-authored-by: qsm-odoo <qsm@odoo.com>
When editing a countdown with a redirect action, sometimes the
countdown block will be hidden when toggling the "Hide countdown at the
end" option.
The problem is caused by the button that allows previewing
and editing the end message of the countdown, this button does not
apply in the case of a redirect action though. However, the button can
still be activated by selecting a different end action first and
switching to the redirect action afterwards, in which case it will
incorrectly hide the countdown.
task-2638366
closesodoo/odoo#81557
X-original-commit: 7f6ebee33e8a82d7ccdf155c3a543898b187389c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The countdown snippet has an end action that can be configured to show a
message when the countdown reaches zero. A button in the editor toggles
a preview of this message. However, a bug currently makes the preview
disappear whenever the snippet's widget is restarted... which occurs by
simply hovering some other options.
To solve the problem, the preview visibility is now controlled by a
separate css class s_countdown_enable_preview overriding d-none. This
way, the preview visibility no longer interacts with the widget's logic
and is no longer affected by the widget restarting.
task-2638366
X-original-commit: c37354d457f5b868673b4f974e401f4c635062d2
Part-of: odoo/odoo#81557
Co-authored-by: qsm-odoo <qsm@odoo.com>
A console.warn instruction was added with [1] in case an user interacts
with an editor widget which does not declare any linked option method
(as it is most probably a dev mistake). We have cases where it makes
sense though, adding a custom button with more complex events and
interactions or simply in some strange custo. This warning prevents to
test those uncommon behaviors in a tour test (which is what following
commits of this PR are trying to do).
This commit simply removes the warning.
[1]: https://github.com/odoo/odoo/commit/be05ac7e2b8d866a72693b761f3bc8576d54e59e#diff-ffb61e86e6b8297ef8997f9c605de14de896b54161c032d88a80bbaeac4f89beR490
X-original-commit: 1b18747c7a328df142d7b2cf206a84c39d5eac05
Part-of: odoo/odoo#81557
When you reload the pos (F5), this.payment_terminal is undefined.
And you can update the amount even if the payment is done.
closesodoo/odoo#81546
X-original-commit: 2e10f33511ced41f296e0f65d2d042f4e041cacb
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Masereel Pierre <pim@odoo.com>
Before this commit, the computed field _compute_is_system make a write which
one is a bad practice and trigger a lot of others calls on res.user model.
opw-2716468
closesodoo/odoo#81555
X-original-commit: f85a67935c5dfa660e94f9bed8e8058c8df256cc
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Since commit [1], the user context wasn't put in the context
sent when executing a server action (only the context of the
action sent). This commit fixes the issue.
[1] 7354d1686915ec21437fc677f15a6c5409106492
closesodoo/odoo#81552
X-original-commit: fee371be291ba3d6f1adc71c08420b6510fdf386
Signed-off-by: Géry Debongnie <ged@odoo.com>
Before this commit, the ir.rule called `timesheet_line_rule_portal_user`
is added just for the project sharing and have to be unarchived when at
least an external collaborator is added into a project. But this rule is
never unarchived.
This commit archives/unarchives the ir rule when the condition is
satisfied.
part of task-2648955
closesodoo/odoo#81553
X-original-commit: a6f0aaeea8b621040559738d7b27d320b6208b58
Related: odoo/enterprise#22956
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Purpose of this merge is to clean and add tests for event application and
its sub modules.
We notably
* clean common files, lessen "shared" data and make tests more localized;
* remove manual patch of datetime to use freezegun;
* add more tests in test_event_full about synchronization with event
types and seats computation;
* add some performance tests;
* add performance tests around page browsing and registration flow;
Task-2703289 (Event testing and coverage)
Preparing Task-2703285 (Event performance improvements)
Somehow related to Task-2341656 (Event submenus shenanigans)
closesodoo/odoo#81068
Related: odoo/enterprise#22783
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose of this commit is to add performance tests for some commonly used
URLs related to event: the main event page and browsing a given event.
A complete registration tour involving buying tickets, answering questions
and filling billing information is also added under a query counter check.
This allows to see a bit how many queries are involved in that flow. To
ease reproduction a data is added but not imported, allowing to quickly see
what happens locally instead of having to debug tests.
Task-2703285 (Event performance improvements)
Task-2703289 (Event testing and coverage)
Part-of: odoo/odoo#81068
Add performance test for event and registration creation. This serves as a base
for future cleaning and improvements for both models and performance in event
models targeting v16.
Task-2703285 (Event performance improvements)
Task-2703289 (Event testing and coverage)
Part-of: odoo/odoo#81068
Add some classes and name on some DOM elements easing tests writing. Otherwise
xpath are hard to write, especially in tours where it can quickly become a
PITA to write and update.
Task-2703285 (Event performance improvements)
Task-2703289 (Event testing and coverage)
Part-of: odoo/odoo#81068
With this commit we ensure website_menu field is computed before calling
create. Indeed otherwise it is computed after the create if value is not
given and stays to False. This is due to the compute that does not distinguish
a False value from user from a False value added as default. This breaks
the event type -> event synchronization when no form view is used (either
through UI or in code).
With this commit, it is computed before resuming the creation and field
is correctly synchronized with the template value unless the user gives
a value at create time.
Task-2341656 (Event submenus shenanigans)
Part-of: odoo/odoo#81068
Purpose of this commit is to add tests about template (``event.type`` model)
synchronization when creating an event. Some tests already exist in event sub
addons but this one has all community features activate. It eases checking the
final result.
Tests about seats computation and registration creation prevention due to
limits are also added as this behavior may be re-implemented soon.
Task-2703285 (Event performance improvements)
Task-2703289 (Event testing and coverage)
Part-of: odoo/odoo#81068
Purpose of this commit is to make test_event_full globally independent from
other event sub modules testing data. We now define a complete event type
with all sub options clearly activated in a single setup. That way tests
in test_event_full are easier to read, understand and modify.
A custom report replacing badge report is added as the base one is quite
complex. It is easier to test the result with simpler templates.
Task-2703285 (Event performance improvements)
Task-2703289 (Event testing and coverage)
Part-of: odoo/odoo#81068
Use freezegun as it is more easy to use and allow to remove a lot of extra
boilerplate. Indeed manually patching datetime is a PITA as a lot of imports
have to be patched.
A custom patching has to be done for create_date, as it is done using a value
stored on the cursor (cr._now), based on SQL now. As it has nothing to do
with standard python library it cannot be patched using freezegun.
Task-2703285 (Event performance improvements)
Task-2703289 (Event testing and coverage)
Part-of: odoo/odoo#81068
Purpose is to have a common event class for users and useful stuff (customers,
products, ...) but lessen usage of common test data through sub modules.
Indeed having a "global event type" test data updated in various addons is
actually complicated to maintain.
Sub add-ons are updated to use mainly the ``EventCase`` test class holding
users and side data. Data specific to those modules (event type with some
specific configuration notably) is created and used in tests in the given
module only, and not through generic event_type_complex and event_0 test
data anymore.
With this commit tests are more localized to their add-on and modifying data
in a given add-on has less chances to have unwanted side effect in other event
submodules unit tests.
Task-2703285 (Event performance improvements)
Task-2703289 (Event testing and coverage)
Part-of: odoo/odoo#81068
When double clicking a number in the numbers snippet, then typing a new
number, the number line would be merge with the text underneath. This
prevents that by adding a line break in between so they aren't
considered the same line by the editor (an inline with a block as
sibling is a tricky case for edition).
task-2711644
closesodoo/odoo#81551
X-original-commit: 886af1f328a9f1664b0d3e204bf984bfee28b215
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
The wrong classes were declared for the s_blockquote and
s_text_highlight snippets in the selector of so_content_addition. As a
result, these snippets could not be inserted inside other snippets.
task-2711645
closesodoo/odoo#81550
X-original-commit: 8d05470e51b9a48d73f8ffaba4789321523b3129
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
When changing a mailing's background color to black, the text of many
snippets would change to white, even though the mailing's body was
white. This was because said body was applied in css while the mailing's
body was applied with a class that also set the text's color.
This fixes that issue by applying the white background on the body via
such a class rather that via css.
task-2711643
closesodoo/odoo#81549
X-original-commit: 31abb63fca22c73b85912eb9ba2cf08806aab679
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
A traceback was triggered when removing flex styles in convert_inline.
This is fixed by iterating over the styles rather that over all keys of
the style object.
task-2697159
closesodoo/odoo#81540
X-original-commit: 18db94d9fc320c35e811d991fc4a32533d481083
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This adds a `toInline` function that replaces the code that was
duplicated between convert_inline and mass_mailing_widget. The
duplication was confusing and error prone.
X-original-commit: 916582af2d707fc1aa462c6feffa3f5defda75a2
Part-of: odoo/odoo#81540
This simply reorders (alphabetically and public/private), renames and
document (with docstrings) all functions of convert_inline.
X-original-commit: 970a3686b1f5edea97bbf86bf4fadc90cfe63357
Part-of: odoo/odoo#81540
When saving an email, its contents pass through convert_inline to ensure
wide e-mail client compatibility. One phase of that process is the
conversion of classes to inline styles, which involves parsing through
all the styles in all the stylesheets of the document, and matching them
with each element in the DOM. That is an extremely expensive process and
because of that, saving an e-mail can take a very long time depending on
how large the DOM is.
This refactors it for performance gains. Tested on an exaggeratingly big
DOM, what used to take about 12s now takes about 5s.
- The process of parsing through the document's stylesheets is now done
on opening the email (about 500ms) rather than on saving it so we
split the processing time between the two.
- When parsing the stylesheets, we now also preprocess them by grouping
whatever can be grouped together and precomputing the specificity so
as to sort them appropriately. This has the benefit of considerably
reducing the number of rules to iterate over for each element (from
11k+ to 3k+).
- In the process, some things were re-written for improved readability.
X-original-commit: 10e749537186dfb80aee1f2537f3b5804f66cfe5
Part-of: odoo/odoo#81540
This provide tests for the main unit testable functions of
convert_inline, as well as a couple of test utils to that purpose.
X-original-commit: 6a17ff7442a8395663c3e215cc14c057c098d4b5
Part-of: odoo/odoo#81540
This introduces a doctype declaration in the initialization of html
fields iframes and wysiwyg iframes. That prevents the browser from
rendering in Quirks mode[1] which makes tables override the usual style
inheritance patterns. As a result, this fixes an issue with text colors
and alignments that were lost on converting divs to table structures.
[1] See https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode
X-original-commit: da5cf4bcac696a73c33d856ac889342fe8670e65
Part-of: odoo/odoo#81540
This covers minor refactors in convert_inline, and adds docstrings to
some of its functions that were missing them.
X-original-commit: 7c67a703ac5874cbd05ab5e82f566499b1e07849
Part-of: odoo/odoo#81540