With this commit, changing the scheduled date on a planned production
order will unplan the workorders and so highlight the 'Plan' button to
replan them from the new scheduled date.
closesodoo/odoo#71089
X-original-commit: a6783acaef3c7c2224d1cda72717a36c4b38c001
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
When website is installed through CLI, the ir.actions.todo
'website_configurator_todo' is not launched and stays in
'open' state. In this case the FIRST time we create a new
website, this ir.action.todo is launched at the end of the
configurator wheter it fails or not.
- If configurator fails, the ir.actions.todo is returned
by button_choose_theme when choosing a theme in the
theme_view_kanban view. /website/configurator is called
and since configurator_done was not correctly set to true
on current website, the screen theme_view_kanban was
rendered a second time.
- If configurator succeeds, the ir.actions.todo is returned
by button_choose_theme in configurator_apply. The route
/website/configurator is called a second time and since
configurator_done is set to true the route redirect to the
website homepage but not in edit mode.
The fix consits in correctly setting configurator_done in
configurator_skip and in launching the configurator through
the ir.actions.todo in create_and_redirect_configurator.
closesodoo/odoo#71148
X-original-commit: 1752548fabc9b184b5b67b659b505c4cfe8dc0c7
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Original issue:
Create a payment like follow:
Payment type: receive money
Partner type: customer
Destination account: whatever receivable
Amount: define an amount (i.e. 90.00)
On Save, open the draft jounral entry created.
Lower the liquidity or counterpart amount and add a writeoff
Go back to the payment, change the amount and save.
The journal entry writeoff will swap from debit to credit at every
change made to the amount. This occur also when changing currency on the
payment
opw-2475223
Otherwise, this fix is not covering all cases:
inbound with write-off in debit
inbound with write-off in credit
outbound with write-off in debit
outbound with write-off in credit
closesodoo/odoo#70903
X-original-commit: 01b9bff35e85fafb1a50bb0819123d186acf4925
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Currently, clicking on the "upgrade" button from Apps in community
opens the corresponding page in the same tab. As a consequence, the
user completely leaves his database and it can quickly become tedious
to get back to it.
so in this commit, clicking on the 'upgrade' button should open the
corresponding webpage in a new tab
closesodoo/odoo#70636
Taskid: 2513785
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
Slightly improve the overall UI of Odoo with a more modern feel by updating the
current 'loading' icons that look quite old school.
Use fa-circle-o-notch instead of old style fa-spinner
task-2346142
closesodoo/odoo#59454
Related: odoo/enterprise#13908
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Having those fields as translatable lead people to think those will be
translated into recipient's language. This is incorrect as translations
in Odoo are based on current user, not about any recipient who would
see the field value.
In this commit we therefore remove translation capabilities for
subject and preview. Indeed mailings currently offer no multi languages
support. Instead people should create separate mailings targetting
some specific recipients, based on lang or country for example.
Task ID-2535807
closesodoo/odoo#71093
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Wherever there is a sidebar, this moves all icon and image options to
their own section of it. This also enables previews.
The "spin" option was deemed unnecessary and therefore removed.
TODO: restore the link option for icons. It wasn't working properly
before this and was removed until it is fixed so as not to do any
unnecessary coding for a broken option.
closesodoo/odoo#70952
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Batch the bom_search of bom_lines in mrp_bom.explode.
If we represent the bom hierarchy as a graph, essentially
switch from a depth-first to a breadth-first search, allowing
to batch search boms for each depth level, hence improving
the overall performance.
closesodoo/odoo#71137
X-original-commit: 44ae26e4477e1b76b3dbb0f1acd50e8553b14d71
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
In `prepend_html_content`, if body `html_body` and `html_content` are
`Markup` objects, the processing of `html_content` through `re.sub`
will strip away the `Markup` flag, leading to the later concatenation
of the body and content first escaping the content (to safely convert
it to a `Markup`) before performing the concatenation proper.
As a result, the `preview` of a `mailing.mailing` would be
double-escaped, and the markup hiding it would instead be printed as
part of the body.
Assume that the type of `html_content` is str-compatible, and
immediately rewrap the value after processing it through
`re.sub`. This should do nothing if `html_content` was an actual
`str`, and will re-flag it as a `Markup` if it was one.
Also change the finding of the insertion point to use `re.search`, I
don't understand why this uses `finditer`, it just makes the code more
complicated.
closesodoo/odoo#71090
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
With this commit we improve boolean_toggle widget design, now widget will
display fa-check-circle icon if it is enabled i.e. it has true value, widget
will display fa-times-circle icon it is disabled i.e. it has false value.
task-2488999
closesodoo/odoo#68772
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
with this commit: we improve many2one_avatar widget for editable form view,
previously many2one avatar in edit mode was not displaying image, it was
displaying only many2one selection input, this commit adds image before
many2one input to have unify design with readonly form view.
This is especially motivated by the fact that we plan on getting rid of the
readonly formview to always be in edit mode.
task-2451340
closesodoo/odoo#67366
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
As part of the Python 3 compatibility effort,
01e3514147 moved all uses of urllib(2)
to werkzeug & requests as the packages were renamed and reorganised
between P2 and P3.
For `module.py`, it looks like I confused the `urls` local variable
for an already imported `werkzeug.urls` and just tried calling
`url_parse` on that. Which doesn't work, because `urls` is a
dict.
Fixes#71076closesodoo/odoo#71120
X-original-commit: 0cfe528de82c1de8971e5bb5f66103447eae781c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
There are two mixin involved in SMS notifications
* mail.thread: standard SMS sending capabilities;
* mail.thread.phone: advanced use with support of blacklist;
Both require to define fields to use when searching for phone numbers
(generally phone and/or mobile). Those are ``_sms_get_number_fields`` for
mail.thread standard implementation (in SMS module) and ``_phone_get_number
_fields`` for mail.thread.phone advanced implementation (in phone_validation
module).
In this commit we make mail.thread.phone act like a more advanced version
of mail.thread by making _sms_get_number_fields use result of _phone_get_number
_fields, and not the inverse. It allows to remove some overrides notably in
CRM having to define twice fields.
Task ID-2528169
closesodoo/odoo#71111
Related: odoo/enterprise#18428
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The "Accept Terms & Conditions" toggle had been mistakenly removed from
the "Customize" tab by commit 573ed74.
task-2494916
closesodoo/odoo#71102
X-original-commit: b64519c1cb15540db5343f69be501e7a6d507b06
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
The `sale` code is going to experience some refactorings/improvements soon, and in preparation of those tasks, we believed it was time to reorder the python files. Splitting files according to python classes, and using targeted names as file names will improve the clarity and maintainability of the module, easing the future work.
To conserve the blame history of the splitted files, the file split are done in 2+ commits.
* `account_move.py` & `account_invoice.py` -> `account.move{.line}.py`
* `payment.py` -> `payment_acquirer.py` & `payment_transaction.py`
* `sale.py` -> `sale.order{.line}.py`
* `utm.py` -> `utm_campaign.py`
Moved the `mail_compose_message.py` file to the `wizard` folder, since it targets a wizard.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#71041
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
Currently, create a service product and select a project or a project
template from the 'sales' tab, it is not possible to select projects
with allow_timesheets = false
So in this commit, the domain of the project_id and the
project_template_id fields should include projects for which
allow_timesheets is false except if the 'Timesheets on tasks'
option is selected as a service_policy
Also if onchage of service_policy, the project field will be empty.
TaskID-2522084
closesodoo/odoo#71099
X-original-commit: 0769a148f731188f53f1b2b3af881d88e40feb35
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Before this commit: when user selects company from company switcher, page is
reloaded, what if user wants to select multiple companies from dropdown, he
have to wait for page reload and need to do same process again.
After this commit: when user selects company from company switcher, page
will not reloaded as soon as user toggles checkbox, user will given time to
select another item or unselect other item from dropdown, so user can select
multiple companies or unselect multiple companies.
task-2467747
closesodoo/odoo#70799
Related: odoo/enterprise#18376
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
With this commit: we are adding basic search feature for binary fields,
custom filter will have binary fields and selecting binary field will
display 'is set', 'is not set' operators.
with this user can at least filter records based on whether binary field
is set or not set.
task-2512226
closesodoo/odoo#70149
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Currently, in the expense module, demo expense products are more
specific to the expenses and label tooltip of the cost field doesn't
convey proper difference between fixed and variable cost of
expense products.
So in this commit, replace old expense products with new expense
products and recreate expenses and reports using these
categories(products). it will provide better experience on demo.
overwrite label tooltip of cost field in expense app to convey proper
difference between fixed and variable cost of expense products.
closesodoo/odoo#68955
Task-id: 2491238
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Make the email body take the entire space to avoid having some wasted space,
this will also make the user have more focus when designing an email.
Revamp the settings notebook page in order to give more clarity to the user,
and move some fields from the main form have been moved to this section to
have more space in the bottom for the email body.
In the mailing form, when the mailing is sent or is being sent, set fields
which are no longer useful for the user to change to readonly mode.
Add a wizard that enables the user to schedule a mailing, the schedule field is
still kept in the form for the user to be able to change the date when the
mailing is in the queue (if they want to send it sooner).
Display an action helper-style content when the email is empty, because,
currently, the user is left with a big white screen when the email has no
content which is not desirable.
Update the html_empty function to take into account style attributes to better
match the editor's void content.
Hide A/B testing fields from SMS mailing form view as these are not supported
for SMS marketing.
Task-2469409
closesodoo/odoo#68882
Ent-pr: https://github.com/odoo/odoo/pull/68882
Related: odoo/enterprise#18391
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, across Odoo, there are around 40+ many2one fields defined with a
'selection' widget. Since the many2one widget has options to limit record
creation and opening, there is no reason to define a many2one field with a
selection widget. The selection widget does not allow for searching, and is
limited to 100 records.
PURPOSE
to update the definition of any many2one on which we applied a 'selection'
widget, and instead use the standard many2one widget with disabled
opening/creation instead.
after this commit,
for each many2one field defined with widget="selection", widget="selection" is
replaced with options="{'no_open': True, 'no_create': True}"
Task : 2476488
closesodoo/odoo#68387
Related: odoo/enterprise#17316
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Purpose
======
During the development of the task #2169100, it appeared that the synchronisation
of a task's partner_id according to its project's partner_id and its parent's
partner_id was not very clear.
A first idea was to simplify the partner_id management: as it could be annoying
for the customer to see all the task's partner_id overriden after project's
partner_id modification, the idea was to just use the parent's parnter_id or the
project's partner_id as default value of the task's partner_id. Then, if the
partner_id of the project or of the parent is changed, there is no more impact
on the task partner_id itself.
The main problem of this solution is that the management of the task's partner_id
is also extended in several others modules like sale_project and sale_timesheet.
You can find below what seems to happen with all these task partners.
Start following rules according to which module is installed.
(for the record: sale_timesheet depends on sale_project which depends on project).
Rules are applied in the order they are written.
Rules labelled "O" only apply when changing the project through the task form view.
Rules labelled "C" apply everywhere.
technical: C=compute, O=onchange
project
C.1 If parent's partner changes and the partner is not set, then set the parent's
partner
C.2 Else if project's partner changes ant the partner is not set, then set the
project's partner
sale_project [+ project]
C.1 If the project's sale order line's partner changes and the partner is not set,
then set the project's sale order line's partner
C.2 Else apply (project.C) rules
sale_timesheet + [sale_project + project]
C.1 Apply (sale_project.C) rules
O.1 If the project is billed "At Project rate" or "At Employee Rate" and the
partner is not set, then set the project's sale order's partner
the sale order line's partner
Specification
===========
- If the partner changes, we ignore all current tasks and let them be. We set the
new partner as default value on all new tasks. In detail, we have done
this:
- When the user creates a task give the customer of the default project or the
task parent as default customer for the task.
- When the user changes the project and no partner in the task, we take the
partner of the new project (if this project has a customer).
- When the user changes the customer of the project, the linked tasks are not
impacted by this changes, even if some tasks have not a customer yet.
- When the user changes the customerf of the parent task, the child tasks are
not impacted by this changes, event if these tasks have not a customer yet.
- remove the onchange rule to remain consistent.
- get the display_project_id if parent is subtask.
## Miscellaneous
- display commercial_partner_id in project kanban view rather than the partner_id
in the kanban card of each project to be consist with task's kanban card.
TaskID: 2232042
closes#51471
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
Before this commit, when the partner_id in the project, we display the
partner_id selected in this project in the kanban card of it.
This committ displays the commercial_partner_id rather than the
partner_id in the kanban card of each project in the kanban view to be
consist with task's kanban card.
task-2232042
closes#51471
Before this commit, when the user creates a subtask in subtask then we
take the project_id but if the user has changed the display_project_id,
the subtask of this task has not the correct project.
This commit gives the project_id by default if the parent task is not a
subtask or the display_project_id of this parent task is not defined
otherwise it gives the display_project_id.
task-2232042
closes#51471
Purpose
=======
During the development of the task #2169100, it appeared that the synchronisation
of a task's partner_id according to its project's partner_id and its parent's
partner_id was not very clear.
A first idea was to simplify the partner_id management: as it could be annoying
for the customer to see all the task's partner_id overriden after project's
partner_id modification, the idea was to just use the parent's parnter_id or the
project's partner_id as default value of the task's partner_id. Then, if the
partner_id of the project or of the parent is changed, there is no more impact
on the task partner_id itself.
The main problem of this solution is that the management of the task's partner_id
is also extended in several others modules like sale_project and sale_timesheet.
You can find below what seems to happen with all these task partners.
Start following rules according to which module is installed.
(for the record: sale_timesheet depends on sale_project which depends on project).
Rules are applied in the order they are written.
Rules labelled "O" only apply when changing the project through the task form view.
Rules labelled "C" apply everywhere.
technical: C=compute, O=onchange
project
C.1 If parent's partner changes and the partner is not set, then set the parent's
partner
C.2 Else if project's partner changes ant the partner is not set, then set the
project's partner
sale_project [+ project]
C.1 If the project's sale order line's partner changes and the partner is not set,
then set the project's sale order line's partner
C.2 Else apply (project.C) rules
sale_timesheet + [sale_project + project]
C.1 Apply (sale_project.C) rules
O.1 If the project is billed "At Project rate" or "At Employee Rate" and the
partner is not set, then set the project's sale order's partner
the sale order line's partner
Specification
=============
- If the partner changes, we ignore all current tasks and let them be. We set the
new partner as default value on all new tasks. In detail, we have done
this:
- When the user creates a task give the customer of the default project or the
task parent as default customer for the task.
- When the user changes the project and no partner in the task, we take the
partner of the new project (if this project has a customer).
- When the user changes the customer of the project, the linked tasks are not
impacted by this changes, even if some tasks have not a customer yet.
- When the user changes the customerf of the parent task, the child tasks are
not impacted by this changes, event if these tasks have not a customer yet.
- remove the onchange rule to remain consistent.
TaskID: 2232042
closes#51471
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
The value taken into account in the SQL for the calculation were wrong:
- Not based on the state of the invoices (cancelled and draft
were taken into account)
- Had the tax included
opw-2464004
feedback-2478356
closesodoo/odoo#71088
X-original-commit: 8b0e438af24883f979cb54eb046564e4e2a3f64c
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bve-odoo <Abridbus@users.noreply.github.com>
The web editor does not work well with the e-learning fullscreen view.
It actually completely closes the fullscreen view and opens the edition on a
blank page.
To avoid this, we intercept the click on the 'edit' button and redirect to the
non-fullscreen view of this slide with the editor enabled, whose layout is more
suited to edit in-place anyway.
A small testing tour was added to ensure this behavior is kept.
Task-2507179
closesodoo/odoo#71086
X-original-commit: 8009e6fedb78e7c16764faef77459614c7ff5ed2
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit,
Share action was displayed on list view as well which
doesn't makes sense as it will always use `active_id` only.
With this commit,
we are displaying `Share` action on form view only.
opw-2530652
closes#70821closesodoo/odoo#71062
X-original-commit: 45845a87ab6a6260b42abacf16811684418cd775
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit improves the crm.iap.lead.mining.request error handling by
displaying the encountered error (currently one of "no results" or
"insufficient credits") within a warning block on top of the form view.
This allows the user to quickly understand what's going on and change his
parameters to get results or buy additional credits if he's out.
Furthermore, this commit simplifies the technical implementation by avoiding to
re-create a separate crm.iap.lead.mining.request when we encounter an issue and
instead allow the user to modify the current request with an error state.
UPG PR odoo/upgrade#2261
Task-2478427
closesodoo/odoo#67574
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When updating the quantities available for a product, an inventory move
is generated without setting the product_tmpl_id, as this field is related
to the product_id of the move. However, when creating the move, Odoo will
consider it a default missing value and will try to fill it in the method
default_get.
When navigating to the product variants of a template from the template form,
a default_product_tmpl_id is set in the context pointing to the template. This
context is propagated to the update quantity action to create/update quants for
the variant.
The problem when dealing with kits is that the products available to update
their quantities are the components of the kit. When navigating to a variant
and updating the quantities of a component of the kit variant, the default product
template in the context will be the kit template.
This is causing that, when generating the inventory move, the move is created with
product_id of the component, and product_tmpl_id of the kit template.
This issue creates a critical data inconsistency as the component's template is set
to the kit's template, which apart from making no sense generates a recursion error.
To fix this, when triggering the action to create/update quants for a kit product, it
must be ensured that no default product template is being set.
closesodoo/odoo#71069
X-original-commit: bdeea73dc1efb6ff7d02cc2f58347a69762bcc3c
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
If a MO is validated with all of its (component)
move_raw_ids.quality_done = 0, then when trying to validate the
nonsensical "The quantity to produce must be positive" validation error
will occur. This is due to all move_raw_ids being marked as Cancelled,
which auto-updates the MO state to cancelled, which prevents the
validation from properly completing.
To avoid this error, we prevent the user from having 0 consumption for
all components.
Task: 2422698
Related (v13 fix + bug description) Task: 2463893
ENT PR (test fixes): odoo/enterprise#18355closesodoo/odoo#71068
X-original-commit: 81ba7084aeb3899787d083a2a2568a490f9c53e5
Related: odoo/enterprise#18411
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Tiffany Chang <ticodoo@users.noreply.github.com>
Purpose
=======
Add a unicity constraint (on the url, UTM campaign, medium and source).
As we must care about null values, we can not implement it in SQL
(possible in pure SQL, but we will need to create an index on the
columns, which is not possible in Odoo if we want to customize the
error message).
Clean the code, before the "search or create" behavior was implemented
in the create, causing strange behavior (creating a link tracker with
the same values as an existing one didn't raise an error, but open
the form view of the existing link tracker).
Task-2090344
closesodoo/odoo#48845
Related: odoo/enterprise#9608
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, when we create an expense that is paid by company,
then create and approve a report, then post entries, 2 entries are
created. 1 is posted and is correct, the other one is in draft due to
the creation of the payment for employee and should not be there.
As when a company pays for an expense, in 99% of the cases,
it's because employees have a credit card funded by the company.
It happens often that company owners have this kind of card or even
employees but that's more common in the US. In such case,
it's just an account payable to visa or mastercard. so no need to
create a payment for the employee.
So this commit, draft entry will not be created when payment paid
by the company while posting the entries from the expense.
closesodoo/odoo#71063
Taskid: 2410551
X-original-commit: 2aedd076317b37ceffba061c48e3d4fc38f02ea9
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Manually adding a line should not trigger the computation of the field,
just like modifying the line fields that occur in the field's domain.
In other words, the dependencies of the field should be limited to the
ones declared on field or its compute method.
closesodoo/odoo#71049
X-original-commit: 1c39814bd729cc08882f1545c7d88b0592e63f9a
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
- Enable 'product configurator' and 'variant grid entry'
- Go to product [DEMO]:
- Add an optional product.
- Go to the variants tab and add some variants
- Select 'order grid entry'
- Remove all the variants
- Create a SO adding [DEMO]
Traceback will occur
opw-2439764
closesodoo/odoo#71048
X-original-commit: da9541089fcf33c778748c4c3da0d81f6b5ea227
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Right now, for failed SMS, user have to go through each record one
by one to resend the SMS, which is not ideal and user should be
able to resend SMS in batch from the list view.
This commit improves the behavior with following changes:
* Introduces an action 'Resend' which is availabe on list view of the SMS.
It enables resending multiple SMS (that are in error state). It also
displays appropriate toast notifcation to users so they know how it
worked (if few/none SMS sent successfully or there was no SMS that could
be resent etc).
* On the SMS form view, a new 'Retry' button is introduced, visible on SMS
whrich are cancelled or in error state. It pushes the SMS back in sendng
queue (outgoing state).
* 'Cancel' button on form view now also appears in error state.
* Uses the state-decorations on the list view for better identifications
of the records (info for outgoing, muted for canceled and danger for error
state).
taskID-2465233
closes https://github.com/odoo/odoo/pull/67502