Commit 5dfb6e39af added the new line
characters at the end of each line but the last one.
However, it does so by adding a new element in the row: therefore, 19
columns are created instead of the 18 required.
We add the new line character at the end of the last element of the row.
opw-2000429
closesodoo/odoo#33571
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
In `_create_returns`, the code creates a picking using
`self.location_id` as destination location.
When the multi location group is not active, the user has no possibility
to change this field and it is correctly initialized. When the multi
location groups is active, the user has this possibility.
If the user empties out this field and tries to validate the return,
he's faced with an error. We make this field required in the view to
prevent any issues.
Task-1986294
Fixes 24207
closesodoo/odoo#33463
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Steps to reproduce:
1. Create an invoice with a customer and enter some text in Terms and Conditions (field: comment).
2. Save the invoice.
3. Edit the invoice and change the customer.
Bug:
The text in Terms and Conditions was empty.
Same behavior as on the SO, if the company doesn't change the T&C should be kept.
Fine tuning of this commit: 9bf1f97d9bCloses#32309
opw:1830838
closesodoo/odoo#33383
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Fine-tuning of 516f22c398.
This commit missed attachments that are linked to a mail.template,
which should be added to every mail sent using the template.
To make sure that we both fix the duplicates and the generation issue,
we add a test.
opw 2000515
opw 1998782
closesodoo/odoo#33528
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
- Create a product, sale price of 100
- Create a quotation template
Product A: 10 Units
- Create a pricelist
Product A: 10% discount for a quantity of 10
- Create a SO
- Set the pricelist
- Set the quotation template
The unit price is 100 instead of 90.
This is because we retrieve the price based on a quantity of 1 instead
on the quantity specified in the template.
opw-1998642
closesodoo/odoo#33534
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Create 11 invoices with the same partner but different totals like:
1.0, 2.0, 3.0 ... 11.0
- Confirm them
- Create a bank statement with 11 lines having each of them the previous
invoice amount (1.0, 2.0, 3.0 .... 11.0) and the partner
- Click on the 'Reconcile' button
- In the reconcile form, do NOT push the 'Load More' button, but push
the 'Automatic Reconciliation' button
All lines are reconciled, but a JS traceback is raised.
This is because we try to destroy a widgets which were not rendered.
opw-1985580
closesodoo/odoo#33524
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When transaction is approved, if for any reason the `customerProfileId`
is missing from the response, the transaction is aborted.
It should succeed even if we cannot create a customer profile.
opw-1998505
closesodoo/odoo#33501
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Traceback generated when trying to pass a datetime object into a function tag
in xml.
<function name="action_name" model="model_name" eval="datetime.date.today"/>
Used to fail.
With this commit now one can pass time, datetime, timedelta, relativedelta,
version, ref, pytz in function tag in xml
Task-id: 1772614
Closesodoo/odoo#29212
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Dhaval Limbuwala <dli@odoo.com>
If destroy is called before start, there will be a crash before this commit.
At the time of this commit, this can be reproduced in master by dropping the
image gallery snippet, clicking on add images (double click, which opens the
media dialog twice for some reason), selecting 2 images to add on the
media dialog, and clicking on add. The error will be in the JS console.
closesodoo/odoo#33440
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Open a mail.compose.message wizard.
Select a template that generates an attachment.
Reselect it. A second attachment has been generated.
Can be repeated ad infinitum.
At template onchange, the template is rendered to overwrite the composers values
This includes the attachments.
Let L1 be the list of attachments generated by the template.
When _convert_to_write(values) is called with {'attachment_ids': L1},
it gets self.attachments_ids = L2, and generates a [(6, 0, L1 + L2)] command.
As a result attachments are only added,
the previous ones need to be removed manually.
Since c6d718f, the semantics of _convert_to_write changed.
Before, it always returned an empty list for new records (without an id).
In other words, wa always had L2 == [].
As a result we need to adapt the wizard to keep its old behaviour.
To solve it we bypass the _convert_to_write for 'attachment_ids' and directly
generate the 6 command with the list of ids L1 generated by the template.
We only do this for templates that add attachments to keep the templates
composable (a template only overwrites the values it defines).
Unfortunately, we don't have any way to know which attachments have been added
manually, so we can't preserve these (which was the old behaviour anyway).
opw 1997430
opw 1987169
opw 1998115
opw 1998782
closesodoo/odoo#33387
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
When multiple emails (`mail.mail`) are linked
to the same message (`mail.message`),
all the message notifications were being marked as sent
as soon as one of the mail was sent, and not all of them.
This is indeed possible to have multiple emails linked to a single
message, for instance when there are employees and customers in
the followers of a thread, and some must therefore have
the buttons meant for the employees ("Assign me") and some not.
In other words, it was possible notifications were marked
as sent while their associated email was not sent yet.
This revision also comes as an addition to
5d6656d739
as it was possible to receive a bounce coming from
the previous mail sent which wrote on the same notifications `email_status`
than the current message being sent before we could acquire the lock on
them (see commit message of the above mentioned revision),
as it was writing the `email_status` on more notifications that it
should have, including notifications of the previous email.
e.g
- Mail 1
- Message 1
- Recipient A, B, C
- Mail 2
- Message 1
- Recipient D, E
Let's say recipient A bounces
If the email notifying the bounce arrives during the processing of the "Mail 1",
it will be blocked until we release the lock on the `mail.notification` `email_status`
we acquire thanks to having written `exception` on `email_status` before sending the email.
But, as soon as it is unblocked (after the `cr.commit()`),
it will immediately re-attempt the delivery of the bounce email,
therefore writting "bounced" in `email_status` of recipient A,
while the transaction of the second email already began.
When the second email sending will try to write the `email_status`
of recipient A as well
(as it used to write the `email_status` on all the message notifications,
not just the one related to the current email),
it raised a concurrent update.
Therefore:
1. Interrupting the loop, as psycopg2 exceptions are raised and not passed,
2. Replay the sending of the second email a second time.
opw-1984293
closesodoo/odoo#33431
Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
If the smtp session was dead, it would lead the whole mail batch to fail.
opw 1949270
closesodoo/odoo#32424
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
closesodoo/odoo#33350
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
When an exception is raised during the course of a normal SMTP session,
smtplib's `sendmail()` method will close the channel automatically,
so any further attempt at sending SMTP commands will fail with an
SMTPServerDisconnected error, even just calling `smtp.quit()`.
This will shadow the original error, and make debugging harder.
Fixes#1493
When website_customer is not installed, some endpoints are not handled
by the router, causing the following tests to fail:
- test_10_crawl_public
- test_20_crawl_demo
- test_30_crawl_admin
Those tests were failing due to /customers responding with 404.
Indeed, the route /customers is defined in website_customer, but had
some usage within website_crm_partner_assign, causing tests to fail when
the former module is not installed.
The new behavior can be explained as follows:
- module website_crm_partner_assign on its own will lose the hyperlink.
- module website_customer will now inherit the view definition in order
to wrap the targeted HTML text elements with an anchor tag.
Closes#33344
Signed-off-by: Christophe Simonis <chs@odoo.com>
Putting *args and **kwargs confuses the function `odoo.api.split_context`.
This causes that a call to `search` via XMLRPC gets the wrong argument: takes
the first argument of ``args`` as the context.
Example which ignores the `count=True`::
```
api.call_kw(self.env['product.product'], 'search', (
[], False, False, None, True, {'lang': 'en_US'}
), {})
```
would ignore the `count=True` and use the wrong argument for context.
Issue introduced in commit 15ea753a.
Since:
`def search(self, model=None, *args, **kwargs)`
is equivalent to:
`def search(self, args, offset=0, limit=None, order=None, count=False):`
because the call to the super will anyway call the parent method, we can
change the method arguments.
note: this is only for [10.0,saas-14] where 15ea753a is.
closes#33147
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Nicolas Lempereur <nle-odoo@users.noreply.github.com>
The "from" of an email is expected to follow the regex
"name <address>(, name <address>)*".
We simply split the from on the commas "," and try to interpret each piece as a
(name, address) pair.
If a "from" contains a name that is not quoted, and contains special characters
before the comma, then we would try to encode that name into an email address,
and fail on a UnicodeEncodeError.
E.g. the following "🐧, <a@a.com>" would be parsed as [('', '🐧'),('', 'a@a.com')]
thus Odoo would crash on trying to use 🐧 as email address.
With this commit we would just mess up the name in these situations,
by ignoring failures.
opw 1923429closesodoo/odoo#33145
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
- Install `l10n_be_hr_payroll_fleet`
- Connect as admin
- Change demo user rights:
- Remove fleet (nothing, not user, not manager)
- Set employee Manager.
- Connect as demo
- On an employee, click the "Contracts" smart button.
- Try to create a contract.
Before this revision, access right issues were raised:
- Just after the create, as default values couldn't be computed,
- After the save as well, because of defaults and computed fields.
The real use case here is for our own sake: Dubai HR Officers
do not have access to Fleet as they do not have company cars,
but they can't create contracts for their own employees
without having access to fleet.
closesodoo/odoo#33120
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Fine-tuning of 463601a384.
It does not make sense to be able to write on mail.activity.type
using the related fields defined on mail.activity.
But this field is not a related one, and it is necessary to be writable to make
the 'recommended next activity' feature work at all.
opw 1974236
closesodoo/odoo#33325
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Rounding each element of the sum decrease the
precision and prevent to reconcile large recordset.
closesodoo/odoo#33100
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
With some escpos printers the cash drawer did still not open after
previous fixes. One of the problemetic printers is the Epson TM-m30.
This fix will check the status of the drawer and try to open it up to 5
times. The fix is successfully tested with the TM-m30.
closesodoo/odoo#33328
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit will correctly check for a custom payment.transaction create method
on 'self' instead of the acquirer's provider before calling it.
closesodoo/odoo#33033
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>