Was forward-ported
This is problematic as it has the old translation syntax, trying to import a
model:ir.ui.view entry can crash (should be model_terms)
Export mass_mailing where the string "Update my subscriptions" is now present
(no longer in website_mass_mailing as in 10.0)
closesodoo/odoo#31868
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Create an event with a price.
Create a pricelist with a different price for the event.
Add the pricelist to the Public user.
On the website, open the event to register.
Before this commit, the shown price is the one of the event, and not the
one of the pricelist.
Now, the price is shown correctly and take into account the pricelist.
opw-1951252
closesodoo/odoo#31848
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When sequentially paying multiple SO with wire transfer, the user was
always redirected to the first paid SO.
This commit fixes this issue by redirecting to the most recent one.
Technical choice:
payment_transaction rows are ordered by id desc so we can trust the
first one will be the most recent on the client side (in the scope of
this diff).
opw-1949629
Closes#31754
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
In 11.0 f8b38f64d improved the column group by managment when reloading
several times by having the same "groupbys" dictionaries between the
pivot model instance and the header menu.
This has been reverted in 12.0 (with c6e7adfb95) because the following
pivot tests failed with the change:
- 'rendering of pivot view with comparison'
- 'export data in excel with comparison'
The failure is because now that the "groupbys" dictionaries are the same
object, the truncated dictionary of a header truncate the one of the
model instance.
So if we search something that has no results, then something with
results, the groupbys could be lost.
This behavior has no reason to be and is changed in 11.0 with #31644,
this commit is the forward-port of f8b38f64d and #31644.
closes#31627
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Since https://github.com/odoo/odoo/commit/5a030db3eb77b6d80187f8ae1a64303b2f50391d
the HTML editor displayed the translated versions of the templates it
allows to customize. So if the user edited and saved such a template,
the non-translated version was saved with translated-version content.
The behavior before the mentioned commit was:
1) Load all views the HTML editor allows to edit
2) Each time a view is displayed, re-make a RPC to load the view again
The mentioned commit made this simpler by making:
1) Load all views the HTML editor allows to edit
2) Each time a view is displayed, simply show the previously loaded view
... the problem was that the step (2) of the old behavior was
explicitly saying (client-side) to load the view's untranslated content.
This commit makes step (1) always load the untranslated versions of the
views (server-side).
It seems that our beloved administration is not happy with the FEC file
ending with an empty new line
Hence, this commit makes the FEC file last line end without \r\n characters
and there is no empty new line
OPW 1943302
Currently Odoo JavaScript code base support only ecmascript <= 5
So using a non compliant ES5 syntax can trigger a javascript engines
crash for some browsers like: IE, webview used by some old mobile
devices.
This commit fixes non compliant JS code syntax found to avoid potential
crash.
closesodoo/odoo#31522
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Currently Odoo JavaScript code base support only ecmascript <= 5
So using a non compliant ES5 syntax can trigger a javascript engines
crash for some browsers like: IE, webview used by some old mobile
devices.
This commit fixes non compliant JS code syntax found to avoid potential
crash.
Previously, when user edited record having 'field_html' widget and
tried to save the record immediately, a traceback was faced sometimes
because content was not loaded yet. This commit fixes the issue
by calling super method if the content is not loaded yet properly.
Task: #1932687Closes: #30833closesodoo/odoo#31581
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
This commit makes the quiz widget a real odoo widget that triggers up some
events. The widget is now only responsible of
* fetching quiz data (if not given)
* decorating the anwsers according to the result
* displaying message (error or modal)
To do so, some code move/rewrite was needed
* extract and factorize some template
* add 'sudo' on technical model to avoid access rights error
* factorize some python method from controller to model
* remove some CSS classes to lighten the code
* fixing access model error
* make quiz widget handle the display of error message
* give browse record for template rendering, rather than slug
* cleaning some spaghetti code in Fullscreen widget
* ...
Commit linked to task ID 1941250 and PR #31584.
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When creating a course via the frontend, the behaviour with forum and comment
should be the same than from backend. The website_publisher can decide to
create or not a forum linked to this course and decide independantely to allow
the review and comment on that course.
Commit linked to task ID 1941250 and PR #31584.
Purpose of this merge is to perform some code cleaning in eLearning
controllers and demo data. There are also some fixes coming from first
user testing of eLearning. See sub commits for more details.
Merge linked to task ID 1941250 ("fix all the eLearning").
closesodoo/odoo#31512
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Since design refactoring from af41382fa1, eLearning navbar style
was not displayed correctly. This commit fixes this by applying same design
rules as user profile page navbar.
Task ID : 1941250
PR #31512
If a new user try to access the elearning platform or his porfile, if he has
no karma, has it is the case for new users, he won't get any rank. So that
the next rank karma minus current rank karma equals zero.
To avoid this, next_rank will always be first one existing if the user has no
karma. Also, the current rank will not be displayed if the user has no karma.
finally, next rank will not be displayed if the user reached the last existing
rank.
Task ID : 1941250
PR #31512
Badges that should be displayed on user's profile page must be website
published. Badges that are website_published are typically forum badges or
others that will be configured for eLearning.
Task ID : 1941250
PR #31512
Simple fix to already have the standard gray background. Future commits will
improve display of not fullscreen lessons but this fix was necessary for
incoming work.
Commit linked to task ID 1941250 and PR #31512.
Currently a slide that can be previewed is never set as completed. Correct
condition to not update the hard slide-partner relationship is:
* either current user is public;
* either current slide is not published (happens when a publisher sees still
unpublished lessons);
* either current user is not member of slide channel (happens when seeing a
free preview slide without being channel member);
Commit linked to task ID 1941250 and PR #31512.
Correctly fetch courses the current user is a member of, not those he already
finished at least a lesson.
Commit linked to task ID 1941250 and PR #31512.
Currently there is a tool method on controller allowing to prepare some
slide related data. However controllers still add values in the slide
dictionary outside of this method, making it non consistent.
Let us prepare all side related data in this tool method to simplify code
understanding.
Commit linked to task ID 1941250 and PR #31512.
Purpose is to order methods and routes according to the main related model.
Main routes are above, then tools (sub routes, json routes).
Commit linked to task ID 1941250 and PR #31512.
Purpose is to have a bit more demo data allowing to test quizzes and see
how they behave. Notably
* have more than one question in existing quizzes to check answer validation
more in-depth;
* have more than 2 answers to check answer highlighting more in-depth;
* clean a bit user related demo for channels and slides;
Commit linked to task ID 1941250 and PR #31512.
Media dialog was trying to reach the current media's parent node, which
was not possible as it was cloned on instantiation.
To fix this, the `showImageDialog` now passes the `onlyImages` option
upon instantiation, checking the parent's data. It also passes the
media's parent if said parent is a video. This way, neither of these two
things need to be done in media dialog.
closesodoo/odoo#31634
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
In some cases when computing reconciliation propositions against
reconciliation models, there may be case where we try to divide by 0
This commit handles the case
OPW 1946266
closesodoo/odoo#31534
Signed-off-by: "Lucas Perais (lpe)" <lpe@odoo.com>
Currently, group Team Leader does not imply group user.
However a team leader is always a user and should be member of
the corresponding group.
closesodoo/odoo#31539
Currently, a Team leader can't approve a leave of an employee
in his team if the leave type requires an allocation.
The reason is the `ir.rule` for `base.group_user` restricting allocation
read access to only your own allocation (`[('employee_id.user_id', '=', user.id)]`)
There are no `ir.rule` for group Team leader.
Therefore, a team leader can't read allocations for his team members.
Fix: add an `ir.rule` to allow a team leader to read allocations
of employees in his team.
+ add associated tests
When making a poll, an event is registered on each channel. Once
a notification is sent on a channel, only the events of the
notified channel are removed. A pointer to the event is kept
in all other channel the user subscribes to until those channel
are notified.
Since a user usually has many mail.channels but only a few active ones,
a new event and a bunch of pointers are created at each poll and
never removed.
This fix simply remove the pointers to the current event at the
end of a poll.
closesodoo/odoo#31215
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Steps to reproduce the bug:
- Activate multi currencies on your user
- Let's consider currency A and currency B and currency A is the one set on your company
- Create a customer invoice I with currency B
- Go on the tree view of customer invoices and select I
- Click on "Action" and select "Generate an invoice"
- On the wizard, clear the currency B
Bug: A traceback was raised because the function amount_to_text requires a currency.
opw:1958888
closesodoo/odoo#32202
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Steps to reproduce the bug:
- Create a BOM for product P
- Generate variants for P: P1 and P2
- Go to BOM of P and click on Structure & Cost
- Change the current variant to P2
- Click on "Print"
Bug:
A traceback was raised because the function _get_bom expects in arguments that
product_id is an id and not a recordset.
opw:1950401
closesodoo/odoo#32128
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
- Create a new Sale journal
- From the accounting dashboard, click on the name of the journal
created
Invoices from all sale journals are shown.
The filtering performed is not sufficient: it should filter by journal.
opw-1958446
closesodoo/odoo#32166
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The delivery lines (move_lines) have two way to be displayed in a view:
- with move_lines (all move line of a stock.picking)
- with move_ids_without_package (same but removing packages)
But so if we write directly on move_ids_without_package we would not
trigger the stock.picking @api.depends('move_lines') _cal_weight method
thus the picking weight was not updated in some instances.
With this changeset, we adds the move_ids_without_package as depends so
on move_ids_without_package onchange the total weight should be set to
the correct weight or 0 (if move_lines is not in the view) and on write
the correct weight should be computed.
opw-1959523
closes#32157
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Steps to reproduce:
- Install Accounting and Sale
- Enable the developer mode.
- Go to Settings > Users & Comp > Your user, edit to check both "Tax
Display B2B" and "Tax Display B2C" boxes.
- Go to Settings > General Settings > Accounting > Reporting, check the
"Add totals below sections" box.
- Create a sale order in the sale module, the sale order must have at
least one section with several products.
- Print the sale order. The subtotal amounts are wrong.
There are two different subtotals amount to compute, one for the
*Amount* column and one for the *Total Price*. The actual computation
did not store the two amount in different variables. Multiple template
are broken in the same way.
Fine tunning of 716ff76
Co-authored-by: Nans Lefevre <len@odoo.com>
opw-1950833
closesodoo/odoo#32148
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Having two move lines to reconcile.
The debit one with a past date.
The credit one with a future date.
Have a write-off in the same account as the move lines.
Before this commit, the function that creates the write-off move lines
(_create_writeoff) returns two move lines (the write-off move line itself
and the balance move line) normally only the balance move line should be
returned. Because of this, the reconciliation is not done correctly:
the credit move line is reconciled with the write-off and the balance
line. And the debit move line is not reconciled.
Now, the function _create_writeoff returns only the balance line so the
debit move line, the credit move line and the balance line are totally
reconciled.
opw-1924973
closesodoo/odoo#32055
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Allowing to override the _get_rendering_context and call the new
function (_get_rendreing_context_model) with a different custom model
to render the html.
opw-1946792
closesodoo/odoo#32101
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Before this PR quite a lot of the lines on the fiscal positions
"EU landen", "Niet-EU landen" and "Installatie en Afstandsverkopen"
where mapped wrong, some of the lines even referred to another
tax percentage.
Changes:
- The tax "BTW te vorderen laag (inkopen) 9%" on the product
mapped to the tax to apply named "Inkopen import buiten EU laag 6%",
which should be "Inkopen import buiten EU laag 9%" to correctly
counterpart the taxes. All the other changes where similar,
either invalid tax rates where applied or it mapped to a wrong category.
- "Verkopen/omzet overig diensten" on the product would map to
"Installatie/afstandsverkopen buiten EU" as the VAT to apply.
This should map to "Verkopen export buiten EU".
- Added 3 accounts for Omzet NL handelsgoederen 1,
Omzet NL handelsgoederen 2 and Omzet NL handelsgoederen 3
- Mapped the 3 accounts to the fiscal position
"Installatie en Afstandsverkopen" their relevant lines.
- Removed purchase taxes from fiscal position "Installatie en Afstandsverkopen" .
- Mapped the right taxes to the three fiscal positions their VAT tabels.
- Updated .pot file to add the three extra accounts.
Closes#31403closesodoo/odoo#32130
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When the pdf of a vendor bill is sent to the alias of a journal,
all the partners that match one of the email address present in the mail thread
are added as followers of the newly created record.
This is a problem since the vendors are actually not concerned by the internal
work that is done, only internal users are.
As a result they get spammed by useless emails, and complain to Christine.
It was put in commit a4df9f8c93 despite not appearing in the task description.
We filter the partners to only keep the ones that belong to internal users.
opw 1958729
closesodoo/odoo#32110
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
- Activate multiple UoM
- Create a Repair Order
- Add a repair line ('Parts') of type 'Add', change the UoM
=> the unit price is not modified
- Add a repair fee ('Operations'), change the UoM
=> the unit price is not modified
The UoM is never taken into account.
opw-1953752
closesodoo/odoo#32127
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When creating an invoice programmatically, make sure to retrieve the
`currency_id` field set by `_onchange_partner_id`.
opw-1951314
closesodoo/odoo#32097
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>