There is a missing depends on subscription_ids fields, meaning it is not
correctly refreshed when contacts are updated. When dealing with m2m using
the o2m model as relational table, depends have to be specified on field
itself to allow recomputing the fields.
Task ID-2431217
COM PR odoo/odoo#71140
X-Original-Commit odoo/odoo@11ffeddf23
X-original-commit: 37bad522bcaf9a6db2f676286fb9ceb1a188dcab
- Create a pos order, pay and valide
- Close Pos
- reopen pos
- search this order
- click print ticket
--> Issue the hash doesn't appear on the ticket
closesodoo/odoo#71217
X-original-commit: 40adcce221ab882d034b2f4ed2987a234ba434f5
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
In database with frontend and live chat there are lot of bad query error.
bad query: UPDATE "mail_channel_partner" SET "write_uid"=5,"write_date"=(now() at time zone 'UTC') WHERE id IN (328111)
closesodoo/odoo#71207
Error: Could not serialize access due to concurrent update
X-original-commit: 36a9e761c8d6c1c6e9611cc410ecca82ff2b1659
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The method that computs what is due and the change of an order is based
on the selected payment line which is wrong, because if you add and
remove a payment line, none will be seleced, that lead to issue in this
case because a change is computed, and it won't match the invoices
because an amount_return is sent to server.
To reproduce you can follow this simply procedure:
- set rounding half-up to 0.05
- create a product at 0.98
- open POS and create an order with the product
- go to payment screen
- add cash payment (1€ auto filled)
- add bank payment (It'll autofill -0.02 not really a problem)
- remove the bank payment => It'll show 0.02 due (it is caused because of no payment method is selected)
- Set a customer and check the invoice => unbalanced (0.02 probably because it is set in amount_return of the request)
closesodoo/odoo#71195
X-original-commit: af5a88e84fb1c05c4be38930373165f28a06f4f0
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Hide fields related to belgian localisation when not using a belgian
company.
Task Id: 2496597
closesodoo/odoo#69691
Related: odoo/enterprise#17881
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- using join on required fields ease PostgreSQL planner guessing
- skip useless join, the fastest code is the not executed one
- skip dynamic `or` insertion and replace with a union all in CTE
- replacing `where exists` with a join is then possible
- a bit of alignment
from some s to some ms execution time.
Submit an "Apply for a job" on website , goes from
`"POST /website_form/hr.applicant HTTP/1.0" 200 - 182 2.649 0.106`
without this patch, to
`"POST /website_form/hr.applicant HTTP/1.0" 200 - 185 0.492 0.107`
when this patch is applied
closesodoo/odoo#71028
X-original-commit: 783280375ff04955978a14f007f96d6c4d7443b1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps:
- Install Events
- Go to Events / Configuration / Settings
- Enable Tickets
- Go to Sales / Configuration / Settings
- Enable Multiple Sales Prices per Product
- Go to Sales / Products
- Edit Event Registration
- Sales tab
- Pricing
- Pricelist: Public Pricelist (USD)
- Price: $6
- Go to Sales
- Create a new quotation
- Pricelist: Public Pricelist (USD)
- Product: Event Registration
- Event: Design Fair
- Ticket: VIP
Bug:
The pricelist is not taken into account. Unit price should be $900 but
is $1500.
Explanation:
The original issue comes from this commit: https://github.com/odoo/odoo/commit/379f1490c93dc599a74add2d678c18fbba1efa62
The advertised amount was not the one showing up in the cart. This is
because the pricelist was not taken into account anymore when entering
the payment process.
Using `price_reduce` instead of `price` enables all kinds of discounts
on the final price.
However, `price_reduce` relies on the context to find the current
pricelist.
This commit adds the context needed to compute the price of the tickets.
This context is the same as the one in the sales module since pricelists
are working fine there: https://github.com/odoo/odoo/blob/b208570ce8399bc6d3e4a8ba02eef6558e0a6ccc/addons/sale/models/sale.py#L1494
The currency conversion is done in `product.price`. It's therefore
already done when calling `price_reduce`.
opw:2519453
closesodoo/odoo#71175
X-original-commit: bee8ac5ccf8106b25566332e769b73e8f707d05b
Signed-off-by: backspac <backspac@users.noreply.github.com>
The main company can have something else than EUR or USD, especialy when
testing localizations.
closesodoo/odoo#71171
X-original-commit: 91a3dca13c1de637b25810ed7f509dce6e66c908
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
This method was defined in `account` but overrided in `l10n_cl`. Prefix
the method to avoid that.
X-original-commit: c60530eedc70f7bb6040adaf311a273bad5aa37c
When one or more vendor bills in Italian e-invoice format were sent to the registered PEC mailbox, if they are in the PKCS#7 format ('.xml.p7m'), nothing happened.
The e-invoice content should be automatically decoded and the invoice should be created as soon as the xml file is fetched from the PEC mailbox.
A new remove_signature function has been added in a tools/remove_signature.py file to handle this case.
The OpenSSL and pyOpenSSL libraries must be installed.
They are not in requirements.txt but they're probably available.
New tests has been provided for the signed email reading method.
opw-2460485
closesodoo/odoo#71164
X-original-commit: ed723be917637320fc4d2787bdf505e4a7a8216d
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Paolo Gatti <lordkrandel@users.noreply.github.com>
This is a forward-port of commit https://github.com/odoo/odoo/commit/970387f91fea0cb47404612f7d519ffba2c9ad3b
In editable list view, moving to next cell using TAB key crash when the
following field is becoming read-only (i.e non-focusable) and an onchange()
event is triggered.
Consider an editable tree view like this:
<form>
<field name="o2m" onchange="1">
<tree>
<field name="description"/>
<field name="date" attrs="{'readonly': [('description', '!=', False)]}"/>
<field name="type"/>
</tree>
</field>
</form>
1. Edit 'description'
2. Issue a TAB keypress before 'date' becomes read-only
It will crash while calling getSelectionRange() on an empty element.
opw-2523630
closesodoo/odoo#71163
X-original-commit: 2a880a8020b55b692505846e9626359fe019dbdb
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
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>