Commit Graph
164871 Commits
Author SHA1 Message Date
Jinjiu Liu 125fcaa620 [FIX] website_sale: add conditions to make sure partner's name exists
Reproduction:
1. Install Event, Sales, Website, Contacts
2. Login as Admin, create a new portal user 123, set the password as 123
3. Go to Contacts, find the created user, add a shipping address, leave
the name blank
4. Open another tab login as the portal user, place an order
5. At the Address step, Edit the billing address, change the name from
empty to “Test Name”, click next
5. An error is thrown cause the new name is not equal to empty value

Fix: this fix aimed the conditions we have in the previous PR: https://github.com/odoo/odoo/pull/111708
This change will allow the user to add a name for shipping address at
checkout.Without the fix, if you
change the name of a shipping address, it won’t be able to get through.
This is because of how we manage the shipping address, e.g. shipping
address is managed as child partners. For shipping address, the check
can_edit_vat is always false. See here: https://github.com/odoo/odoo/blob/14.0/addons/portal/models/res_partner.py
Another check, e.g. if shipping is being edited, is added to make sure
name/email can be changed for delivery address. For internal user, the
editing of shipping address is not blocked because of the `share` check.
But the same condition is used to ensure the consistency in case we
change how the shipping address is managed in the future.

Note: if the data is '' for name for example, the pre-process will
convert it to `False`. Thus the edge case that `'' != False` doen't
exist anymore

Related PR: https://github.com/odoo/odoo/pull/111708

opw-3126325

closes odoo/odoo#134606

X-original-commit: 55423cbdeeb1ce35fb257624ea0d04d4be99a943
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Jinjiu Liu (jili) <jili@odoo.com>
2023-09-07 09:00:36 +00:00
Preksha Chouhan 46016e33ea [FIX] web: return updated list of fields in export template
When user access template at the time of export with deleted field.
The traceback will be generated.

To reproduce the issue(any model, here- 'account.move.line'):

- Install 'account_accountant' module
- Go to Settings > Technical > Database Structure > Fields
- Create a new field with model as 'Journal Item' and save
- Go to Accounting > Miscellaneous > Journal Items
- Select any record in list view and click on export and generate a new export
template with newly created field
- Go to 'ir.model.fields' and delete that field
- Go to 'Journal Items' and select that template while export

Error: A traceback appears: KeyError: 'tax_audit'

When a field gets deleted from 'ir.model.fields' but it does not get deleted
from export template. And selecting that template to export the records will
lead to traceback.

See -
https://github.com/odoo/odoo/blob/59669e9943158e51dcbb9ae69ad758df8f7c7976/addons/web/controllers/main.py#L1815-L1818

sentry-4331986723

closes odoo/odoo#134605

X-original-commit: e458a4c164820c3ccf00b0520c5f86c49238fb2a
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-09-07 09:00:34 +00:00
Jurgen (jugj) 0b88ea0c4c [FIX] hr_holidays: Fix smart-button display of remaining time off
This PR fixes the display of remaining days that wasn't correctly displayed when an allocation
had no time limit.
task-3414291

closes odoo/odoo#134584

X-original-commit: 5fc84bd71fca69862ef4eb3fbb956a18c951d8d0
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Jurgen Gjini (jugj) <jugj@odoo.com>
2023-09-07 09:00:32 +00:00
Jurgen (jugj) 08550d7bb0 [IMP] hr : Update activity type summary when type changed
task-3429069

closes odoo/odoo#134550

X-original-commit: a6ee3d66ad15e32fc2f339f0f51f9267daead26d
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Jurgen Gjini (jugj) <jugj@odoo.com>
2023-09-07 09:00:31 +00:00
Victor Piryns (pivi) 0ba867a88f [FIX] web: truncate filename when importing custom module via studio
Issue:
When uploading a large custom module via studio for importing, Chrome
crashes with an internal SIGKILL and Firefox manages to load, but is
really sluggish.

Steps to reproduce:
- Install Studio
- In the Apps Dashboard > Customizations > Import
- Upload a large custom module (50 MiB)
- Chrome crashes, while on Firefox the page is sluggish

Cause:
In the module `base_import_module`, the `module_file` doesn't have a
corresponding `filename`, therefor the name used to be displayed in
the wizard is the content of the binary file in base64 encoding...
For a module that is of a large size, this is a *gigantic* string
that crashes Chrome and slows down the DOM on Firefox.

Fix:
Truncate the maximum filename that is displayed in the template to
the max length necessary to encode in base64 (0xFF) 255 bytes, as
255 bytes is the maximum filename size on Linux/Windows/MacOS.

Affected versions:
16.0 up to master

Reference:
opw-3491998

closes odoo/odoo#134532

X-original-commit: 218c9875c0422beb2a5b199797e531ed3625a13b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-09-07 09:00:30 +00:00
Pierre Pulinckx (pipu) 038169ee9f [REF] web: simplify assets loading
In this commit, the loadXML function has been removed. We use registry with
xml_templates to load XML templates for OWL Apps.
The goal of task is to remove loadXML and getBundle from assets to simplify
the understanding of assets api.

task-3266441

closes odoo/odoo#134520

Related: odoo/enterprise#47001
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-09-07 09:00:28 +00:00
FrancoisGe 33453faf23 [FIX] web: support properties in calendar
Before this commit, in a calendar view with a properties field, a crash
will be display when you click on an event.

closes odoo/odoo#134476

Related: odoo/enterprise#46990
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-07 09:00:27 +00:00
Tom De Caluwé 70a4051646 [FIX] web: support dark mode in field selector popover
Switch to using scss variables instead of hardcoded colors to support dark mode
in field selector popover.

Steps to reproduce:
Turn on Dark mode. Open Automated actions and add a model. Edit domain and
start typing: text is white on white, the popover does not adapt to dark mode.

opw-3453065

closes odoo/odoo#134458

X-original-commit: 5a57bd799688ee7a2c2e29d775fda73bba34c777
Signed-off-by: Tom De Caluwé (tdc) <tdc@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-09-07 09:00:25 +00:00
David Monnom (moda) b6ea693753 [FIX] pos_self_order: fix combo header in kiosk
Previously, header height in pages was managed by `kiosk_template.js`
and in the various other components via props. This caused a bug in the
`combo.xml` page, as the header with steps and product names was not
displayed.

Now the height of header, content and footer is managed entirely via
the components and never via the template. This corrects the error in
question.

closes odoo/odoo#134354

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-07 09:00:24 +00:00
Hung Trinh Ngoc 79e6b96263 [IMP] account: rename statement when journal type is cash
- To avoid confusion with the concept, I propose a modification to the
term "cash" in the journal.

closes odoo/odoo#131986

Signed-off-by: Trịnh Ngọc Hưng <ngochung207@gmail.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-09-07 09:00:23 +00:00
Dylan Kiss (dyki) 058ea4508c [IMP] account: structured sepa communication
Add helper functions to check structured communication references for
ISO (existing), Belgium, Finland, Norway and Sweden.

task-3284330

closes odoo/odoo#122835

Related: odoo/enterprise#41629
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-09-07 09:00:20 +00:00
Noe Antoine 72b0d77cb5 [IMP] {website_}event{_sale,_exhibitor}: ease ticket access
The tickets are reworked, made easier to print and have
their structure reworked for qr code addition (in ENT branch).
Also they are easier to download as buttons are added to do so.

1. Design

Tickets have their background removed in order to ease
their printing. More room is given to details, the design
is simplified.

  New RESPONSIVE HTML TICKET

The confirmation email will now contain a link "See tickets"
leading to a new version of the full page ticket, called
"responsive_html". It does not generate / download PDF but rather
leads to a rendered qweb html page, with design working
properly on different screen sizes. The design is a tweaked
version of the full_page ticket template, simplified. It allows
users to see their ticket directly without needing a pdf viewer.

2. Download Tickets Buttons

"Download / See Tickets" Buttons are added in
- Email Templates (Ticket and Badge)
- The SO confirmation (if payment). All tickets, per event.
- The registration confirmation (if no payment). All tickets
in the same PDF. They are for the same event.

In order to access tickets, a route event/my_tickets is added
in the controller. It takes an event_id, registration_ids and
a hash based on those plus the database secret using tools.hmac.
The groundtruth hash is obtained for given registration ids in the
method _get_tickets_access_hash on event.event. The route is
used in all places listed above. The hash must be valid and attendees
must exist.

No condition on payment is set in my_tickets as we want the download
tickets link to work for non-free tickets as well at the end of the
sale process, and as the sale order could not be linked to any invoice
at that stage (if automatic invoices is not set in the settings),
registrations being 'not paid' at that point. This could be cleaned
in further work as different states are to be clarified.

The route must be public as it must work even for public users.
(from email or as public user registering on front-end) Also,
we give sudo access to the course in the case of invitation to
a course that is not yet published, as long as the hash and
registration are valid.

3. Email Templates

In order to have similar mail templates for badge and tickets,
Registration Badge content is duplicated from Registration
Confirmation and slightly tweaked, replacing existing body.

Also, the info of the payment / order moved from full page ticket
to the body of the confirmation email.

PR ENT - odoo/enterprise#41164
PR UPG - odoo/upgrade#5007

Task-3061851

closes odoo/odoo#120933

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-07 09:00:17 +00:00
Abdelouahab (abla) 7147d7774e [FIX] mail: fix current user finding in _mail_find_partner_from_emails
To reproduce
============
- login as Mitchell Admin
- change the email of a portal user, ex: Joel Willis, to the same email
as Mitchell Admin. Do this through the Contacts App
- always connected as Mitchell Admin, create a sale order and send it by
email to client, in chatter the sender will be Joel Willis

Problem
=======
when setting the author, `_mail_find_partner_from_emails` is called, when searching
for users with the given eamil, two results are found and the first one
is taken as author

Solution
========
give the priority to the current user when it matches the given conditions

opw-3455520

closes odoo/odoo#134609

X-original-commit: b4a9095497fb77e6963103fa2a27d20e00172ea1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
2023-09-07 06:56:53 +00:00
amdi-odoo 85a4d44c9a [IMP] {website_}event: improve registration desk view
Purpose
=======
Registration Desk promenade.
Bunch of QOL improvements to make the handling
of events easier.

Specification
=============
- Modify the attendee search template to have the search
  in this order:
 * Participant (search in name, email and company)
 * Company
 * Booked by
 * Selected Answers
 * Ticket
 * Event (Just for the multi-event mode)
- Make attendee registration status bar clickable to ease
the state modification.
- Attendee registration kanban view improvements:
 * Display the company.
 * Add a ticket icon in front of the ticket type.
 * Display the answers selected while registering (only
   for the questions of type selection) as tags.
 * Always use the fa-check icon for the card buttons
   (secondary for confirmed, primary for attended).
 * Add a button to go backwards (confirmed to unconfirmed,
   attended to confirmed) to ease the state modification
   from the kanban view. As we now have 2 buttons, widden
   their allocated space to make the clicks easier.

Task-3469490

closes odoo/odoo#134479

X-original-commit: c95db124cac8031e928f8fcdc5d47ebbc7f7f341
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Amélie Dieudonné (amdi) <amdi@odoo.com>
2023-09-07 06:56:52 +00:00
Parth Solanki(PASO) 98ef9c74eb [IMP] stock_delivery: multiple package tracking improvements
When there are multiple tracking numbers in one picking, the tracking button
will work correctly.
Improve style issue for wizard form

closes odoo/odoo#134591

X-original-commit: c71dae98aff0c86aed88b7da79f99d91562c98cc
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
2023-09-07 05:56:03 +00:00
Pierre Pulinckx (pipu) 6996b8a673 [REF] *:replace moment usages with luxon
luxon and moment are both used in the solution, but these two libraries
facilitate the manipulation of dates. It was decided to replace all uses of
moment with luxon so we can then remove moment.js from the code and lighten the
assets.

task-3391739

closes odoo/odoo#134470

Related: odoo/enterprise#46987
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-09-07 05:56:01 +00:00
tong-odoo 1b7bb665e9 [IMP] l10n_th: add PromptPay QR code payment for invoice
Impacted Version:

- 17.0 and above

This commit improve below features:

- Add PromptPay QR code payment for invoice based on below github repository
https://github.com/kittinan/thai-qr-payment

task-3165449

closes odoo/odoo#133304

Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-09-07 05:55:59 +00:00
Saurabh Choraria f893eef973 [FIX] base_import: raise ImportValidationError when invalid seperator selected
When a user tries to import the CSV file with a different separator at that
time, the values in mapper and rows_to_import are not correctly mapped. So
the traceback will be generated.

Steps to reproduce:
1. Click on import in the bank statement.
2. Select any CSV file for the bank statement line or can download and import
this file https://drive.google.com/file/d/1lnScw4RN6T01pOkyNON8vvb3FQOPiy1O/view?usp=drive_link
3. Select any separator other than a comma.
4. Click on the test or Import button.
5. Error will occur.

Error: IndexError: list index out of range.

To solve this issue, a row's length is checked with the
number of fields.

sentry-4021250095

closes odoo/odoo#134596

X-original-commit: 0eb30132c14420d42f88a5f54a81ba1dc51a867c
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
Signed-off-by: Saurabh Choraria (sauc) <sauc@odoo.com>
2023-09-07 04:53:26 +00:00
Florent de Labarre 52af5b6d0a [FIX] im_livechat: bad coping of chatschript
Before this commit when you copy a chatbot script, the triggering answer are mixing.

- Create a chatbot
- Create a line A - question ligne with one response 1
- Create a line B - type text
- Create a line C - type text
- Save
- Invert line B and C
- on ligne C add response 1 in triggering answer
- Save
- Copy the script
--> Issue the response 1 in triggering answer is now in line B

closes odoo/odoo#134565

X-original-commit: 118a065e38d6fd73a49cfd52ec4693808bfc11d1
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 22:40:23 +00:00
Lou (loha)andqsm-odoo 0d448d950c [IMP] website: generate text with a LLM for configurator pages
When building a website with the website configurator, you get pages
with a nice layout. However, the text inside is not adapted to your
company, industry or even, most of the time, language.

Using a LLM, we could easily get text much more relevant to customer
needs. The scope of this work is static pages generated with the website
configurator (homepage, about us, pricing, ...).
Later, in other tasks, we also want users to be able to generate text
inside the website builder.

This commit implement the bare minimum to generate and replace a website
content by AI generated sentences (based on the information provided by
the user).

Related IAP PR at https://github.com/odoo/iap-apps/pull/656

task-3248852

closes odoo/odoo#121021

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-09-06 22:40:22 +00:00
qsm-odoo bd456ec5b5 [REF] website: remove useless rendering check in configurator code
During the rendering of website configurator pages, we check that the
rendering of each snippet is done for some reason. That check is useless
because:

- Either the rendering fails and in that case, there is a raised
  exception that we catch (note that catching it could also be useless
  actually: we will check that post 17.0 release).

- Either the rendering is empty (weird case to cover ?) and the
  remaining code should work regardless anyway.

Note that in the original code, that `if` covered the case of trying to
render a non existing view... but was changed in [1] such that in that
case, an exception (that we catch) will be raised.

[1]: https://github.com/odoo/odoo/commit/880954ebfc1106411b7f7a7d60aee05dfae60893

Related to task-3248852

Part-of: odoo/odoo#121021
2023-09-06 22:40:22 +00:00
qsm-odoo fc80c15816 [REF] website: move code around the configurator_apply function
The configurator code organization should be reviewed. This is a first
step that will be needed for the integration of a new feature: this
removes the one-call inner functions inside that `configurator_apply`.

Related to task-3248852

Part-of: odoo/odoo#121021
2023-09-06 22:40:22 +00:00
Arthur Detroux (ard) 9f82d4d98b [IMP] website: stay in backend on F5 or CTRL-R while in website preview
Since [1], it was no longer possible to refresh the page and stay in
the backend at the same time. This was known at the time and was an
accepted downside.

However, with this commit, a compromise has been found, if the keyboard
shortcut for a refresh (CTRL-R or F5) is used while the Website Preview
is shown (mounted), then the website preview will do its best to keep
the user inside the backend.

This will make developing features for the website modules easier, as
before, every refresh would require an extra click to return to the
backend.

To note: the debug=[mode] param would also be lost
on refreshing a website page. Starting 16.4, since [2], this would make
tracebacks harder to read as for every refresh, they would no longer
point to the source, rather just the minified file. Therefore, with
this commit, we also keep the debug mode in the URL when doing a
keyboard refresh.

[1]: https://github.com/odoo/odoo/commit/1c18b79972c3b0a97197b98390e0ba9fda703585
[2]: https://github.com/odoo/odoo/commit/59f49d6a8c856a5d8ca28dcfd7840baaa1c7672f

task-3458691

closes odoo/odoo#134444

X-original-commit: e69c6eaed4e82e08d6bbf807cf4698f6327a9cdd
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-09-06 21:27:00 +00:00
Valentin Chevalier 054ca0a19a [IMP] web, *: Add more formatters in assets_frontend
Before this commit, formatters like `formatMonetary` and `formatFloat`
weren't loaded in the assets front-end.

This commit introduces `formatAmount` ( `formatMonetary` calls
`formatAmount` but makes some prior processing to deduce the currency
from the field) and makes `formatAmount` and `formatFloat` accessible
from any front-end application.

Note: The currencies were added in the front-end session info because
they are needed in `formatAmount`.

closes odoo/odoo#133824

Related: odoo/enterprise#46658
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-09-06 19:43:39 +00:00
tsm-odoo d9f0723548 [IMP] im_livechat, *: show livechat button after closing chat
Before this commit, the livechat button was not shown anymore after
closing the chat window. Since the livechat button is always present
from now on, the button is now draggable.

task-3358161

closes odoo/odoo#134513

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 16:19:53 +00:00
Sina Chaichi Maleki (cmsi) a340f1d00b [FIX] hr_holidays: Ensure the name is mandatory in public holidays
The name field was previously optional when adding a new instance
from the tree view, which in the absence of a name, 'false' is indicated
in the calendar view. The field is now set as mandatory.

closes odoo/odoo#134433

Task: #3469914
X-original-commit: 732f27c4398ae661ecfc1afb80e656e7c86d8d55
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-06 16:19:52 +00:00
shag-odoo fce75633ed [IMP] fleet: track state
Purpose:
Prior state was not tracked for 'Services for vehicles' and
it was not possible to know when service started and when it was done.

task-3469567

closes odoo/odoo#132338

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-06 16:19:51 +00:00
Alexandre Kühn 90679836ff [FIX] mail: properly show name of discuss channel
Follow-up of https://github.com/odoo/odoo/pull/130821

`name_get` has been deprecated for `display_name`. In old `name_get`,
when the record had no display_name (`convert(rec._rec_name)` returns
`False`) then the fallback was empty string `""`. This has been
changed with default `_compute_display_name`, to instead show
`<rec._name>,<rec.id>`.

Discuss channel `display_name` was relying on this "" fallback
somehow: even though `rec._rec_name == ""`, `convert("") == False`,
thus fallback "" cancels out to "". The value "" for name is
intentional and necessary in discuss channels for the good working
of some other fallbacks UI, e.g. group chat concats member names.
With the recent changes of `_compute_display_name` default fallback,
it showed `discuss.channel,10` instead of "".

Steps to reproduce:
- Log in as Mitchell Admin
- Open Discuss app
- Click "Start a meeting"
=> expected: shows group chat name "Mitchell Admin"
=> result: shows group chat name "discuss.channel,10"

This commit fixes the issue by removing reliance on `display_name`
for discuss channels: it always uses `name`, thus showing taking into
account `""` as it needs for fallbacks like in group chat when it
has no name.

Task-3493629

closes odoo/odoo#134531

X-original-commit: 5592fc107790c910910c2719ede04a86910dc79f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 14:42:21 +00:00
Adnan Saiyed 84276cbd63 [FIX] web_editor: unexpected copy paste behaviour of link
Current behaviour before commit:

-When pasting copied content from editor inside
link inserts text with HTML content, in result
the pasted content seems isolated from the link.

e.g. <a href="#">te[]st</a>
	+ pasting <h1>123</h1>  <=>
	<a href="#">te<h1>123</h1>st</a>

Desired behaviour after commit:

-Now only text content is pasted which makes
pasted content as a part of the link.

e.g. <a href="#">te[]st</a>
	+ pasting <h1>123</h1>  <=>
	<a href="#">te123st</a>

closes odoo/odoo#134516

X-original-commit: 1cc3354b88658620c15fa18427b8725b6215337d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-09-06 14:42:20 +00:00
Didier (did) f4ee483fde [IMP] mail: allow deletion of all the link preview at once
Before this commit, when a message had many link previews,
deleting all of them required to delete one by one.

This commit improves this aspect by showing a "Delete All"
button in the dialog to delete all link previews at once.

task-3488054

closes odoo/odoo#134301

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 14:42:17 +00:00
Julien Carion (juca) 7e8c78a0d7 [FIX] mail, calendar: flicker in activity dialog
This commit solves a flicker in the action buttons of the activity dialog:
- open project task kanban view
- schedule an activity on a record => this open a dialog
- in that dialog, notice the Schedule button
- click on it
- the button is now, for a small amount of time, replaced by a Save button
(If the network goes bad, it can be pretty obvious. Reproduced with the
network dev tool)
- the dialog is closed
When creating a meeting, the save button would be added to the buttons
for a small amount of time without replacing any other button instead.
By adding the close=1 attribute, the form view of the dialog will no
longer reload after the create call which prevents the flicker.

task-3270301

closes odoo/odoo#132845

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-09-06 14:42:16 +00:00
luve-odoo e96fc7d3fe [IMP] project : gantt view improvements
Before this commit, the group by in the gantt view of project didn't
allow the user to find records for which there were not scheduled tasks.
For example, if a Sale Order didn't have a scheduled task, when grouping
by Sale Order, the latter was not displayed. And searching for its name
was not displaying it either.

After this commit, when a user is searching for a sale order, even if
the latter does not have any scheduled task, it is displayed in order to
facilitate the scheduling of new tasks.

In order to do so, a group expand on sale_order_id for the project.task
model have been introduced.

closes odoo/odoo#121819

Taskid: 3251630
Related: odoo/enterprise#41257
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-06 14:42:14 +00:00
luve-odoo 66a9262009 [IMP] project: sub-tasks/task convertion action
Before this commit, the conversion from a subtask to a standalone task
or the opposite was possible in debug mode. In order to provide for
users a way to convert task to subtask or the opposite without polluting
the interface, a action is added. Also, when the user clicks on search
more on a many2one field pointing on `project.task`, if the active_model
and the active_id are defined then if we will try to load the last
update status by using `active_id` even if `active_model` is not the
`project.project` model.

This commit adds a action that opens a form dialog. The user
can choose to put a parent task or not. If not, the task becomes a
standalone task. Otherwise, the selected parent task becomes the parent.
This commit adds also an additional check before loading and displaying
the last update status of the project active to be sure the `active_id`
is the id of a project, that is, `active_model` has to be equal to
`project.project` to be able to load the last project update status.

Moreover, a UI change in the stat button showing the number of subtask
is modified in order to display also the number of closed sub tasks.

task-3251617

closes odoo/odoo#120911

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-06 14:42:13 +00:00
roen-odoo d32830f103 [FIX] sale_timesheet: Fallback on user employee when creating timesheet
Current behavior:
  If you set a specific sale_order_item for an employee on a project, and
  create a timesheet line from the "My Timesheets" menu,
  the sale_order_item will not be the one you selected for this employee.
  This happens because when you create a timesheet line from the "My
  Timesheets" menu, the employee is not set on the timesheet line.
  To fix this we fallback on the user's employee when creating a timesheet
  line from the "My Timesheets" menu.

Steps to reproduce:
  - Make sure you'r logged in as Mitchel Admin
  - Create a service product that create project and tasks
  - Create a sale order with this product
  - Go to the project and set a sale order item for Mitchel Admin in the
    invoicing tab
  - Go to the "My Timesheets" menu and click "Add Line"
  - Select the project you created
  - The sale order item will not be autofilled with the one set on the
    invoicing tab of the project.

opw-3463849

closes odoo/odoo#134466

X-original-commit: ba0d428a85e8392d8f892872abe56bb7d6c568d3
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-06 13:25:40 +00:00
Pierre Rousseau d946affe22 [FIX] web: correctly restore focus with ConfirmationDialog
When a dialog is closed, the focus is meant to be restored to the
previous focused element.

Before this commit, it did not work for the ConfirmationDialog when the
confirm button was clicked. This was because the focus was lost **before**
the dialog was closed (because the confirm button is disabled when
clicked), and thus the previous focused element was not in the el of the
dialog anymore, and thus the focus was not restored.

closes odoo/odoo#134456

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-06 13:25:37 +00:00
Maitri Patel b0bc3d0814 [FIX] calendar: handle singleton exception for sync calendar event
This error occurs when recurrence_id has no records when the user tries to
delete the sync calendar which has recurrent events.

Error: 'Expected singleton: calendar.recurrence()'

See-
https://github.com/odoo/odoo/blob/15.0/addons/calendar/models/calendar_event.py#L715

sentry-4367276387

closes odoo/odoo#134438

X-original-commit: 6ba4a671c4b37120146f137f88363dd5b170562f
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-09-06 13:25:36 +00:00
Brieuc-brd b132c7c6e0 [FIX] web: remove padding in o_list_selection_box
Commit 80f8281 introduced an unwanted padding on the right in
`o_list_selection_box` on large screen.
This commit adapts the spacing of this element to maintain the same
rendering whatever the screen size.

task-3454841

closes odoo/odoo#134384

X-original-commit: ed29d31ab7bb8d697c6515f3383a8b687f486e8e
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-09-06 13:25:33 +00:00
Arnaud Joset 5f16ea36d6 [FIX] base_geolocalize: allow to override user agent with system parameter
Before this commit, the useragent was harcoded as an Odoo one and if it was
blacklisted by the osmfoundation policy https://operations.osmfoundation.org/policies/nominatim/
all Odoo instances were forbidden to access the service.

This parameter allows to override the user agent with a system parameter.

closes odoo/odoo#134376

X-original-commit: 160e8bfbf72a3e5d7cc8d8cbe7bc4f310f298baa
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-09-06 13:25:29 +00:00
Rémy Voet (ryv) 35f739f558 [FIX] sale: avoid displaying address
Since https://github.com/odoo/odoo/pull/122085, on the sale
order form (with website_sale installed), changing the "Customer"
changes the "Invoice Address" & "Delivery Address". But the latter
are displayed with the partner name, but also with the full
partner address. This last information makes the form uglier than
before and are useless.

The old `display_name` of `res.partner` was stored in the DB and
did not depend on the context. Also, onchange calls add the
context of the source field (the one being changed). In this case,
`'show_address': 1` is added, and then `display_name` of
`partner_invoice_id`/`partner_shipping_id` is also read with this
context.

We cannot easily fix this in saas16-4 because it was not possible
to change the read context of a particular field. With the new
specification of onchange, we can override the read context on a
particular field.

closes odoo/odoo#134304

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-06 13:25:28 +00:00
Jitendra Prajapat 4c8fddd570 [FIX] point_of_sale: modified flow of order date
Before this commit:
===================
In the back-end, there is only one field "date_order" is used, while on the
frontend side, there are two separate fields: "creation_date" and
"validation_date," which causes confusion in the code flow and leads to
redundancies.

After this commit:
==================
Revised the order date flow by eliminating the confusion stemming from the
separate "creation_date" and "validation_date" fields. Both have been
consolidated into the "date_order" field, offering clarity to the order date
process.

task - 3482072

closes odoo/odoo#133293

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-06 13:25:27 +00:00
Guillaume (guva) 91aceecc63 [FIX] l10n_es_edi_sii: add registration date field
When sending an bill to sii services, the registration
date is set as today, instead of the accounting date.
This is because the registration date is automatically
set to today when sending the bill.

With this commit, we add registration_date field
to teh account_move view in other infos tab, to allow
the user to manually set it.

Steps:

- Install l10n_es_edi_sii
- Set a tax agency in Accounting > Configuration > Settings
- Create a bill, with date and accounting date in the past
- Confirm and send to sii services
-> In the file, 'FechaRegContable' is set to today

opw-3478079

closes odoo/odoo#134370

X-original-commit: 325857efcfc8060666b3860ae61c5321baab5462
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-09-06 11:51:02 +00:00
Josse Colpaert 68f71e1ec1 [FIX] l10n_eu_oss: only take the tax payable/receivable account from one tax group
closes odoo/odoo#134348

X-original-commit: 4322119fafcb8f2833bdb782d893333228807bd0
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-09-06 11:51:00 +00:00
Paolo Gatti (pgi) a53fae8084 [IMP] l10n_it_edi: Translations
Updated the translations for 16.0

X-original-commit: 19785efbc201d8329e3f2eb77b6040f00f347531
Part-of: odoo/odoo#134348
2023-09-06 11:51:00 +00:00
Paolo Gatti (pgi) 2dc1612ddc [IMP] l10n_it_edi_pa: Split Payment
New module is created (`l10n_it_edi_pa`) to add fields that are required to handle Split Payment, and it will be merged in master.

- `l10n_it_origin_document_type`
- `l10n_it_origin_document_date`
- `l10n_it_origin_document_name`
- `l10n_it_cup`
- `l10n_it_cig`

These fields are required to track money used that comes from funding to the Public Administration business for purchases, be it ordinary or project based spending.
They also need to be exported in XML during the EDI phase, in different
XML nodes depending on the `l10n_it_origin_document_type` field

ref: https://fex-app.com/FatturaElettronica/FatturaElettronicaBody/DatiGenerali/DatiOrdineAcquisto
Task link: https://www.odoo.com/web#id=2823645&model=project.task
task-2823645

X-original-commit: e07fb2503f28af1f23ef74efec6741f9623ce401
Part-of: odoo/odoo#134348
2023-09-06 11:51:00 +00:00
Paolo Gatti (pgi) 733abedc18 [IMP] l10n_it*: Split Payment
When an Italian company bills a PA business (for example they're selling cleaning services for a public building) the PA business will send the VAT to the Tax Agency themselves, while generally the VAT is collected and sent to the Tax Agency by the buyer (the PA business). This is done to avoid VAT fraud as the PA doesn't trust the business will actually pay the VAT. That's very common in Italy.
A new module will be created (`l10n_it_edi_pa`) in the next commit to add fields that are required to handle Split Payment, and it will be merged in master.

- New Split Payment related accounts are created: 2607, 2608
- New tax report data to target the VE tax chart grid
- Split Payment account.taxes are Groups of Taxes whose children target VE38 tax grid
- account_tax's l10n_it_vat_due_date is no more, we base ourselves on the VE38 tax grid
- The Group of Taxes includes normal VAT and a reversed VAT entry (for sale)
- Tax checks on the invoice now also check group of taxes with flatten_taxes_hierarchy()
- New Split Payment tax group has been added to build the correct totals in the move form view
- account.taxes and account.fiscal.position has been added to change from VAT to VAT Split Payment automatically when you select a res.partner that features the fiscal position.
- The Fiscal Position also has the law-required note that has to be featured on invoices that use Split Payment
- A PA business demo partner is added to showcase the new fiscal position
- `l10n_it_stock_ddt` tests are minimally modified because the Form component didn't let you use 'like' in the move form view

Task link: https://www.odoo.com/web#id=2823645&model=project.task
task-2823645

X-original-commit: 90d9250c66d59184a795041b8f1b7849c3b6db5f
Part-of: odoo/odoo#134348
2023-09-06 11:51:00 +00:00
Goffin Simon d7a387a07a [FIX] project_todo: Impossible to install project_todo
Typo error

opw:3478943

closes odoo/odoo#134346

X-original-commit: 0db170b851c994a1102d894172cc59af37936873
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Simon Goffin (sig) <sig@odoo.com>
2023-09-06 11:50:59 +00:00
Goffin Simon 0be605d22a [FIX] project_todo: Impossible to chose a project with no company
Steps to reproduce the issue:

- Go to the To-do app
- Open a task and try to convert it to a task
- Look for P

Bug:

P was not suggested

opw:3478943

X-original-commit: e0e3d35c7f53b9a87de366bf2cca96c1ca3be960
Part-of: odoo/odoo#134346
2023-09-06 11:50:59 +00:00
Guillaume (gdi) b16ab7b997 [FIX] website: allow to re-edit social media title
This commit allows you to change the title of the social media block
after the first save. If an element is in a parent that has the class
`o_not_editable` then it is only editable if it has the contenteditable
attribute set to true. We rightfully remove this attribute at saving but
without putting it back when we return to edit mode. This commit allows
to fix this case. Note that we have to improve this system in the future
(so we can get rid of this patch).

This part of the fix is very similar to [this other fix] for the team
block.

[this other fix]: https://github.com/odoo/odoo/commit/b7d53d2fcb20a447fd3098adf94ffb33bc49dda9

task-3073171

closes odoo/odoo#134281

Part-of: odoo/odoo#105964
X-original-commit: 44b0bcbdd67721e3b45567d26da00e4a3910f541
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2023-09-06 11:50:58 +00:00
Guillaume (gdi) 620cf19574 [FIX] website, web_editor: allow to re-edit social media icons
This commit allows you to change the icons of custom links of the social
media block after the first save. Thanks to [this other commit], there
is now a class that permits to inform the editor that a media is
editable even if it is a non-editable parent. This commit permits to use
the new class to fix the issue.

Steps to reproduce the bug:
- Drop a social media block on a page
- Add a custom social media
- Save
- Edit
- Try to change the icon of the custom social media with a double-click

=> The icon cannot be changed.

Note that [another commit] had already been made and fixed the problem
halfway (the icon change didn't work on double-click). This commit
reverts it and fixes the problem correctly with the new system.

[this other commit]: https://github.com/odoo/odoo/commit/6ead397f33512c918f51feb2b32fb3e15ffedf34
[another commit]: https://github.com/odoo/odoo/commit/bb291b35e46e42ca098aa3e04ac0b473f72be423

Fixes https://github.com/odoo/odoo/issues/104048
task-3073171

X-original-commit: b844351b9814ff2167d2183ab3216e2d1ec1d216
Part-of: odoo/odoo#134281
2023-09-06 11:50:58 +00:00
Dossogne Bertrand 5f976e0ef4 [FIX] hr_holidays: fix accrual allocation lastcall
Before this commit, creating a new allocation based on accruals
and setting a start date prior to the creation date would compute
the amount of days that should already have been accrued during that time.
However, the lastcall field is not updated and running the accrual cron
leads to a wrong duration.

How to recreate the issue:
- create an accrual plan
- create an allocation set on that accrual
- set a start date in the past for that allocation
- the duration should be automatically set to a value above 0
- save and validate
- run the accrual cron
- the allocation now has its duration doubled

After this commit, the lastcall should be set to the allocation creation
date. This way, running the cron will correctly keep the value of the amount
of days.

closes odoo/odoo#134251

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-06 11:50:57 +00:00