With this change, we show the variant price when printing ZPL
product.product report and not the template as we did before.
This way it is the same as what we see in Odoo as well as when printing
PDF label of the product.
targetting only 14.0 for now (but could be backported in stock_zebra)
opw-2455291
closesodoo/odoo#66415
X-original-commit: 7822b5bc76b2cbc1534b8df8d0bb3b5a3b50db0e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before this commit:
A method action_subtask is including the other actions context if have which
reflects while clicking on the Sub-tasks stat button. For examples:
- When click on the stat button 'Sub-tasks' of any task which one is clicked by
systray activity icon results
- When click on the task menu in project there a default search filter 'My task'
which also passes when click on 'sub tasks' stat button
After this commit:
Remove the context that startswith `search_default'.
Hence, now subtask will display with the correct context.
Task-2413127
closesodoo/odoo#66401
X-original-commit: b13fc817d150f642254c4738cfbd91ac2ecaa65f
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, the ldap filter can only contain a single
placeholder, and thus the `login` can only be matched against a single
LDAP attribute.
This change allows matching the `login` against multiple LDAP
attributes e.g. checking against either an email or a uid:
(|(mail=%s)(uid=%s))
closesodoo/odoo#62134
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Add a warning to explain that create a second
warehouse will activate the multi-location automatically.
task-2439909
X-original-commit: 4964a9482b8b195f5b629ea5c91f7d7bfcce2163
When we create a second warehouse on a company, the
multi-warehouse and the multi-location is automatically
activated. But a user can desactivate manually the multi-location
which leads to a misconfiguration (no sense to have multi-warehouse
without multi-location)
Add a UserError to avoid this case.
task-2439909
X-original-commit: e3549ae8eefe9bc3029ea7f50eed479d113b4687
To reproduce:
0. Login as admin.
1. Install pos_hr.
2. Open a pos session without activating the Authorized employees feature.
3. Make an order as Mitchell admin but **don't** validate, order is just
in the localStorage.
4. Go back to the backend (without closing the browser).
5. Close the session.
6. Edit the pos config and activate authorized employees.
7. Delete the employee record linked to the admin user.
8. Open a new session using the modified pos config.
9. [Crash] Because of missing employee.
Solution:
We just make sure to prevent field access on missing undefined object.
closesodoo/odoo#66408
X-original-commit: 176046304cc21daa839290df070170fa6ce2509d
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Currently a package level is created and has the newly created package
assigned to it when "Put In Pack" is used. Unfortunately if a move line
has its result_package_id changed after having a package assigned via
the Put In Pack, then the package level's package_id isn't correctly
updated. This leads to incorrect data in the db. This incorrect data
doesn't affect much since result_package_id from an entire package move
cannot be changed in any views, but it does mean that the created
package associated with the package level can never be deleted even if
it's never used.
Steps to reproduce:
1. active (delivery) packages in settings
2. create a picking and create some done values
3. use "Put In Pack" to put done move lines into a package
4. change the newly created Destination Package to another package
5. Go to Packages and try to delete the package created by Put In Pack
Expected result: able to delete the package
Actual result: Server error that package is still required by Stock
Package Level.
This is a short term fix. In the long run it would be better to fix the
package_level logic so it isn't unnecessarily assigned to moves/move
lines and/or updates in a cleaner way.
Task ID: 2418907
closesodoo/odoo#66406
X-original-commit: e5ab8cf9623bc436f43706926bc6ee596c549244
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before this commit:
When a new conversation is initiated, the 'new messages' separator is displayed.
This looks a bit weird as there is no history of conversation and thus no older
messages from which new messages should be separated.
After this commit:
The 'new messages' separator will not be displayed in new conversations.
LINKS
PR https://github.com/odoo/odoo/pull/65952
Task-2453511
closesodoo/odoo#66400
X-original-commit: ff44dbf31a3732a8ebced7ff907fff3b2440afc4
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, the o_we_selected_image class was not removed from
forum post when saving.
task-2312878
Part of #66316closesodoo/odoo#66399
X-original-commit: 876bb9cb06097db54d3c02a57a6d4b35eee0107c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
A comma was removed in the following commit for no reason
912996fe90 . Because of this, the click
event of the forum post submit button was not working.
task-2312878
Part of #66316
X-original-commit: 3509d438133de46ef02bb70255c7cd737a695f15
Reproduce:
* Create one move in a journal
* Create another move in another journal but in the same year
* Both journals should have a yearly sequence reset
* Post both moves at the same time
Bug:
They both are using the same sequence.
Expected:
Both should be using their own sequence.
closesodoo/odoo#66383
X-original-commit: f816c326f348ff78a982f91a736cc005d3e0cd31
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
The mail signature of an user did not inline the CSS like the body of a
message, so for example icons seemed to work but would not be seen
(unless the mail reader had the same font-awesome system).
With this change we inline the signature too.
On edition there was also an issue since the original icon was saved as
data-class which was stripped: so eg. when editing a mail.message with
working icon, the icons would disappear.
opw-2453912
closesodoo/odoo#66372
X-original-commit: 5e093b7a37984c8cc5aa73d1c0f7aa9c9345e6b1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Steps to reproduce the bug:
- Let's consider a user U with employee officer access rights
- Log with U and go to Employee in debug mode
Bug:
The following menus
- Configuration/Challenges
- Configuration/Departments
- Configuration/Goals history
were not accessible
opw:2450931
closesodoo/odoo#66365
X-original-commit: 02d32aa9936cb0d9a1248bb866a31f4a40a0eac2
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit makes the pad quick editable like a html field.
When we click on the pad, the form switches to edit mode but
not if we click on a link. A link has the priority over the quick edit.
closesodoo/odoo#66359
X-original-commit: c9e7c6bcde6a568bc5141a29644ab1f1e6a4a312
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When printing some invoices, they are not registered as main
attachment. Therefore, when sending a follow-up report, a UserError
message asks the user to print the invoices first.
To reproduce the error:
(Need account_accountant, use demo data)
1. Go to Accounting > Configuration > Invoicing > Follow-up Levels
2. Select "First Reminder Email"
3. Enable "Join open Invoices"
4. Create an invoice INV01 for customer C01 + Post INV01
5. Go back to Accounting > Customers > Invoices, select INV01
- ! Do not open the invoice. Just select it.
6. Print > Invoices
7. Go to Follow-up Reports
8. Select C01
9. Send by mail
Error: An error message is displayed: "You are trying to send a followup
report to a partner for which you didn't print all the invoices" but it
does not make sense because the invoice has been printed.
For a follow-up report to be sent, the invoices must have the field
`message_main_attachment_id` defined (see
[code](https://github.com/odoo/enterprise/blob/476d862aba396c54c7a47950e02af7aed008a2db/account_followup/models/account_followup_report.py#L311-L313)).
There are two ways for this field to be set:
- When sending the invoice, `_message_set_main_attachment_id` is called,
select one attachment and mark it as main one
https://github.com/odoo/odoo/blob/437b49860b46b5abb8f55ced349fece984968998/addons/mail/models/mail_thread.py#L1918-L1924
- When opening the invoice, if the sreen is large enough, a pdf viewer
is opened next to the invoice. This pdf viewer will call
`register_as_main_attachment`, the latter marks the `ir_attachment` as
main one:
https://github.com/odoo/odoo/blob/e6a41b118a94c5b101d127f6b70fc54958e9346b/addons/mail/models/ir_attachment.py#L17-L20
However, when the user only prints an invoice, nothing will set the
`message_main_attachment_id` field. Thus, this fix will call
`register_as_main_attachment` when a pdf is generated and will mark it
as main attachment.
OPW-2427247
closesodoo/odoo#66356
X-original-commit: 643e7b06aee2a91190a3a7271211e70e4888d595
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
The recent change in the way debug=assets works (which now bundles all
files in a bundle instead of serving them statically) had a negative
impact on the stacktrace displayed in the error dialog in debug=assets:
it now display the bundle/linenumber instead of the actual file/line
number.
This is not a huge deal, most of the time, because the errors displayed
in the console display the correct information, and the debugging
process should work as before. But it can certainly be annoying in some
cases.
With this commit, we use the Stacktrace.js library to dynamically fetch
the sourcemaps and to decorate the displayed information with the
correct file and line numbers.
closesodoo/odoo#66318
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Part of task 2124952
This is needed in order to be able to create the demo data.
It was not done earlier because of stable policy but it was added to
l10n_pe_edi instead.
closesodoo/odoo#60148
Related: odoo/enterprise#15213
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Part of task 2124952
Amend the demo data to populate required fields added in dependencies of
l10n_cl.
The field l10n_latam_document_number is not required if the journal is
not using Latam invoice documents.
Part of task 2124952
Return False if the recordset is empty.
```python
self.acc_type == 'iban'
```
This already ensures there is at most one record.
We now have the same behavior as for `_is_isr_issuer` (False if empty
recordset)
Was needed after cb8b6db391 because it is
now calling _is_qr_iban on a possible empty recordset.
Revert 1b2aef65f4
Part of task 2124952
By using AccountTestInvoicingHttpCommon, we have a setup independant
from the demo datas. This also prevents running tests with incompatible
localization: the tests for l10n with another currency than USD failed
because of the demo datas preventing the change of currency.
Task 2124952
Extract all the demo data from `l10n_generic_coa` to a new way of
generating the demo data for accounting modules.
Because the data needs to be created multiple times, and right after the
chart template instanciation, it cannot be done the usual way. Instead,
we use python generators to declare the data. It allows us to reference
data that was not created yet at the start of the creation of the demo.
An xml_id is given, prefixed with the id of the company it is created
for (just like the instanciation of the chart template)
To find the correct accounts, a helper method has been added to
`account.account`. It will look for an account with the correct xml_id
(which is the one of the l10n_generic_coa, that we have to put on the
other l10n modules too, in the future). If it didn't find the xml_id, it
will look for an account with the correct type. If it still didn't find
one, just take any account.
Let's assume a <groupby> node in a list view containing a button
with an invisible modifier referencing a many2one field, e.g.
```
<tree>
<groupby>
<field name="m2o" invisible="1"/>
<button string="do it" attrs="{'invisible': [('m2o', '=',
False)]}"/>
</groupby>
</tree>
```
Before this commit, the m2o field was correctly read, but it's
value wasn't processed by the model, so the modifier wasn't
correctly evaluated.
Issue reported on PR https://github.com/odoo/odoo/pull/65316/closesodoo/odoo#66330
X-original-commit: fa7a185663f21c1c4060765c8c137b296df3a350
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce the bug:
- Let's consider a user U with a related partner P
- Log with an internal user IU without Admnistration/Settings and Employee Officer access rights
- Create an employee E with address_home_id = P and save
Bug:
An access right was raised because the mobile of P was written on P and
the error was raised at https://github.com/odoo/odoo/blob/13.0/odoo/addons/base/models/res_partner.py#L531
Due to this bug, only internal user with Admnistration/Settings access rights can create an employee
linked to a contact of an internal user.
opw:2445953
closesodoo/odoo#66014
X-original-commit: 7e50c8ae6aad3325163e8a30c4f2513d24b72b83
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
improved various things into this commit:
- added OPTIONAL email field on the new ship-to address for the eCommerce
- if the email field is empty on the shipping address,
it will send the confirmation email only to their parent
task-2194014
Closes#47347
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
The unlink fail in __init__.py uninstall hook is managed, however
when it fail, the error is catch but the cursor is not rollback and
do not accept additional transaction. That result in a traceback at
uninstall.
opw-2453939
closesodoo/odoo#66309
X-original-commit: 66d9dce9b6e6e65000ba0b62efcb153f2d3eec15
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
When we edit a view with ace in eg. studio, if it works the saved button
would never be enabled again because of missing callback.
Match the behavior of dom.addButtonLoadingEffect other usage (80592abd).
opw-2457046
closesodoo/odoo#66301
X-original-commit: 5324f7a6aa757ff6a728258ea1877ded4a6f86cd
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This guarantees the cache consistency of the many2many field values.
closesodoo/odoo#66299
X-original-commit: 421631d7f222f1fcc3381c79320e109562533f22
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Before we need to add extra_field on website AND enable the view.
Now the view is enable for everybody without option, but we only show the extra
field zone if at least one field is set on website.
task-2381327
closesodoo/odoo#66037
Related: odoo/upgrade#2163
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Currently, after the customer sends the survey feedback, their ratings and
message (the smileys and text area) is displayed on the right of the title.
By this commit, the smileys and the text area should be displayed below
the title.
TaskID : 2452502
closesodoo/odoo#66308
X-original-commit: 261bf437e806fbf105597b66464c3a697e17e4d1
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Issue
- Install 'Calendar' module
- Create new event from Calendar view
- Edit event
- Set True to 'Recurrent' in options tab
- Repeat every 2 weeks
- Until : Number of repetitions 2
- Save and go back to calendar view
- Events are shifted (+ 1 week)
Cause
The rrule.rrule (who create the generator with the recurrence ranges dates) use
by default `calendar.firstweekday()` as first week day ('wkst').
Solution
If recurrence frequency is 'weekly', get first week day based on user language,
and add it as param ('wkst') to the rrule.rrule.
https://dateutil.readthedocs.io/en/stable/rrule.html#classes
opw-2448325
closesodoo/odoo#66311
X-original-commit: 5e85ee521edb70d4d2c7cdbf59c29794a8cd98b9
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Co-authored-by: LucasLefevre (lul) <lul@odoo.com>
Before this commit:
When chat window is focused odoo shortcuts (with alt) did not work because of
there is stop propagation in _onKeydown method.
After this commit:
Remove stop propagation. Now odoo shortcuts (with alt) work
properly.
Task-2388829
closesodoo/odoo#66280
X-original-commit: 1de3ce47c6ab1a7afaccfda086a6284c0c41dcf3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit:
If a next activity is "triggered", the discard button is not visible.
After this commit:
Even if a next activity is "triggered", the discard button will visible.
Task-2459645
closesodoo/odoo#66224
X-original-commit: 24804aaef12fd98bc63fdb0e7905500ac76f877a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit fixes two unrelated small issues in the JS transpiler regexps:
- handle special chars in file url (so, one can now use a "-" in a file url)
- issue with the @odoo-module detection: it required 2 spaces after the @odoo-module word, because of the way the regexp was constructed. It also required spaces at the start of the line. All those have been fixed.
closesodoo/odoo#66255
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
In a4d170ad9 there were some improvment to not show event totally empty
on the day calendar view because of different style (font + padding).
The lower part of the text was still a little cut, this commit try to
improve this for week and day view mode by removing 5 additional pixels.
opw-2422700
note:
Also fix the fc-short for fullcalendar Odoo, we had this 2019 change:
fullcalendar/fullcalendar@e879c43
that made it not working without title (odoo use case), in 2020 it was
reverted when refactoring for 5.0:
fullcalendar/fullcalendar@7c7ce1eclosesodoo/odoo#66109
X-original-commit: b856d312be19b0fdf636600a76c4d9b427eedb7c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
The function `_get_possible_combinations` generates possibles combinations
for the product template attribute values (ptav) of each product template
attribute line (ptal) of a given product template. It used to iterate over
them using a cartesian product. A combination can be invalid if it
contains two incompatibles ptav. The problem is that it used to filter out
invalid combinations after generating them. It's a problem because there
can be a lot of invalid combinations to filter out before finding a valid
combination. Even before the first valid combination if the first ptav of
the two first ptal are incompatible.
The solution brought by this commit is to reject the invalid combinations
while building them rather than after. It does so by using a cartesian
product implementation with early rejection. The algorithm tests each
ptav when incorporating it in a partial combination and if it's
incompatible, it goes to the next partial combination and thus skips all
combinations starting with the invalid partial combination.
The client that reported the issue has a product template with about 25
ptal with an average of 9 ptav. The ptav of the first ptal was
incompatible with the first ptav of second ptal. It had to build and
filter out 5.76*10^15 ptav before finding the first valid ptav. If we
generate 10^6 ptav by second (it's much less) user would get first ptav
after 182 years. Now it's instantaneous.
opw-2335936
closesodoo/odoo#65809
X-original-commit: 98616c4676aa6ef5507110c0e407a640082abbaf
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit when a dynamic snippet was fully configured but
returned no data, the rendered section remained empty in edit mode.
After this commit when a dynamic snippet is fully configured but has no
data to display, some sample data is generated in edit mode to give a
feel of how the page will look like when data will be available.
This commit of merge refactor also the way to get the data to render.
We split function to handle data and convert / escape it. The default
structure is now simplified and an helper to_generic exists to allow
generic template to be used with indexed list.
An other PR is coming to change the data getter, and have more generic
function to merge 'Recently Viewed' in the "Dynamic products' snippet.
task-2446024
closesodoo/odoo#65176
Pr: https://github.com/odoo/odoo/pull/65176
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Call _get_filter_meta_data when needed instead to compute it only once and
give it from function to function, it is really trivial to compute and the
api of functions are simple from this way.
Avoid to use h4/h5 taf for styling bug use bootstrap feature for it.
The semantic of <div class='h4'/> vs <h4/> is not the same for SEO
Don't make call_to_action_url required
+ small typo
task-2446024
https://github.com/odoo/odoo/pull/65176
Purpose of the commit is to prevent the hierarchical name of
category in search panel.
So in this commit, Override the the name_get to prevent the category
hierarchy on search panel as we already displaying parent categroy
in search panel.
closes odoo/odoo#65442
Taskid: 2417252
Closes: #65442
Related: odoo/enterprise#15550
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, the preview of the dragged snippet didn't work
when moving a dragged snippet from a drop zone to an other drop zone
when there was no space between those drop zones.
It is because, in this case, the over event of the second drop zone is
triggered before the out event of the first drop zone.
task-2312878
closesodoo/odoo#66267
X-original-commit: 66b468626e046a13a463cff3a2285801016f3ed7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
In "Inventory Valuation", when click "Inventory at Date" then "confirm".
Record for consumable products will be shown in the report.
Previously fix in #62622 which disabled svl for consumable products,
then rolled back in #63386 due to mrp need to create svl for consumables
to analyse cost.
In this commit, we add a domian filter to not show consumables in
"Inventory Valuation"
Task 2449211
PR #65726closesodoo/odoo#66260
X-original-commit: 415a65f6b6da4a8aca394e189d72b93244af745b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Yuchen Huang <yhu-odoo@users.noreply.github.com>