The fields `analytic_tag_ids` and `second_analytic_tag_ids` on model
'account.reconcile.model' were accidentally using the same table and columns,
because of the automatic generation of the table name. Make them explicitly
use distinct table names.
closesodoo/odoo#29376
* portal
In our default theme, when hovering links (or .btn-link elements), the
text is underlined. This effect is however not desired for links which
contain only an icon, especially in the forum.
This commit removes that underline effect for all icon buttons in the
frontend (at least by default, this is a theme choice). Icon buttons are
defined as link or .btn-link elements which directly use the "fa" class
on them.
This commit also solves the flag button of the forum which did not have
any effect because of bad bootstrap use.
closesodoo/odoo#29434
In some cases, the web client may receive a search view with invisible
filters. This is due to the way field_view_get works. For
example, if there is a group on a filter, then this will be transformed
into an invisible attribute.
In that case, the search view should simply ignore the filter and not
display it. This was broken in the recent control panel refactoring
(note that the search view lacked the possibility of testing that kind
of situation).
closesodoo/odoo#29430
When sending a message through the chatter, the user context (including
the language) is not sent to the server. This causes issues to render
the mail templates in the appropriate language.
closesodoo/odoo#29422
Some product template with attributes never have variants because
the attributes have the field 'create_variant' set to 'no_variant'
So "Tuple index out of range" was raised due to these kind of products.
opw:1911962
closesodoo/odoo#29428
With the recent control panel refactoring, abstract actions had to be
adapted. The base import action is actually quite
complicated, it relies on introspection and is fragile. With this
commit, I attempt to make it work again. The main issue is that now,
the root of the abstractaction is a div, which contains the root of the
content template, so most of the code was assuming that the $el of the
import action was the form tag, and not a parent.
Note that there are no meaningful tests for import actions, because
testing iframes are tricky.
closesodoo/odoo#29421
The recent refactoring of the control panel moved the sidebar management
from the action manager to the view itself. However, the sidebar
parameter was forgotten, which resulted in the fact that it was no
longer created.
This fix was a little tricky, because the sidebar needs to be
instantiated in some tests, but not in most of them (in particular, the
document application changes its behaviour, which is annoying).
closesodoo/odoo#29389
Commit 5804246e0f introduced some improvements to speed up performances.
One of them was to check if a customize_show view was active or not but the
condition was on view.customize_show instead of view.active.
Thus, as that view is always a customize_show, the condition would always be
met.
closesodoo/odoo#29414
There was a traceback when reloading the webclient with an act_window and an
empty id in the URL (ex: after saving Settings). A `read` without id was
peformed when loading data instead of a `default_get`.
Before rev. odoo/odoo@40dd121 the action environment was generated by the
ActionManagerActWindow, which was currently defaulting the `currentId`.
Now that this is not the case anymore, the `loadState` should have this responsability.
Task 1902826
closesodoo/odoo#29411
Task 1889687 adds the activity view to Studio>Views, the view is represented by
icon fa-clock-o. Task 1894990 was supposed, among other things, to change the
current activity view icon (fa-th) to fa-clock-o. Since this task was not merged
it creates an inconsistency between the 'view switcher' and Studio.
Task 1902826
closesodoo/odoo#29392
The visibility condition of the Matching group on account move line
was not compatible with the visibility condition of the
"View partially reconciled" button. So the group being hidden was
hiding the button that should overwise have been visible.
closes#32043closes#32216
opw:1961210
closesodoo/odoo#32371
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Usecase to reproduce:
- Set manufacture step to 2 or 3 steps
- Create a MO
- Go on the PC picking and validate some quantities w/h BO
Traceback because there is no documents to log the activity.
It happens because the function used in groupby and sorted
(in the method _log_less_quantities_than_expected) expect a picking.
The purpose of _log_less_quantities_than_expected is to generate
an activity on the next picking in order to notify that some quantities
will be missing due to the cancelation of the back order. In order
to find the following picking it uses the destination moves from the
current's picking moves.
Picking w/h BO Next Picking (activity to post)
| |
moves -----------> destination moves
However in the case of 'pick components' picking type(PC) the destination
moves are linked to a manufacturing order and not a picking. So it
_log_activity_get_documents return an empty parent since picking_id is
False.
In order to fix it, _log_activity_get_documents only add the tuple
(object where the activity should be log, responsible for the activity)
if the object is not False. It also add a hook in order to add
(mo_id, repsonsible) during _log_less_quantities_than_expected on top
of (picking_id, repsonsible) in order to log activity on MO directly
linked to PC.
This commit also add a missing precision_rounding in backorder
confirmation
opw-1908753
closesodoo/odoo#29385
Since multi-website 4f6ec1cd2a, `website_published` became a computed field
and `is_published` was introduced for storing the old `website_published` value
Still, old SQL select was trying to read `website_published` instead of
`is_published`.
Step to reproduce:
- Create a Membership Product
- Create a Membership Customer
- Add the Membership to the Customer (Buy Membership)
- Publish the Customer
- Go to /members, it will error 500
closesodoo/odoo#29412
Steps to reproduce the bug:
- Create a payment acquier PA with no journal
- Click on "Set payments" on your website dashboard
- On the wizard, choose "Custom payment instructions"
and select PA as Method
- Set a new bank name and a new account number
- Click on "Apply"
Bug:
A traceback was raised because no journal was set on PA.
opw:1916418
closesodoo/odoo#29378
- Create a RFQ
- Send it to the customer
The email sent contains a 'View Purchase Order' button instead of 'View
Request for Quotation'.
We make use of the previous commit to correct the issue.
opw-1915230
Allow to specify the `model_description` when sending an email to take
into account for cases where the same model is used for different
business concepts.
opw-1915230
- Create a PO for a French customer
- Send by email
The body of the email is in French, but some parts (such as the View
button or the footer) are not translated.
The body is translated following the field `lang` of the email template,
in this case `${object.partner_id.lang}`. This is done when opening the
mail composer (so the message appears in French). However, other parts
are rendered only when sending: at this point, the language to be used
in the template is lost forever in the darkness.
To avoid this, we keep a specific context key `custom_layout_lang` that
we retrieve when rendering the custom layout.
opw-1908420
Do not use the model `_description` field which cannot be translated. Use
the `display_name` of the corresponding model instead.
Moreover, `<t t-esc="'%s' % model_description or 'document'"/>` gives
`'None'`, while `'document'` is expected.
This adds a query to some tests, which is expected since `display_name`
requires information stored in the DB, while `_description` is defined
at the Python level.
opw-1908420
This is basically a backport of revision
47479401cb
to gain the performance on the project
percentage satisaction computation
but without introducing the new parent mixin,
which would not be a stable change.
closesodoo/odoo#29354
The correct way to trigger a recomputation of a field is not
to call directly the compute method. The ORM offers mecanism
to do it: we have to flag the field as "recompute to do" and
then call `recompute` method (availble on every models). This
one will call the recompute method of all fields marked as
"to recompute".
This will optimize the performance by doing recomputation in
batch.
Task-1903565
- The `_write` override on `sale.order` create a Next Activity for the
SO's salesperson when changing the SO `invoice_status` to upselling.
If the SO doesn't have a salesperson this code crashes since `user_id`
is required on Next Activities.
To avoid this crash we create the Next Activity only if a salesperson
is set on the SO.
OPW-1914087
Since 4cd379cf6e the ControlPanel is now a child of the viewController.
This breaks the clickEveryWhere test.
With this commit, the view_controller selector is adapted in the clickEverywhere
test.
closesodoo/odoo#29383
The tour shop_sale_coupon was changed to use the testUtils.dom.click
method when we introduced the new test utility functions. Probably
because the filename ends with 'test.js'. Obviously, this is not
correct, because the testUtils function is not imported.
To prevent issues in the future, we simply remove the two problematic
calls. Another solution was to import the testUtils module, however, I
think that it is simpler not to use those functions at all in tours,
because tours can be executed in the web client/website, and in that
case, they do not have access to the test utility functions.
closesodoo/enterprise#3239
The definition of `attachment_ids` on model `email_template.preview` is wrong,
because its table/columns refer to the model `mail.template`. As the field is
only used to preview a result in a wizard form, it does not need to be stored.
closesodoo/odoo#29349
Better split of invoice_validate() and action_move_create() functions: the later now only deals with the account.move creation while the former assigns missing values (dates) and gets its number. The move now always receives its name from the invoice, which means there's no need anymore of the 'invoice' arg in account.move post() method.
We now also put the origin of the invoice in the move ref, in order to allow searching on that reference in the bank statement reconciliation widget.
closesodoo/odoo#29343
Purpose of this commit is to clean a bit the test mode of surveys before
working a bit on ACLs and survey access. Currently when taking a survey
with a magic 'phantom' token it generates a test answer allowing to go
through the survey process. However it has several drawbacks :
* 'phantom' is not a real token. Token parameter should be used only for
real tokens and avoid having corner case when managing simple parameter;
* token should only be used to ensure people have been granted access to
answering surveys;
* it is currently available for every users;
* it is pure unwanted magic;
In this commit we add a separate route for testing surveys that create the
test answer and then redirects to the survey with this answer. It is now
also limited to survey managers or survey officers testing their own surveys.
Survey JS tour now uses the standard URL and not the testing one. Indeed as
testing is now limited to survey officers and managers tour should test
real life use cases.
This commit is linked to task ID 1916034 and PR #29339.
Purpose
=======
Survey assets were incorrectly overridden in the website_survey module and all copy/pasted.
This will correctly include the survey_assets template and get rid of these copy/pasted
assets references, while keeping the website style on survey pages.
Task: #1915790closes#29314
This branch introduces a large-scale reorganization of the
component tree generated by the web client. The short version is
that now, the control panel is a child of the view controller and
no longer a sibling. Graphically (and simplified), we go from
this:
webClient
/ | \
... ... actionManager
/ \
controlPanel viewController
/ \
to this:
webClient
/ | \
... ... actionManager
|
viewController
/ | \
ControlPanelController
/ \
CPRenderer CPModel
The motivation is that this work moves the code where it should be.
Before this commit, it was kind of weird to have code in the
controllers to render buttons outside of their root node (in
renderButtons). Also, the action manager had to take care of
coordinating search view states between view transitions.
So, this work simplifies the code. It also makes it easier to
extend. We see day after day that Odoo needs to take care of more
complex UI needs, and in many cases, these needs were quite
difficult to implement (we prefer spaghettis in our plates, not in
our code). The changes in this branch should open the way to
implement these features.
For example,
- it will now be easy to add the possibility of views (for example,
the search view or a new ControlPanel view) to add custom buttons
(of type action or object) in the control panel.
- Another need will be to serialize/ restore the state of the
search view across action boundaries (needed by the dashboard).
- Another example is the possibility for views to customize easily
the presence/absence of sub menus (filters/groupbys/favorites/
time range/...)
- Another need is an easier way for views/client action to customize
their control panel.
This commit also contains a large rewrite of the search view (so it
is more inline with our architecture and easier to maintain).
Part of task 1893568
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#29106
=========
PURPOSE
=========
{Any employee can work on a PoS session, even if he has no user. This decreases the cost of PoS App.}
We are not competitive enough on the PoS Market because customers have to pay one user per cashier while they expect to pay one user per cash station.
===============
SPECIFICATIONS
===============
pos.config
- Add a checkbox : "Login with Employees"
- If set to TRUE, an "Allowed Employees" many2many appear
- If employees many2many is empty, all employees can log on this PoS
- If set to FALSE, can only log in with the currently logged user
hr.employee
- The barcode and pin fields were be moved to the hr.employee
- Set a barcode (not pin) by default at the creation of any employee
- No Employees module with PoS > dependency to hr
Open the PoS if "Log in with Employees" = FALSE
- Same behaviour than now, when I open the PoS, I'm logged in with the current user and can start working at once. The only difference is that it is not possible to switch users anymore.
- The button to close the session is visible
Open he PoS if "Log in with Employees" = TRUE
- When I open the PoS, the first screen I see is the login screen.
(a) I choose my employee and enter my pin code (if there is pin code on my employee, otherwise not required) (I can only see employees that have access to that PoS)
(b) I scan my barcode
(c) I scan my rfid card (future development)
- When I click on the employee name, I can log in with another employee
- If the employee is linked to a user that has the pos user/manager access right, I can see the button the close the session. Otherwise I cannot close the session (and thus cannot access backend).
- Add field employee on all records created by PoS (and replace the field user by that one) (on pos.orders)
Lock Screen
- Improve the PoS Interface
- Add a new feature to allow to "lock" the session. When a session has been locked, the user/employee has to re-log-in to access the PoS
- When I try to re-log-in, by default suggest the last employee logged in in the login screen
Migration
Plan a migration strategy > barcode and pin is now on the employee and not on the user anymore
closesodoo/odoo#28567
This commit adapts the code for the 'Add to Google Spreadsheet'
entry in the Favorites menu, according to the large refactoring of
the SearchView/ControlPanelView in web.
Part of task 1893568