Purpose of this merge is to polish a bit this module before turning
it into "courses" (see task #1902304 for more details on this)
Contains
* split python model into separate main files to ease models understanding;
* split views into separate main files to ease views finding;
* rename files according to guidelines;
* merge templates in the same file to have all available at hand;
* move assets in their own file in order to remove noise from templates;
* Split javascript widgets into their own separate files
No functional behavior change should occur with this commit. Only move
has been performed.
Note that we might lose part of the history as splitting files creates a new
history for new files.
Task: #1909281Closes: #28679
Purpose : Ease navigation in default screens of Sales app to better onboard new
users and fix various issues in the views.
- onboarding tour : fix "quotations" filter and tooltip appearance
- config bar :
-remove "Default incoterm" field in "company info" form and move it in
"invoicing" settings.
- improve "document layout" form design, set "paper format" as required
field and add a "preview" button
- rename FieldReportLayout "Preview" link and put standard report layout (the default one in odoo) as first image
- fix small design issue in widget
- "done" button design
- customer form :
- improve address type tooltip
- various changes in "accounting" and "sales & purchases" tabs (stat button, fields reorganizing)
- product form : fix "re-invoice policy" field hazardous hiding behavior and improve field appearance
- customer portal :
- reorganize fields in "customer details" view
- minor changes in "quotation" view
- Correct "sales order" model description
This merge is related to task ID 1892500 .
closesodoo/odoo#28254
When using the HttpCase browser_js method, the window size is fixed to
1366x768.
With this commit, the default window size is still '1366x768' but a test
class that inherits from HttpCase may change it to test mobile layout
by changing the browser_size class attribute.
The browser is instanciated once per test class, for that reason the
window size cannot be changed in the class methods.
To use different sizes in tests, the tests have to be splitted in
classes.
closesodoo/odoo#28760
Improve various design elements in sales onboarding and config bar :
Onboarding :
- tooltip and done button
Company info:
- Move the incoterm field from company view to account settings.
Document layout:
- layout widget relabelling and reorganizing
- paper format as required
- added a Preview button
Payment methods and sample quotation :
- Style and relabelling
Various ux improvements in the product and contact form views :
Contact :
- hide/reveal fields according to customer/supplier status and
reorganize
- fields moved to stat buttons
- addresses : tooltip and relabelling
Product:
- Fix re-expense policy (dis-)appearance and fields style
- Change API provider to prevent invalid API calls
- Move geo_find methods into base.geocoder object to ease inheritance
- Add system parameter to allow use of another provider
fixes #x26924
fixes #x6929
Fine tuning of this commit:https://github.com/odoo/odoo/commit/7501691da9a9dae832b7d6e78c6a5f57fc983b5c
Fields signup_token, signup_type, signup_expiration are protected
When sending a quotation (mail template 'Sales Order - Send by Email'):
the token needs to be read (and sometimes written)
opw:1907157
Before this commit:
1. If a view A is being inherited by a view B and C and the view C is doing an
xpath on B (but inherit A), then copying the tree to make it specific would
crash.
Indeed, when copying C, the view inheritance check (while doing the xml
check) would break since C would be tested against the generic tree and not
the new specific tree.
2. If a generic view being written with a website_id in the context had already
a specific child, we would copy both its specific child and generic child
for the same key instead of simply copying the specific one.
This happens if we triggered previously a COW on a child view, then only
that view had been made specific (and is still in the generic tree).
Then, when cloning the parent, we need to copy and make specific all the
hierarchy but ignore the generic elements if they already have a specific
one.
Now:
1. Fixed with adding the inherit_id on the copy vals
2. Fixed with filtering children_ids with filter_duplicate() before cloning the
children tree
opw-1908308
Closes#27914closesodoo/odoo#28405
Purpose of this merge is to polish a bit this old module before working
on it. Contains
* split python model into separate main files to ease models understanding;
* split views into separate main files to ease views finding;
* rename files according to guidelines;
* move data lost in views to data files (server action notably);
* merge templates in the same file to have all available at hand;
* move assets in their own file in order to remove noise from templates;
No functional behavior change should occur with this commit. Only move
has been performed.
Future commits will come that will change and improve the way survey behaves.
Having clean files holding code easier to find will help understanding future
changes.
Note that we might loose part of the history as splitting files creates a new
history for new files. However considering history of survey module that is
untouched since several versions we think the tradeoff is acceptable.
This commit is linked to task ID 1903617 and PR #28166.
Create an invoice for a day, and register a payment right away
BUT choose a date in the future for that payment
Imagine a French Check. You write it, and tell your partner to cash it in
10 days later
You would enter that transaction as a temporary payment
in your own books
OPW 1893646
Before this commit, the line of the partner did not appear in the aged
report after if the report was for the date just after the invoice date
After this commit, it does
closesodoo/odoo#28728
- When computing the count of quotations count and the invoiced amount
on a mass mailing, we do not check if the current user has access to
the models `sale.order` and `account.invoice.report`.
This fix first check the access rights on the models, if the current
user doesn't have read access, then we set the computed value to 0.
closesodoo/odoo#28717
Before this rev., the following scenario didn't work:
Open manufacturing order and click on Produce button (note that
bom product should have Serial number enabled) then add quantity
in Done field in o2m and press Record Production button in wizard,
it will produce UserError and after then if you change Lot number
field in wizard's o2m then the many2one value doesn't get selected.
This occured because the renderer wasn't updated after the RPC fail
and thus still got an outdated version of the state.
The issue raised after commit: 02eef78bbd which was done to remove
useless rpc call, it's OK to remove rpc call but let's keep
updating renderer.
Related to task ID: #1852715
Co-authored-by: Tejas Shahu <tsh@odoo.com>
Programming error introduced by 602807acdf
Steps to reproduce the bug:
- Create an event with category='conference'
- Checked Track Proposals on Website
- Save it
An error was raised saying that the website with the id of the event didn't exist.
Further, with the fix but without a website_id specified, checked Track proposal didn't
add the menu to track proposals on the conference.
opw:1904078
closesodoo/odoo#28688
Revision on https://github.com/odoo/odoo/commit/5f8d3c61bee40d027efc5041cdc4bca5e67c42d7
Before this commit, there was a traceback when you had two needaction
notifications related to the same document.
This is caused by a typo in the commit above: the object `similarItem`
has a property `messageIDs`, but the code wrongly access the property
`messagesIDs` (see the extra "s").
Steps to reproduce:
- Set notification management to 'Handle with Odoo' for Admin
- Demo mention Admin twice on a specific project task
- Admin opens messaging menu
Display error `Cannot read property 'concat' of undefined`
Issue reported on this PR comment: https://github.com/odoo/odoo/pull/28462#pullrequestreview-175001349
Task-ID 1909521
closesodoo/odoo#28703
- If the `internal` field/column on the message subtypes (table: `mail_message_subtype`) is set to null instead of false in the
database, the notifications to the followers are not sent by mail.
closesodoo/odoo#28699
Purpose of this commit is to polish a bit this old module before working
on it. Contains
* split python model into separate main files to ease models understanding;
* split views into separate main files to ease views finding;
* move data lost in views to data files (server action notably);
* merge templates in the same file to have all available at hand;
* move assets in their own file in order to remove noise from templates;
No functional behavior change should occur with this commit. Only move
has been performed.
This commit is linked to task ID 1903617 and PR #28166.
Purpose of this commit is to rename some files before going into some more
work. No split or cleaning is done here, only preparing by doing some pure
renaming.
No functional behavior change should occur with this commit. Only move
has been performed.
This commit is linked to task ID 1903617 and PR #28166.
Some tests were skipped these last months. This is a slippery slope.
The best time to reactivate them is the moment they were skipped, the
next best time to reactivate them is now. So, this is what this commit
does.
Three kinds of tests were skipped:
- 3 password tests
- 2 kanban progress bar tests
- one keyboard navigation test
Password tests
--------------
When the auth_password_policy addon was introduced, two tests in web/
were skipped, because they would fail when the auth_password_policy
addon is installed.
Since then, a commit was done to change the way the password field works
(commit 5bbbd25edf). With this commit,
the password field is no longer an 'include', but a new field widget.
This means that the skipped tests no longer fails.
Kanban progress bar tests:
--------------------------
In saas 11.2, the 'archive all' feature was removed, but it was readded
in saas 11.4. The tests had to be slightly adapted to make sure they
use the proper css selectors.
Keyboard navigation test:
-------------------------
It is now a functional decision not to allow moving from one cell to the
next by using left/right arrow, so this test is no longer valid.
closesodoo/odoo#28685
The previous code made sure we wait for images to be fully loaded before
initializing the auto more menu. But in some cases, it is not enough, we
also have to wait for fonts or even extra scripts. Those will have no
impact on the feature in most cases though, so we will only update the
auto more menu at that time, not wait for it to initialize the feature.
closesodoo/odoo#28684
The auto more menu feature is used to enforce that all items of a menu
stay on one line by adding the ones that would overflow in a dropdown
menu. The feature first need to compute the maximum width the menu can
have. This computation was not correct as it was not considering auto
margins.
This is particularly important with BS4 where all standard menus have
auto margins.
closesodoo/odoo#28683
Usecase to reproduce:
- Install a database with demo date and mrp or purchase
The buy/manufacture rules have a wrong company for warehouses
in company 'My company, Chicago'
It happens because the warehouse is not specify in the create
values. In this case it creates the rules and set the user current
company as default.
This commit specify the company during the create call.
closesodoo/odoo#28682
This commit allows for not copying the currency_field attribute
of a monetary field when the monetary field is related,
and when the currency_field attribute is not explicit
Before this commit, the currency_field attribute on the related monetary
was set as the one on the distant model
After this commit, the currency_field attribute takes the field on the
current model
Though the test may appear like an incoherent use case,
it is on the contrary totally legit, as web_studio allows it
OPW 1903113
closesodoo/odoo#28144
This is related to revision
71f188082f
This is nice to have a meaningful explanation
for the user to understand why his mail is not sent,
this is better to not interrupt the mail queue when doing so.
Because of the above revision,
when the mail queue iterated on a mail failing because
of an ASCII encoding issue,
the mail queue was interrupted,
and on the next cron call it failed again and again
on the same mail, therefore leading to the mail queue
to never be processed.
Fixes#27804
Steps to reproduce the bug:
- Set decimal precision to 7 for products.
- Order 2.000000 of a product.
- Deliver 2.6791200 of the product.
- Go back to the Sales order and change the ordered quantity to 2.6791200.
Bug:
A UserError was raised: "You cannot decrease the ordered quantity below the delivered quantity."
opw:1904580
closesodoo/odoo#28674
commit c6b0d36622 introduced a wrong
domain. The readonly should be added if the show_operations is false
OR state is done AND is_locked is true.
close#28595
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#28603
- Import 2 bank statement lines having acc_number set but no res.partner.bank having this account
number.
- Reconcile the first one with a line: a res.partner.bank is created.
- Reconcile the second one with a line: UserError('Account number must be unique!')
If a recipient has a formatted email address like 'A <a@b.com>', the returned
opt_out list must contain normalized email ('a@b.com') in order to be comparable
during the get_mail_values of the mail.compose.message.
Otherwize, It won't match.
Task ID : 1909314
Closes PR #28667
* web_editor
- Restore the preservation of Odoo text-muted color (the rule became
!important with BS4 and had thus to become !important in the
preservation mixin).
- Preserve base design in the "new content" menu (which now uses
text-muted). Indeed, in some themes, the "new content" links were not
even visible anymore.
closesodoo/odoo#28666
Before this commit, when the user is in a form view (edit mode) and
click on a stat button, a new action is added to the action stack. When
the user then comes back to the form view by clicking on the breadcrumb,
it is supposed to be in readonly mode. Before this commit, this was not
the case.
This bug comes from the action manager refactoring, which removed the
view manager. With this commit, we add a new action lifecycle method
which is called when the action is restored.
Note that this commit implicitely changes the semantic of actions with
'target=inline'. As far as I can tell, this only applies to the settings
form view, which can easily be fixed by overriding the restore hook.
closesodoo/odoo#28663
The use of the `deploy` command always fails because of an incorrect
CSRF token since commit 9bae56acd4. Indeed, the latter
re-introduces the session rotation, i.e. the session ID is changed at
authentication.
Practically, what happens server-side is:
- authentication
- generate CSRF token
- create the response with the token and a change of session ID
At this point, the token generated is not correct anymore since it is
based on the 'old' session ID. Therefore, when it is reused at
uploading, an error is raised.
It is actually possible to simplify the process by performing the
authentication and the file upload in a single request. There is indeed
no real use of extracting the authentication, since the request is then
only used to upload the module.
opw-1902863
closesodoo/odoo#28653
Purpose is to ease understanding of applications / categories and their
links with the access rights labelling.
This commit is related to task 1884968 and PR #29176.
- Harmonize quanity done in stock move header
- Replace product_qty by product_uom_qty the purpose is to stop being
confusing when the user uses UoM. Since for 1 dozen it will show 12
reserved and 1 done because product quantity is in quant UoM not move
UoM.
this commit is related to master bug - 1923213.
closesodoo/odoo#30691
currently, group by is applied forcefully that user cannot change.
this commit will remove forced group by and applied as a default group by that user can change.
Task: 1910855
closesodoo/odoo#29727
Currently, non-trivial client interface customisations generally *have*
to go through client actions (a limited amount can use complex HTML in
the form, but it's not that common). This can require a significant
amount of messing around with JS code, and doesn't integrate well with
the rest of the system (primarily due to the loss of the control panel /
search view).
This change re-uses the existing `ir.ui.view[type=qweb]` as actual views
(bound to a model) to provide for flexible views rendered synchronously
server-side without needing javascript development. A few dynamic
behaviours are also provided (on top of bootstrap's which should be
usable out of the box):
* an extension of `a[type="action"]` which allows for more detailed
crafting of the action (not just accessing an action by id and by model,
method)
* a new `a[type="toggle"]` which provides lazy loading of sub-items
(currently by calling a method which returns HTML to insert after the
loading anchor)
* simple fold/unfold (without lazy loading) can be performed through
bootstrap
closesodoo/odoo#28716