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>
When creating several attribute lines for the same attribute, the function _update_product_template_attribute_values
in model 'product.template.attribute.line' only kept the product.template.attribute.value records of the last
created line. So it generated issues with the product configurator because no value was founded for certain attribute line
in function _get_possible_combinations defined in model 'product.template'.
Now it's forbidden to create several attribute lines for the same attribute.
opw:1950786
closesodoo/odoo#32086
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
- Process a WO (e.g. 'Manual Assembly' from the demo data)
- Create a scrap for component 'Drawer Black'
- A new wizard appears:
'The product XXX is not available in sufficient quantity'
- Click on 'Discard'
A scrap is created in draft, but it cannot be canceled.
The scrap shouldn't have been created in a first place, but this cannot
be changed in stable. Therefore, we delete it.
opw-1946254
closesodoo/odoo#32122
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Do a MISC operation representing a payment
revert it
Do a statement line for that amount
Click on "reconcile" on the bank journal
Before this commit there was a Division By Zero traceback
This was because the bank account line had a zero amount_residual
due to its reversion
while the statement line was negative.
After this commit, for liquidity lines, we take the total amount instead of the residual
Because a reverted payment line can always be associated with a statement
OPW 1947362
courtesy of @smetl (las@odoo.com) for the fix
closesodoo/odoo#32105
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Set the currency of the supplier info according to the currency set on
the partner.
opw-1951314
closesodoo/odoo#32098
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, in some cases, clicking on a crm.lead
triggered a traceback saying "the column crm_team.alias_user_id does not exist"
This was because the field alias_user_id on mail.activity.mixin,
was itself _inherits from mail.alias
In that case, "overriding" the field in the child class is actually
a plain definition of the field, making it "loosing" its related nature
After this commit, there is no traceback anymore
closesodoo/odoo#31511
When renaming a binary field name (through Studio for example), an error occurs
since rev. odoo/odoo@66f0e26
As the binary (custom) field is now created with `attachment=True` by default,
it has no associated column in the database ; this latter shouldn't be renamed
then.
Task 1942181
closesodoo/odoo#31504
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Issue detected with tests in the branch that replace deferred by native
Promise. Need to add isMedia to detect if the target is already a media
when focus the editor.
closesodoo/odoo#31632
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
As both `survey_url` and `public_url` are `Char` fields, the correct widget
to use is `CopyClipboardChar` (`CopyClipboardText` is for `Text` fields).
This was causing a display issue (the style of mentioned widgets is different).
Task 1935577
closesodoo/odoo#31624
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Why reverting ?
The fact that the control panel changes width on first edit is confusing to the
user. The whole form shifts down. We want to avoid having elements appearing
and disappearing. The issue that the user does not know if he has to save is
still up to date, and will be addressed in the next saas. We will most likely
use what has been done in this task to only display 'There are unsaved
changes'. Thank you all for your work here!
Original task and revert discussion can be found on task ID 1917637 .
This reverts commit 514d6fb90d.
closesodoo/odoo#31622
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Default the responsible to the current user if the mo is created
manually.
Default the responsible to empty if the mo is created by a procurement
rule.
task 1938495
closesodoo/odoo#31395
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
We added the form view to remove no needed fields.
It's now use the same fields used by the editable list.
We also added the Kanban view to improve the layout "Optionnal Product"
tabs on mobile device.
Task: 1945006
closesodoo/odoo#31596
Signed-off-by: =?utf-8?q?Adrien_Dieudonn=C3=A9_=28adr=29?= <adr@odoo.com>
Commit 4960453d added the field signature in field_registry.js and
in signature.js.
closesodoo/odoo#31434
Signed-off-by: =?utf-8?b?R8OpcnkgRGVib25nbmllIChnZWQp?= <ged@openerp.com>
Steps to reproduce:
1. install `hr_contract_salary`
2. create a contract
3. set or update `hr_responsible_id` on the contract
(it creates a `mail.tracking.value`)
4. uninstall `hr_contract_salary`
5. go to the contract form view
=> traceback `hr_responsible_id` does not exist
Before displaying a `mail.tracking.value`, `groups` of the
fields are checked to fitler tracking values according to access
rights of the user.
However if the module that added the field has been uninstalled,
the field does not exists anymore.
Fix:
check if field exists before getting fields groups.
If the field does not exists: set groups to `base.group_system`
closesodoo/odoo#31398
Signed-off-by: "Yannick Tivisse (yti)" <yti@odoo.com>
super.message_post in _message_log is wrong.
Also use `*args` and `**kwargs` in method parameters
closesodoo/odoo#31354
Signed-off-by: "Yannick Tivisse (yti)" <yti@odoo.com>
For iframes, we need to inject summernote because there are references
to "document" in it. When loading the iframe, if it is canceled, there
is a risk that the library is erased and that it breaks the field html.
We must also slightly modify the library to prevent it from making
changes to the library of the main "window".
Currently it is not possible to create or write on a mail
activity without having the rights to write on mail activity type.
This is caused by the some related fields on mail activity are
not readonly hence trying to write on mail activity type
This issue was previously shadowed by a sudo call both in
the create and write methods, those disappeared
with the following commit odoo/odoo@b9c8ba83e6
As those fields should never have been defined as readonly=False,
this commit sets them to readonly=True
closesodoo/odoo#31468
Signed-off-by: "Romain Libert (rli)" <rli@odoo.com>
This merge contains various improvements and fixes related to the new
eLearning application. Sub commits will give you more details on this
merge content as everything is not completely related.
Containing mainly
* improve demo data to have more links and quizzes;
* redesign the profile page, make it responsive and use bs4 when possible;
* fix lesson list in training channels not displaying all slides;
* improve lesson list design;
Merge linked to task ID 1941250 and PR #31453 about post-merge
cleaning and review.
Signed-off-by: "Thibault Delavallee (tde)" <tde@openerp.com>
Currently slides are displayed in a reorderable list, using current user
access rights. This means external customers see only published and free
lessons.
However purpose of course page is to display all lessons, and display
only available ones as clickable. Other one should be displayed as muted
to tease people.
Note that a specific lesson page does check for access rights. Here we
just display all lessons names. A label for free preview is also added.
Fetch of data when displaying a channel is therefore a bit modified as
there are less differences between training and documentation channels.
User progress is also updated to be easier to use in templates.
Commit linked to task ID 1941250 and PR #31453
Purpose of this commit is to make a new design linting pass on homepage.
Containing
* various bs4 and responsive improvements;
* footer banner improvements;
Commit linked to task ID 1941250 and PR #31453
Purpose is to perform a cleaning pass on website_profile templates. It
cleans the DOM, templates and CSS and proposes various improvements on
general design and layouting. This includes notably
* lessen custom CSS and use bootstrap 4 classes;
* simplify layout when possible;
* make is responsive and mobile friendly;
No functional changes should occur with this commit.
Sub modules are impacted as profile is extended in various other
applications: eLearning, forum and certification.
Commit linked to task ID 1941250 and PR #31453
A specific template to display an icon depending on slide type has been
added recently. However presentation icon was missing. This commit fixes
that.
We also added an option to tune the classes added on the icon. It gives more
flexibility when using it.
Commit linked to task ID 1941250 and PR #31453
Purpose of this commit is to fix and improve some model related bits of
code:
* add an ondelete cascade on some required fields;
* make a public method private because it should be accessed only through
controllers;
* do not add odoobot as channel member; notably for demo data it can create
unnecessary of noise in members and notifications;
Commit linked to task ID 1941250 and PR #31453
Purpose of this commit is to improve eLearning demo data. Notably links
(links to external resources on a given slide) and quizzes (allowing to
gain karma) are added. Some slides are added. Demo user interaction with
eLearning is also added, such as membership and votes. Finally a channel
is specifically kept specific to 1 single slide of type certification as
its flow has to bypass some screens when selling pure certifications.
Commit linked to task ID 1941250 and PR #31453
Before this commit, a pricelist discount based on the product qty could
be created and the user may believe that it will work also for event
tickets.
Now: when configuring a pricelist discount based on the product qty a
warning message is show to alert that this kind of discount don't work
in event tickets.
opw-1940368
closesodoo/odoo#31459
Signed-off-by: "Lucas Perais (lpe)" <lpe@odoo.com>