In some cases, the edit mode on the production form view is not already
rendered when hte tour try to write '1' in the qty_producing field. This
lead to a fail of the Main Flow Tour.
This commit specifically trigger the input tag to be sure the text will
be inserted in edit mode.
closesodoo/odoo#61541
X-original-commit: 426a4306c911de2a47bd804dde0d67aa19a22b67
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
This fixes a very obscure bug that happens on workers serving multiple
databases. Consider two databases A and B with the same model M, that
does not have a field 'name', but has a custom field 'x_name' only on
database A. The bug can be reproduced with the module 'account' and its
model 'account.register.payments'.
Assume the server loads a registry for database A. In that registry,
the model M uses 'x_name' as its _rec_name, and the field 'display_name'
on model M determines its dependencies to be the field 'x_name'.
Now assume the server load a registry for database B. In that registry,
the model M has no _rec_name. However, an optimization reuses the field
'display_name' for the model M on the registry of A. The field's
attribute 'depends' is equal to the tuple ('x_name',). When the ORM
tries to resolve the field's dependencies, it does not find the field
'x_name' on M and crashes.
In order to avoid this situation, we forbid the usage of 'x_name' as
_rec_name on non-custom models.
OPW 2349238
closesodoo/odoo#61534
X-original-commit: 731e676fa8a9f7bdc6a66056c124c3b39a0800ad
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
That should fix all detection issues once and for all.
task-2366680
closesodoo/odoo#61528
X-original-commit: cf6961fba38ed619bf7bfb908c3aadde0f694648
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Escaping the match name is escaping an already escaped string from
`postMessage`. How ever we need to escape the string from
`this.mentionedPartners` and `this.mentionedChannels` since they are matched
with an escaped string.
This fix the bug when mentionning a channel with `&` in it's name.
task-2366680
PR https://github.com/odoo/odoo/pull/60593
X-original-commit: fecd2b28309b0fa4e5ecb8c7d26f6a335036e740
Hide the forecast widget in case of kits. Indeed:
- the forecast report doesn't support kits
- the semantic for a kit forecast is far from being obvious, especially
in case of partial deliveries, returns, returns of returns, etc.
Better hide it than displaying an incorrect information.
closesodoo/odoo#61522
X-original-commit: c1fccaee5dd676f2fe07bb5c17eb2967ee6b742e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Pupose of the task is, to set up a dedicated 'dashboard' reporting menu
item, and make the graph view the default the other 'leads' and
'opportunities' reporting menus.
So in this commit, change the default view graph in normal report
(except dashbaord menu) and each menu should be submenu of reporting
menu Also apply default filter for lead reporting menu
TaskID: 2311392
Related Enterprise: https://github.com/odoo/enterprise/pull/12419
closes odoo/odoo#55598
Closes: #55598
Related: odoo/enterprise#12419
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
We can have payment.transaction references of >20 characters. This
happens automatically if you have long sale.{order,subscription}
sequences (especially through website_payment because it adds multiple
suffixes, e.g. SO2020/1234567 could turn into
SO2020/1234567-12-1-1-1). We POST the full reference via the
x_invoice_num variable. Unfortunately Authorize specifies a maximum
length of 20 for this field [1]. So when Authorize POSTs back to
/payment/authorize/return it only specifies the first 20 characters in
x_invoice_num. E.g. when POSTing
{
...
'x_invoice_num': 'SO2020/1234567-12-1-1-1',
...
}
we receive back in /payment/authorize/return:
{
...
'x_invoice_num': 'SO2020/1234567-12-1-',
...
}
This causes _authorize_form_get_tx_from_data() to not find the
transaction which results in a ValidationError.
To fix this also pass the reference in the x_description field. It has
a more generous 255 character limit [1]. Then search using both.
We can't get rid of x_invoice_num entirely because we cannot assume
the payment_authorize.authorize_form will be updated (even more so
because it's a noupdate="1" template). By still using it in
_authorize_form_get_tx_from_data() we ensure that everything keeps
working regardless of whether or not x_description is included in the
template.
[1] p39 in https://www.authorize.net/content/dam/anet-redesign/documents/AIM_guide.pdf
opw-2373433
closesodoo/odoo#61449
X-original-commit: 3a220d3ad2999a21d54924940574ba96a9c07154
Signed-off-by: jorenvo <jorenvo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
A cash rounding precision must be strictly larger than zero to follow
the restriction introduced in e270e9e0cc.
opw-2341804
closesodoo/odoo#61382
X-original-commit: 563752358d233d4fc9cf1d7e7abd0b1656dc82c1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Small refactoring to allow calling the method to update the debug
manager action independently from `current_action_updated`. Needed for
3d80ff9998dd402ac48d280e5d6b81aaf91b6180.
opw-2365539
closesodoo/odoo#61491
X-original-commit: c4e1cfc527cf65fdad201b77e54bf7027b8dd6c2
Related: odoo/enterprise#14639
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
We extract the `price_unit` and `tax_ids` recomputation logic from the
`_onchange_product_id` method. This way, it can be called
programmatically.
opw-2371934
closesodoo/odoo#61477
X-original-commit: ca6f25bef45137c032bc5cafd336c3f16a97a929
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Behavior prior to this commit:
When editing a lead, if we log a note, it will refresh the record and
cause the changes to be lost. In version 13, it would only refresh the
record if `@` mentions were added.
Behavior after this commit:
The record will only refresh if it is not dirty.
Note:
It is not clear why the record would in fact ever need to refresh
as there is no visible change on the lead form when a note is logged,
whether or not followers are added (the message thread, which shows the
number of followers, refreshes regardless). In this commit I chose the
approach which would cause the least change. There is still a need for
a longer term solution to orchestrate the refreshes, which will take
place once the rest of the web application is converted to use Owl.
opw-2369162
closesodoo/odoo#61503
X-original-commit: 6d7058679869ba03e164993687c21b0bae12822d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
Create and post an invoice ('Lock Posted Entries with Hash' on the
journal)
Edit also Bank journal enabling 'Lock Posted Entries with Hash'
Create and post a corresponding bank statement:
- same setting on the journal
- same partner on the line
Reconcile
Action will be blocked because the system try to
rewrite the partner on the posted line which is locked.
For Bank/Cash journals should not be visible the lock setting.
opw-2367688
closesodoo/odoo#61284
X-original-commit: d7f92cabb4bb12fe40356c9764c8e3e7c75e4f37
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
The order to find when to reset the sequence needs to be the following:
* find a sequence used before the date of this move
* if there isn't any, find the sequence of any move
Because we were not looking at the second step for bank statements, we
could have an issue since we were not checking the sequence relative to
the correct date.
closesodoo/odoo#61495
X-original-commit: b863b9cfedb3e7b4d1e3d409c829ffa0bfa1d9bb
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
When you make a payment, if a supplier have multi bank account, the bank name is not show in the selection. With the bank name it is more simple to find the good bank account.
closesodoo/odoo#51930
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Usecase to reproduce:
- Rule from WH/A -> WH/B as automatique no step added
- Rule from WH/B -> WH/C as transfer created
Do a move that goes to WH/A and confirm it. It's destination location
is correctly set to WH/B but the internal transfer from WH/B to WH/C
is not created.
It's due to the avoid loop location that returns always true due to
code removed in commit 1d36fb428fclosesodoo/odoo#61488
X-original-commit: b2a07e4d08beff360ac1e6c95d240a15b1081855
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before this commit, the value of data-oe-shape-data required double
quotes to be properly parsed in JSON in the getShapeData method.
After this commit, we also allow single quotes to prevent issue if
someone doesn't use double quotes in the the value of
data-oe-shape-data. Which was precisely the case in one of the themes
and this is why this commit is a fix.
task-2327741
closesodoo/odoo#61487
X-original-commit: 10ac750aaecf502500dc08966f4642a8604a685b
Related: odoo/design-themes#423
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Add a margin bottom on snippet buttons. So when there are 2 buttons (or
more) on the same line, we have a space between them on small devices
when displayed vertically.
task-2327741
closesodoo/odoo#61484
X-original-commit: 9db7b9bdbd86405fdfe2c0efccebea780b7ffb63
Related: odoo/design-themes#422
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Issue
- Install "Approvals"
- Submit new approval with you as "Request Owner"
- Click on "View Approval Request" in your mailbox
The link redirects to a 505 error
Cause
The model is not the correct one and the res_id is undefined
Solution
Specify the model and the res_id to _notify_get_action_link
when creating the link with kwargs
opw-2358846
closesodoo/odoo#61478
X-original-commit: 075325226d6f7c2af638013f25613ddd391e506b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
This change of style is a special request from FP: full width, full
height, no <sheet>, no resizer.
I did end up using a <sheet> and restyling it specially for note because
the styles that allow us to have the note next to chatter is too
intricately linked to the style of the sheet in form view to make it
safe to remove the sheet. Indeed, fully removing the sheet implied
duplicating a lot of css from community and enterprise alike. This way
is the least intrusive even though semantically unsound.
closesodoo/odoo#61405
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Issue
- Open any opportunity
- Go to "Extra Information" and click on "Campaign" field
- try to create new campaign
Traceback is raised
Cause
"self.ids" is empty and the "tuple(self.ids)" on the SQL query return "()"
Solution
Initialize campaign field with default values
opw-2376082
closesodoo/odoo#61476
X-original-commit: 5797be02e32e68e0a188bfdc8b85068fb8fa5435
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
Steps to reproduce the bug:
- CRM--> Configuration --> Tags
- Delete the tag "No more partner available"
- CRM --> Lead --> Automatic Assignment
Bug:
It will raise Traceback
`AttributeError: 'NoneType' object has no attribute 'id'`
as Tag is not Present.
With this Commit:
It will add Tag if it exists on database.
closesodoo/odoo#61470
X-original-commit: 631030ae179c65ae0d99603046b5a09ffe00c408
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
We need to ensure the name stays consitent with the journal_id and the
date when we try to change one of those fields.
X-original-commit: 634aaeeac36d2371743338536466a0bcc9ad6c69
* on image remove was removing two images instead of one -> fixed
* reactivate the image adder helper if you manually remove the last image
----
bug report :
[QSM] Images wall snippet -> Add images -> click on one -> Delete via the trash icon button on the overlay -> Sometimes (most of the time) delete 2 images instead of the selected one
closesodoo/odoo#61462
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Fix traceback when creating a new contact by checking the id list is not empty
Filter default reporting by name rather then by campaign (as campaign is an option)
Group by Campaign only if the option is checked to enforce coherency.
> This is unblocked with a group.
Hide the 'replied' status from sms reports as it is not relevant for sms.
Remove the preview message for sms as it is not relevant elsewhere then the object of mails.
Warn the user if he's trying to send a sms with only white-space characters.
> this causes an error because the plaintext-html conversion in mail_thread.py
> consider a white-spaces-only text as empty.
Mobile placeholder added for a better understanding of the field by the user.
Task ID : 2302578
closesodoo/odoo#61461
X-original-commit: e6496af1ea31b2c699de9e41196a9ae3a07efb7f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Make the "activity_state" searchable on the "mail.activity" mixin.
This field is not stored as it depends on the current time.
Technical
=========
To make the search, we perform a SQL query.
The "activity_state" depends on the state of each activities on the
record. And this state also depends on the timezone of the user of
the activity. That's what made things tricky and we need to make the
conversion in SQL for performance purpose (we can not fetch all records
and compute them in python).
There's a special case, where there's less than 24 hours between the
deadline and the current time but one day of difference. In that case
the state should be "planned" and not "today". This case is handle by
the function "DATE_TRUNC" (e.g. 23h 01/01/2020 & 1h 02/02/2020).
Also for performance purpose, we compute the delay only once and we use
the function "SIGN" so we can use a switch/case instead of duplicating
3 times the expressions.
Task 2354754
closesodoo/odoo#60074
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When using eg. arabic locale, the figures inside dates were replaced by
arabic figures which are not supported server side (they are almost
always sent in latin figures).
With this changeset, the we are using english locale to get date in
domains.
Without the change, added test fails with:
Numbers in domain should not use addoneForTest locale
Expected:...[date_field, >=, 2020-06-01], [date_field, <=, 2020-06-30]
Result:...[date_field, >=, 3131-17-12], [date_field, <=, 3131-17-41]
opw-2370392
closes#61354closesodoo/odoo#61443
X-original-commit: 74ea66a107cfc98cce8e52903ec21e3d752fb4fb
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Steps to reproduce the bug:
- Create an opportunity without a customer but with a phone number
- Send a sms
- Refesh the page
Bug:
A traceback was raised because an entry is created in mail_message_res_partner_needaction_rel
with partner_id = False
Due to https://github.com/odoo/odoo/blob/14.0/addons/sms/models/mail_thread.py#L327
A mail.notification is created from a sms even if there is no partner set on the sms
opw:2372201
closesodoo/odoo#61425
X-original-commit: 651da2fe8694ed0003a9dd0801c71f2ef26cedb9
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Issue
- Install live chat and website
- In incognito mode, send a message via live chat (as public user)
- Log in the database
Erro: Record does not exist or has been deleted. (Record: res.partner(-1,), User: 2)
Cause
Guest with negative id are sent to the server
Solution
Don't send negative id
opw-2371677
closesodoo/odoo#61407
X-original-commit: 5dfd793470deed9ab459ccb2d747511213bc5bf9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The purpose is to ease the onboarding for the default CRM settings.
Now, we do not include any field by default and tags become an option
in the choice of fields apply to the computation.
task-2196200
closesodoo/odoo#48124
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Issue
- Install 'Event' module
- Go to 'Event' and select any event
- Click on "Attendees" stat button
- Click on any attendee ( or create one if not any)
- Confirm ( if not already confirm) registration
- Click on "Send by email"
- Change template to 'Event: Registration' then send
- In the chatter, check Google or Yahoo calendar link
Bad link.
Cause
Wrong 'dt_format' pattern generate a broken datetime value;
current format work with time.strftime() but not 'babel' library.
Solution
Update 'dt_format' pattern to match with babel library since it's the
one used in 'format_datetime' func.
> Note that Babel uses different patterns for specifying number and date formats compared to the Python equivalents (such as time.strftime()), which have mostly been inherited from C and POSIX
ref : http://babel.pocoo.org/en/latest/dates.html#pattern-syntax
opw-2370895
closesodoo/odoo#61394
X-original-commit: ab03fa39c716f717ee78c30e41727a85234b5c9d
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Steps to reproduce:
- Let's consider a camt file F with Stmt Id > 2147483647
- Import F
Bug:
An index out of range was raised because range of an integer type in postgresql must be
in [-2147483648, 2147483647]
opw:2372401
closesodoo/odoo#61391
X-original-commit: 953d3069fb77605a8d69f80124d011144595d459
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>