Description of the issue/feature this PR addresses:
There is no easy way to re-assign the time sheets to the correct SOL (changing
the task's SOL does not change the non-invoiced time sheets automatically)
Current behavior before PR:
On a project, if a user put a wrong sale order line, and after that he changes
this SOL, the timesheet line will not be moved.
Desired behavior after PR is merged:
On a project, if a user put a wrong sale order line, and after that he change
this SOL, all non invoiced timesheet line will be moved to new line.
TaskId: 2144703
Purpose
=======
Fix multi-company access issues following the big changes that happened
(the 13.0). Make the usability better in order to avoid potential
multi-company issues for the user.
Specification
=============
Check the related commits to see the different fixes that have been
made. For more information about the technical/functional considerations,
check the related task.
closesodoo/odoo#43321
Taskid: 2088891
Forward-port-of: odoo/odoo#43230
Forward-port-of: odoo/odoo#42418
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Keep the same UOM than the MO.
opw-2169377
closesodoo/odoo#43407
X-original-commit: 942154b3140cb3fc92e8aeff0241149e701581a7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Purpose fo the task is to improve the UX of timesheet, project and task.
Done the chages for below point:
- improve the stage demo data to unified the project stage
- on the task timesheet 'sub-tasks hours spent' should be clickable
and on click, it will display the list of subtask timesheet.
- display in warning tasks for which Remaining Hours < 0 if Planned Hours > 0 in task list view
- improve the settings of collabrative pad and planning and project form view
Task-2129052
closes odoo/odoo#41092
Closes: #41092
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Adding more control on the rating snippet. Choose the color, select
other icons in media dialog, no limit to add active or inactive icons,
display the rating inline or below the title.
task-2146209
closesodoo/odoo#41169
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When saving the content of an oe_structure, the starting text nodes
were lost because only the internal *elements* were considered. Ending
text nodes were kept since they are considered as the last element's
tail by the etree library.
task-2040764
closesodoo/odoo#43375
X-original-commit: eb71d25ce965ecdb20c26517627aed5b43f8b990
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Steps to reproduce the bug:
- Let's consider two sales taxes T1, T2
- Create Fiscal Position FP which maps T1 to T2
- Create Product P (Customer Tax: T1)
- Configure FP as default fiscal position and Invoicing to print invoice in POS.
- Create POS order with any customer, with P and FP
- Select Print Invoice in the payment window
- Process the payment
- Order Preview displays T2 as expected
Bug:
The printed invoice displayed T1 instead of T2 on the invoice line
opw:2171599
closesodoo/odoo#43356
X-original-commit: b26a8d1b8f5c8b700a4a48f3698ac2d109628db4
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Steps to reproduce the bug:
- Go to Settings > General Settings
- Set "Customer Account" on "Free sign up"
- Go to Website > configuration
- Activate "Digital Content"
- Create a fiscal position FP with a coutry group CG and applied automatically
- Create a service product P with digital content DC at sales price = 0
- Publish P on the website
_ Log out and go to the shop with public user
- Add P in your cart
- Process the your Order in the shop
- When the order is confirmed, click on "Downloads"
- You will be redirected to the login page
- Click on "Don't have an account?"
- Fill in the form and sign up
Bug:
Nothing happened because in function sale_get_order in model 'website'
the partner on the confirmed SO was not the same as the new one and so
update_pricelist was set to True and a call to function _cart_update was
done on a confirmed SO. Inspired from function _cart_update in model
'sale.order'.
opw:2146902
closesodoo/odoo#43362
X-original-commit: 1f6a4e56442ba5531f87269ab032f99218fc45a2
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Description of the issue:
Transfer between Bank1 (550001) and Bank 2 (550002) of the same company via the intercompany bank account (580000) :
Bank 1: minus 1000 EUR, we create the following accounting entry via the reconcile widget
account 550001 credit 1000
account 580000 debit 1000
Bank 2 : Plus 1000 EUR
When we select the counterparty 580000 entry of the Bank 1 statement via the reconcile widget
than the statement_line_id of the entry from Bank 1 statement is replaced by the one of the Bank 2 statement.
Hence this account.move.line is linked to the wrong statement line.
closesodoo/odoo#43371
X-original-commit: 3d74e7397e15311f1e9189589a435d9683376317
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Some code modify return of res.users().context_get, but this is a
cached method so this will unexpectedly affects totally unrelated code.
For example, changing the company with the company switcher could add
`allowed_company_ids` inside the cache, then it will be cached until the
server is restarted, even if we change company again inbetween.
Added test failed with:
"NotImplementedError: '__setitem__' not supported on frozendict"
on the line with `User = User.with_context(context)` where User already
contained `allowed_company_ids` in its context.
note:
in this forward-port, context_get is also changed to return frozendict
and prevent being able to have an unexpected issue by code that modify
context_get returns.
opw-2158340
closes#42465closesodoo/odoo#42723
X-original-commit: 5d69885c1cd6921b3de00aae7e0ed6fff243ff95
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Purpose
Fix multi-company access issues following the big changes that happened
(the 13.0). Make the usability better in order to avoid potential
multi-company issues for the user.
Specification
Check the related commits to see the different fixes that have been
made. For more information about the technical/functional considerations,
check the related task.
Taskid: 2088891
X-original-commit: 5c8df3a5e5f7960e5eab6439e0a32a06224ba826
The inheritance of account billing group gives stock managers the access
to account module.
This commit is to remove this inheritance. When we need to access
account.move model, check if the user is a stock manager. If so, use
sudo() to get the access.
PR #43186
Task 2062611
- Apply the style of drag&drop zones (.oe_structure.oe_empty) even when
it is a descendant of the editable element, not the editable element
itself. This change allows to add a visible drag&drop zone in any
snippet.
- Add the editor messages (data-editor-message) on drag&drop zones when
a snippet is dropped (not only on editor start as before).
In preparation of task-2152185
closesodoo/odoo#43358
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Since this field is not required on res.partner.bank (which is fine: we want it to be synchronized with the journal's currency, which is None if the journal uses company currency), the parameter received by validate_swiss_code_arguments ended out being an empty recordset in case the company was directly in CHF. This caused the QR code to never be displayed in this situation.
closesodoo/odoo#43351
X-original-commit: 60a55834b5ae0a8ac10914a243f97029d9921ae6
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Custom text on product pages was part of the main template thus
preventing who modifies it to receive updates on the view.
task-2040764
closesodoo/odoo#37288
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Complement of 6a6a7e6e64a7e3727a6de1ca8d35361112d99de8
Display the price tag correctly on the eCommerce.
opw-2159838
closesodoo/odoo#43352
X-original-commit: 463d79a0f8f894f4481e59680eff7ea75a25fb46
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The `unsubscribe` feature of mass mailings repose on having a link with
HREF attribute `/unsubscribe_from_list` inside the mail message.
When the mass mailing is sent:
- relative URL are replaced by absolute URL (`/unsubscribe_from_list` is
replaced by `{system parameter web.base.url}/unsubscribe_from_list`)
- `{system parameter web.base.url}/unsubscribe_from_list` is replaced by
the real mass mailing link containing info that will be used to
unsubscribe the user.
But there was an issue in the case of multiple domain, if this scenario
happened:
- system parameter web.base.url is http://domain1
- a user use "Test" button on a mass mailing
- system parameter web.base.url becomes http://domain2
- the mass mailing is sent
The unsubscribe link is broken, this is because the implementation of
"Test Mailing" feature would update the mass mailing with absolute
links, so if the domain change, we the `unsubscribe` link will no longer
be found and replaced into the source.
opw-2124890
closes#42373closesodoo/odoo#43308
X-original-commit: c5036bcb11fef8081f005fe4bd0025aea41401a8
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Sort of but not really, this commit fixes a special case in which
launching a --test-file of a file with at least two SavepointCases would
create a postgresql deadlock and it would be impossible to terminate the
Odoo process without sending a SIGKILL or waiting for the lock to
timeout.
This was introduced at #39368 and happens because of the way that
unittests unwraps suites, to keep it short, when it unwraps the custom
OdooSuite class internally, it ends up with a vanilla TestSuite with
which to run the different test cases, and since #39368 depends on the
overrides added to OdooSuite to function, the class cleanups are not
triggered at the end of a test class (rollback, cache cleanups, env
reset, registry reset, etc.).
The fix is to manually unwrap the suite of tests to keep OdooSuite as
the suite with which to call the tests, which was already done for
--test-enable (although for different reasons, --test-tags?) which is
why --test-enable didn't have any problems.
This commit also fixes a typo I found on the backport, which meant
classCleanups were not being executed if the setUpClass failed, but it
had no effect on classCleanups during tearDownClass.
Task-ID 2160398
Depends on #43135closesodoo/odoo#43296
X-original-commit: 7a5ded7d40afc29043d356b5dece0dbe1fbd5ab3
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
An http-port provided on the command line (may also have been an issue
for config files, didn't check) would not be taken in account anymore,
because `odoo.tests.common` would be imported during the import of
`odoo` itself (when loading odoo.service.server), itself importing
`odoo.tools.config` leading to a default configuration being set up.
* remove `odoo.tests.common.PORT`, `config['http_port']` should be
used always
* defer the import of odoo.tests.common by moving it inside
load_test_file
* stop generating default configs
closesodoo/odoo#43283
X-original-commit: 45871f498ea4cf3ada719692e69cd413883ab442
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
The Foreign partner used in demo data was wrognly configure, it was set as "IVA Responsable Inscripto" when actually should be "Cliente / Provedor del Exterior".
After fix this in demo we updated the demo data of the vendor bills of this partner to match with the new responsibility.
Also apply and imporve in the way we are setting the fiscal position in the demo invoices, now qw use the onchange instead of setting the fiscal position explicitly in the demo invoices (and removed commented demo data that is not used)
closesodoo/odoo#43301
X-original-commit: 23e2824794b64624c8dbb1b8132d443657781830
Signed-off-by: Josse Colpaert <jco@openerp.com>
=======
Purpose
=======
Currently for a user to be allowed to see a private project they must follow the
project. This means that they will be added as a follower of all new tasks in the
project which causes them to receive 1000000 notifications, especially if there are a
lot of tasks in a project.
==============
Specifications
==============
1) Add an Employee m2m field on project next to 'Invited Employees'
- only visible if the 'Invited Employees' option is selected
- the project should only be visible to employees selected there (regardless if they
are followers or not)
2) Add an Employee m2m field on tasks below the 'Email cc' one in debug mode
- only visible if the 'Invited Employees' option is selected on the related project
- should be pre-filled with what is set on the project
- the task should be visible to employees selected there (regardless if they are
followers or not)
3) Add a Portal users m2m field on project next to 'Portal users and all employees'
- only visible if the 'Portal users and all employees' option is selected
- the project should only be visible to portal users selected there (regardless if
they are followers or not)
- rename the option into 'Invited portal users and all employees'
4) Add a Portal users m2m field on tasks below the 'Email cc' one in debug mode
- only visible if the 'Portal users and all employees' option is selected
- should be pre-filled with what is set on the project
- the task should be visible to portal users selected there (regardless if they are
followers or not)
5) Following a project/task should not grant the user/employee the ability to see the
project/task
Task 2031527
closesodoo/odoo#40505
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Prevent crash if `stock_valuation_layer_ids` is an empty recordset. Note
that the original issue is solved with #43017, but requires an upgrade
of the module.
opw-2172049
closesodoo/odoo#43289
X-original-commit: 8a1ce12aee326b59f33f48804a4cfca61dab7506
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
If we have a many2many_tags widget that is writable then becomes
readonly, we can have in the code this chain of event:
- get list of widgets we need to reset some data for
- apply modifiers
- reset the widgets
but applying modifiers can delete a widget (eg. an editable field that
becomes readonly), so when resetting we could call code on a deleted
widget which caused an error.
For example, if we have an attribute:
`<field widget="many2many_tags" attrs="{'readonly': 'condition'}"/>`
if the field goes from editable to readonly and is affected by an
onchange, we will call `setIDForLabel` on the deleted instance of the
widget which will cause an error.
Added test without fix fails with error:
TypeError: Cannot read property 'attr' of undefined
at Class.setIDForLabel (/web/static/src/js/fields/abstract_field.js:324:35)
because as said, the function is called on the editable widget that is
removed and replaced with readonly widget at that point.
opw-2154471
closes#43137closesodoo/odoo#43244
X-original-commit: 6f5ca16524be7c5bb45b03e7421154a20edc4cf6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Call the `onFocus` method before the `updateUI` one so that we can
make changes before we update/render the UI (so that `updateUI` may
be influenced by something done in `onFocus`).
Needed for upcoming task: https://github.com/odoo/odoo/pull/42189closesodoo/odoo#43334
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The exportation invoices demo data was created in the "Sales Journal" journal instead of the "Exportation Sales Journal". To fix this we have added the xml id of the journal explictly to fix this.
closesodoo/odoo#43329
X-original-commit: 4ab91233d64990cd9991d2f8c4fb1ba4a1a51a67
Signed-off-by: Josse Colpaert <jco@openerp.com>
Prior to this commit, two fields were used for lead and opportunities
count.
As both of these fields were set with the same values and only existed
for labelling purposes, this commit replaces them by a single field
and handles the the labels in the xml.
This commit also improves the way lead count is computed by using
a read_group instead of a search in a loop.
LINKS:
closes odoo/odoo#38707
Taskid: 2086863
Pr: #38707
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Prior to this commit, two fields were used for lead and opportunities
count.
As both of these fields were set with the same values and only existed
for labelling purposes, this commit replaces them by a single field
and handles the the labels in the xml.
LINKS:
TaskID: 2086863
PR: #38707
Before this commit, bank accounts tab on partner view is available directly
in base whereas it should not, as it contains information useful only
for accountants. We therefore move them directly to account.
Task ID: 2172260
closesodoo/odoo#43322
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When using emoji widget in a multi language environment, button for emoji
is displayed twice.
This is due to having in the widget both the input and a translation box
holding the translation button. Emoji button is incorrectly added to both
elements, which is fixed in this commit.
We also adjust vertical position so that button is aligned with the language
button.
Task #2168338closesodoo/odoo#42827
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
length is a reserved attribute in JavaScript, and may cause problems
when returning the object to the JS framework.
This commit is to rename the field.
PR
Task 2152050
closesodoo/odoo#43222
Related: odoo/enterprise#7686
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
And use "Margin (%)" for the recently added margin_percent field
computing the margin in % and not in money.
closesodoo/odoo#43130
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
PURPOSE
Allow multi-edit for calendar event and utm campaigns. Indeed it gives
flexibility to users when they have to edit several records at once.
SPECIFICATION
Enable multi-edit in each of the following views
* calendar.view_calendar_event_tree
* utm.utm_campaign_view_tree
Set the fields not editable to be readonly.
LINKS
PR #42786
Task 2078662
Related: odoo/enterprise#7553
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Query counts weren't adapted to recent performance changes.
This commit updates the different query counts to make sure
any commit changing the query counts knows it and does it on purpose.
Some query counts may vary between community and enterprise
and therefore have a higher value than needed in community version.
closesodoo/odoo#43202
Related: odoo/enterprise#7682
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce the bug:
- Install Sales
- Configure Paypal payment acquier
- Add extra fees such as 10€ of domestic fee
- Create a customer C with an email E and with no country
- Create a quotation Q of 100€ for C and send it by email to C
- Go in the email box of E and click on the link
- Click on 'Sign and Pay' button
- Sign Q and click on 'Pay'
- Choose Paypal as payment acquier
- Process the payment with Paypal
Bug:
An error log was displayed saying:
Paypal incorrect data:
mc_gross received 100 instead of 110
PS: the domestic fee was not counted because the partner_country_id
was not set in function render defined in model payment.acquirer
Inspired from function create defined in model payment.transaction
(addons/payment/models/payment_acquirer.py +961) where the domestic fee
is counted.
opw:2167104
closesodoo/odoo#43265
X-original-commit: 581020c733044b52cacd0d41a6a8eb8708671d0d
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Issue
- Install Projects & Studio
- Go into projects app
- Edit a project (... => Edit)
- Click on x attachments stat button
You can't edit with studio
Cause
Writing the action manually instead of using the base one
result with an empty xml_id (and a lot of missing data).
Solution
Use base.action_attachment like others modules do (e.g. helpdesk).
OPW-2146741
closesodoo/odoo#43263
X-original-commit: 856b09d7055ebbfebbe3b5dc3093e429c8c930ff
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
d06e67e748 introduces tools to use owl renderer
for a view. However, on_attach_callback and on_detach_callback were not
called on super (AbstractController), so not applied to the controlPanel
and searchPanel.
This commit fixes this issue
Task-ID 2171436
closesodoo/odoo#43165
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
d06e67e748 introduces tools to use owl
renderer in a view. However, this owl renderer is never destroyed.
This commit fixes this issue.
Task-ID 2171436
order_lines_layouted() can not work due to layout_category_id no longer existing
closesodoo/odoo#43118
X-original-commit: de7a717b195f93f94a9794029eb10b2fa92c8701
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Purpose
=======
If check company is set on a field and if the user has no access
right to the field value (example: address_id on an expense sheet
could be set to a private res.partner, on an onchange method when
setting the employee), then the check_company mechanism will
raise an AccessError when trying the validate the companies on
the different records.
Specification
=============
As we only wish to validate the new record values and not the
access rights, the validation could be done as a superuser to
avoid unecessary errors.
closesodoo/odoo#43240
Taskid: 2170006
X-original-commit: 37a9b6c63dcbc268013fbe1a890cf9390eb8e223
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Issue
- Install eCommerce
- Select Zap theme
- Go on a product in the shop
The quantity is hidden behind the buttons
The quantity height is not the same than the buttons
Cause
By default, there is a max width of 125px on the div containing
the buttons and the quantity label. As this theme increase the
button size, the quantity is hidden.
The quantity label has `.form-control` class who override
his height, so it's not using flex anymore.
More details from QSM in design-themes closed PR #199:
Bootstrap is not correct about input-group form-control height
-> bootstrap_review.scss fix for the height of input-group
form-controls
Our max-width on css_quantity is not right, it should be a
max-width on the internal input
Solution
Restore the initial height in bootstrap_review for input-group form
control
Set the max-width only on the internal input.
OPW-2166311
closesodoo/odoo#43099
X-original-commit: 81e06ec43fdf90758556a654cedd75001ff654c1
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
Before this commit, chatter without messages did not display
attachment counter, even though attachments could be uploaded from
attachment box.
This commit now displays the attachment counter in this case.
Task-Id 2149348
closesodoo/odoo#42672
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In the SSF, o2m updates get initialized with no values (1, id,
{}). The record data is only fetched when the "record" gets updated
explicitly from which updates will hopefully get properly tracked &
saved.
However if the "record" was first initialized through an onchange
values which are updated by the onchange (diverging from the db) those
would not get tracked and thus wouldn't get saved when the record is
saved.
* use more specific placeholder (None) for "o2m records to update but
we don't have values yet"
* once we have values, always store them as an update-tracking dict
* if we don't have values yet for an o2m and an onchange is trying to
write to it, initialize with values from database first (might
eventually be a good idea to initialize upfront though there's the
question of what happens for default values and recursive views)
* mark anything coming back from the onchange and differing from local
values as changed (so they get sent out on save)
* properly reify parent values for onchange instead of sending them
as-is
* the evaluation context for contexts (and domains) needs properly
formatted values so use `_values_to_save` to get them, however it
cares about neither required-ing nor filtering out e.g. unmodified
fields, therefore add an awful toggle to handle this
Task 2150302
Probably todo in the future:
* better UI for change-tracking dict, should have "snapshot"
support (to freeze / discard previous changes)
* cleanup save, it's unclear that it properly resets the form
closesodoo/odoo#43235
X-original-commit: 6c99fe3ffec3aeb8d210e3b943ccef81d62d44ce
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Open Employees>[DEMO]. Go to HR Settings and generate badge id
Now go to POS Settings, enable "Login with Employees". Now open
the session and login by scanning the [DEMO] employee badge.
The badge will not be recognized, this is caused by the fact that the
badge is 8 digits randomly generated, while the parser recognize
cashiers only if the barcode has a prefix of 041.
Fixed the badge id generation, and adjusted the length to other barcodes
in the system
opw-2151942
closesodoo/odoo#43228
X-original-commit: 90bcda64ba6058169b48ff8214e7c2a98eb9a0f8
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>