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
This rev. adapts the code of the 'Add to Dashboard' entry of the
Favotires menu, according to the large SearchView refactoring. It
also does some tweaks for the dashboard app due to the move of the
ControlPanel from the ActionManager to the controllers.
Part of task 1893568
according to changes in web.
Some changes have been made to the webclient template (and widget)
in web, and the pos (using the webclient widget as well) needed to
be adapted.
Part of task 1893568
This rev. moves the backbone library from web to pos, as one of its
two usecases (the search view) has just been removed. From now on,
it is only used in the pos.
Part of task 1893568
to ControlPanel/Search view refactoring.
*: mail,sale,web_diagram
The ControlPanel being now inside the DOM of views' controller,
those existing widgets needed to be adapted (in the way they define
if and how they want a ControlPanel, and in the way the manipulate
their DOM as it slightly changed). Tests needed to be adapted as
well.
Part of task 1893568
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
to ControlPanel/Search view refactoring.
The ControlPanel being now inside the DOM of client actions, those
existing widgets needed to be adapted (in the way they define if
and how they want a ControlPanel, and in the way the manipulate
their DOM as it slightly changed). Tests needed to be adapted as
well.
Part of task 1893568
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
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>
This rev. adds a factory class to generate MVC components, to
properly standardize the way MVC components should behave (in the
odoo way). The most popular MVC of the webclient concerns views
(Model, Controller, Renderer, for each view type). However, we
wanted to generalize the notion of MVC (and extract it from the
views), as we will use it in a future commit for the ControlPanel.
Part of task 1893568
Co-authored-by: Aaron Bohy <aab@odoo.com>
Purpose
=======
On a payslip rule computation you can return 3 parameters:
- result_qty
- result_rate
- result
From this, we compute the total amount as following:
tot_rule = amount * qty * rate / 100.0
If we set parameters result_qty=0 or result_rate=0 to force the tot_rule to
be equal to 0, then their values are set to the default one, which is ambiguous.
So
result_qty = 0
result_rate = 0
Become
qty=1
amount=100
We can't fix this in a stable release as this could imply unwanted
behavior changes for customers, and also quite difficult to spot.
closesodoo/odoo#29206
In order to facilitiate the configuration of a livechat on the website,
the first livechat channel that was demo data from im_livechat
is now set as data. Website is now using this first livechat channel
instead of creating a new one and using it.
Merge related to task ID 1912056.
closesodoo/odoo#29020
The first implementation of `documents` was based on `ir_attachment`,
adding fields only useful when the attachment was a document.
This task splits documents in a new model called documents.documents,
and clean the logic accordingly.
This task also recovers the "attachment" action button, to list attachments on a model
without chatter.
related to: odoo/enterprise#3048
task: #1908896closesodoo/odoo#28563
*: hr_recruitment, web, website_sale_digital
This commit replaces the references to 'document' by 'attachment_indexation'
following the rename of the module.
Task #1908896
This commit renames the module document into attachment_indexation
to provide a more descriptive name and avoid confusion with
enterprise's documents module.
task: #1908896
This reverts commit 1dbb555a
Bring the sidebar attachment dropdown feature back.
This feature was removed due to be considered as useless,
but since some models can have attachement without a mail_thread,
this feature is still necessary.
task: #1908896
*: tools, web, website, website_forum, mail, im_livechat
This commit refactors ir_http to make it more readable
and flexible.
Move the resize function of web/image to odoo.tools
Co-authored-by: XavierDo <xdo@odoo.com>
Co-authored-by: Antony Lesuisse <al@openerp.com>
closes: #28563
task: #1908896
Moved the field 'active', 'res_model_name' and 'thumbnail' from
ir.attachment to enterprise's documents.document.
Moved the pdf split feature to enterprise's Documents module.
task: #1908896
This commit adds the seen icon next to a message for all channels
except livechat.
It tracks received and seen messages for all members of the channel.
Icon is either 1 or 2 check(s) ('v' or 'vv').
Those are the different states of this 'seen' icon:
ICON: DESCRIPTION:
no check .................. no one has received the message.
1 check ................... some members have received the
message, no one has seen it.
2 checks (greyed-out) ..... some members have seen the message,
some or everyone has received it
2 checks (green) .......... all members have seen the message
This icon is not shown for messages preceding the last message seen
by everyone, in order to reduce visual noise.
Task-ID 1881001
The utility classes `Timer`, `Timers` and `CCThrottleFunction`
were only used by the feature 'is typing...', thus all those files
were in the same folder.
This commit moves the utility classes in a dedicated folder,
and introduces a folder for thread mixins, in preparation for
future features on threads that will be implemented as mixins.
This commit adds the possibility to customize the name
of a DM conversation. To do so, click on the gear icon
when hovering on a DM in the discuss sidebar.
This feature intentionally removes the access to the
settings of a DM, because the settings view only makes
sense for non-DM conversations.
Task-ID 1881001
Before this commit, when selecting an emoji from the composer,
the emoji was put at the end of the composer content.
With this commit, the selected emoji is now put in the composer
based on the position of the cursor. It also focuses the input
and set the cursor just after the newly inserted emoji.
Task-ID 1881001
With this commit, no push notification is sent to user when
to acknowledge that he just has accepted them. Also, on native
push notifications, the Odoo Bot icon now has a transparent
background.
Task-ID 1881001
Discuss sidebar now has a single category for public and
private channels called "Channels". Private channels are
prefixed with a keylock icon.
Task-ID 1881001
With this commit, the UI for "is typing..." notifications
has changed.
** before **:
In Discuss & chat windows, "is typing..." notification bar
at the bottom of the thread, inside the conversation.
** after **
In chat windows, animated '...' next to conversation name.
In Discuss, animated '...' next to conversation name in sidebar,
and text below the composer.
Task-ID 1881001
Before this commit, when accessing a channel after a page reload,
the list of members in a channel was not known until the composer
on this channel has the focus, either in the Discuss app or in a
chat window.
This was a good-enough condition when information about members
was limited to mention suggestions, which requires having the
focus on the composer. However, with the 'is typing' features
on channels, it requires being aware of the members of the channel
at the moment of the rendering in discuss or in a chat window.
This commit fixes the issue by providing the list of channel
members when retrieving information about the channel.
Without this fix, the 'is typing' notifications could sometimes
not determine the name(s) and email(s) of user(s) typing something.
To avoid having to configure the livechat channel when testing on runbot,
the admin is already set as operator of the livechat channel.
Task ID : 1912056
Closes PR #29020
used to fetch debit & credit recorded in Tax Cash Basis Journal Entries
Main
-
By allowing to change the `amount_mnt` var we will be able to change the
values recorded in Tax Cash Basis Journal Entries, i.e, debit & credit
values.
Explanation
-
We want to keep the `amount` just the way it has been computed because
that is right. We don't want to change that.
Our issue is the`rounded_amt` which is the value that is passed to the
debit and credit downwards.
We have only hooked a new method to allow us later inherit that method
and make our own computations regarding the `rounded_amt` which is the
main subject of this PR and later pass it down to the debit & credit
fields as need for localizations that could be facing the problem of
having the computation of taxes at date of invoicing instead of date of
payment.
`amount` var is used here:
`
'amount_currency': self.amount_currency and
line.currency_id.round(-line.amount_currency * amount / line.balance) or
0.0,`
and we are not intending to change that because the value written to the
`amount_currency` field is right.
What we intend is to compute the values for debit and credit fields
which were computed in this method at invoice date, some l18n need them
at payment date, e.g, l18n_mx.
Be aware
-
Do not be mislead by the fact that `rounded_amt` var is the one taken to
do those computations. It is just a mean to the final goal. Rounding is
not an issue and has never been.
Background
-
By allowing this merge to flow we will be able to address the following issues:
https://github.com/odoo/odoo/issues/25057https://github.com/odoo/odoo/pull/17196https://github.com/odoo/odoo/issues/9972
Final Goal
-
Being able to perform the computation of the debits and credits
according to l10n_mx in odoo/enterprise#3137closesodoo/odoo#28991
The "customer invoice" and "vendor bill" string was untranslated.
Instead of adding a _ call, properly translate it.
No need to try saving bytes by splitting the sentences, this makes it very
difficult to translate in some languages where the order of words are not the
same as English
closesodoo/odoo#29690
f8dad1bb4 added the terms in the .pot with an incorrect syntax in the comment
The pulled translation have this incorrect syntax as well which produces a warning
closesodoo/odoo#29729