When the user do not set a company on a route and check warehouse selectable
then it's impossible to select a warehouse. It happens due to the
check_company domain ['|', ('company_id', '=', company_id)('company_id','=',False)]
closesodoo/odoo#37404
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Initial spec was to add month after activity name in the kanban
journal view. However this does not work when tax period is quarter
and also the month is always displayed even on other activities which
we don't want.
Reverting this commit and another task will come later to improve the
display on the journal kanban activities.
closesodoo/odoo#37277
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
- Multi-company: Fix domains on wizard / company.
- Multi-currency: Manage multi-currency when generating accrual lines.
- Moves creation: Avoid creating too much moves:
[1-2] moves was created per line before this commit.
[1-2] moves are created per invoice with this commit.
- Invoice type: Allow accrual only one posted journal entries.
closesodoo/odoo#37487
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Add a hook inside mail_thread to be able to get a custom message at
the record creation.
Override this hook in account.move to get a custom creation message
dependent of the move's type.
closesodoo/odoo#37474
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Planning workorder will generate workorder lines according to reservation
If some lines are already created into the workorder for the current product,
The line generation will increase the quantity of the existing one instead of creating
a new one. The issue occurs when the production have some stock move with the same
product.
This commit change the condition to find workorder line candidate. Instead of searching
line with same product, we now search line with same stock move.
closesodoo/odoo#37419
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit changes the behavior of the 'Back to edit mode' button in the customer portal preview of sales order.
If the sales order is a rental order, the user is sent back to the Rental app. If not, the button makes him return to the Sale app.
This doesn't take into account the app in which the order was opened: if a rental order was opened in the Sale app, the portal will send the user back to the Rental app.
task-2071281
closesodoo/odoo#37423
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Create a simple subclass of AbstractAction (a client action), with
property hasControlPanel set to true. By default, the name of the
action should be displayed in the breadcrumb. Before this rev.,
it wasn't the case, as it displayed 'Unnamed' instead.
Bug spotted when doing an exercice for the JS smartclass.
closesodoo/odoo#37465
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
When having a long systray (icons from different apps, mode debug,
multi-company...) the resize of the window can trigger a crash for apps
that have not too much top-level menus (e.g. Contacts).
This also happens when loading those apps.
Steps to reproduce (on an iPad, portrait):
* use a Runbot with all modules installed (12.0+)
* activate "debug mode"
* ensure that the menu/systray bar is quite full
* open the "Contacts" app
=> traceback with a "cannot call getBoundingClientRect of undefined"
error
The reason is that the resize's callback iterate over the systray/menu
items to find which one should be folded behind a "more" ("+") menu
item.
Sadly in some cases (combination of screen width, systray size, app's
number of menus) it can lead to a traceback.
This commit ensures that when looping for menu items, we don't try to
reach an non-existing item.
closesodoo/odoo#37327
X-original-commit: odoo/odoo@d7bae03299
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
Because the sub-record values would not necessarily get fetched
ever (whether default or stored), the computation of modifiers might
blow up if it relied on one of the un-fetched un-specified fields.
One such situation is trying to create a partner with child partners
if base_address_city is installed: the module adds a readonly attr
predicated upon the parent_id, without explicitly providing such the
field would be missing from the O2M record's values.
Closes#37176closesodoo/odoo#37452
X-original-commit: 184d1b69eac2b78c72228c81c5c6cf8cc4a56eb4
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
SPECIFICATIONS
In the mail template views, remove the contextual action "Template preview"
from action dropdown. It was a duplicate of smart button in the template
form view and makes no sense in the tree view.
Task ID 2075733
closesodoo/odoo#37425
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- In the portal chatter, when a message was send by sms and failed
the icon was grey. Change it to make it red when there is a failure
(revert by another task).
- In the sms composer wizard, if the sanitized number is wrong,
show 'Raoul Grosbedon (Invalid number)' instead of 'Raoul Grosbedon (False)'.
Task 2075733
Before this commit it was not possible to enrich leads manually as
only a cron enriches leads. It is considered as sub optimal since people
would like to do it manually on some leads and not activate it only for
all leads, using a cron.
After this commit an option is added in CRM settings to choose the type of
enrichment: either manual, either automatic.
In manual mode, a button appears on the lead to enrich if certain conditions
are met (email_adress present, not already enriched,...). It also deactivates
the enrich cron.
In automatic mode, the button on lead is not displayed and the cron is
activated.
A config parameter is defined in CRM as it is requested to be able to configure
it directly in CRM without having to first install the app then configure
it. A post install hook to synchronize cron status with config parameter
is therefore required.
FP/AJU request
Task 2075817
closesodoo/odoo#37367
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
*: hr_expense, project
Adding required domain which will allow to only select analytic accounts whose
company is same as current one or blank.
task-1966016
closes odoo/odoo#37450
Closes: #34270
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
- When trying to access an image that need to be resized and cropped,
the code could crashes.
This is due to the fact that PIL expect to work with integer for
sizes, but in some cases we provide floats
closesodoo/odoo#37442
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
From Website (Frontend) --> From the Courses --> From a course (with settings course : Course type = "Documentation" & Forum mentioned):
The tab for the forum isn't there
From Website (Frontend) --> From the Courses --> From a course (with settings course : Course type = "Documentation" & "Allow rating on Course" disabled):
The tab for the review is always there
From Website (Frontend) --> From the Forum --> From a course (with settings course : Course type = "Documentation" & "Allow rating on Course" activivated):
Click the tab for the review, the returned view is the course tab and not the review tab
From Website (Frontend) --> From the Forum --> From a course (with settings course : "Allow rating on Course" disabled):
The tab for the review is always there
closesodoo/odoo#37436
Task-id: 2074030
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
If we have a content such as:
`aaa <B>bbb</B> ccc`
and you eg. change size of `a bbb c`, the c gets bold because of an
issue in the merging after style is applied.
reason: we check that the style was same as previous nodes, but because
walkpoints text[a]->B->text[bbb]->B->text[c] is expurged of duplicates
it becomes text[a]->B->text[bbb]->text[c] so we erroneoulsy think that
the node before text[c] is text[bbb] (instead of B tag)
note: 12.5 forward-port (skipping [12.3,12.4]) of 11.0 #37254 (also
contain #37345)
opw-2071930
closes#37295
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before this commit, there are no hooks when dragging a field over an
editable listview. This was caused by wrong computation of column
width in studio mode.
This commit isolate the computation of column width, so that studio
can override it and make the correct computation.
Task-Id 2057829
closesodoo/odoo#36959
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
This commit applies multiples things:
- Fix PLS settings that were not loaded correctly (was not using technical field names)
- Add data for PLS settings to check all optional fields and set the start date.
- Set date pls field required
- use null value instead of empty for phone and email state fields to lessen the DB storage
- Remove Flanker that crashes anyway while validating a simple email address.
- Handle stage_id = False
- Remove default value for lead probability -> To let Bayes makes the magic.
- Set default pls date to today - 8 days to include all demo data.
- Set won should give 100% predicted probability
See sub commits for more details.
Task ID:2044539
closesodoo/odoo#37413
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
when runnning the PLS cron, only the automated probability was updated
with the new values.
But dissociating probability and automated probability
(for the leads that were in auto mode), breaks the autom mode and set
implicitelly the mode to manual.
(as probability and automated_probability are not equal anymore).
This commit update also the probability only in the case both fields were equal before
the cron process.
Task ID: 2044539
PR #37413
When there are only few leads, marking a lead as won or lost changes
a lot the won/lost repartition. For onboarding purpose, the cron is launched
if the threshold PLS config param is not reached.
When the number of lead in the database reaches the PLS threshold,
the config parameter is set to 0 to avoid the useless check
of the number of lead in the dabase in the future
Task ID: 2044539
PR #37413
Since the default value of probability is not set anymore,
the probability of a new lead is equivalent to 0.
In Lead enrichement, we filter out won and lost leads.
But probability = 0 is not a good ways anymore to filter out lost leads.
Lost reprensents archived leads.
Task ID: 2044539
PR #37413
If the stage is set to won, automated probability should = 100%
Without forcing it, it should be the case as all lead at stage won
have been won. (thanks Captain Obvious!)
But if a user mark as lost a lead that is at won stage, it will reduce the
probability of the won stage.
Also, if the cron didn't run recently, it could be that the autmomated probability
will give the same result than in previous stage (if no lead have been won at all).
Task ID: 2044539
PR #37413
This commit
- removes probability default value in order to activate
Bayes predictive lead scoring by default
- set the default pls start date to today - 8 days
to include all demo data in PLS computation
Task ID: 2044539
PR #37413
Since it appears that email validation feature from Flanker v0.9.0
is completelly broken (the lib explodes when calling
address.validate_address('some@address.xxx')), Flanker is then removed
and email validation will be done only using the email_normalize method.
Task ID: 2044539
PR #37413
This commit applies multiples things:
- Fix PLS settings that were not loaded correctly (was not using technical field names)
- Add data for PLS settings to check all optional fields and set the start date.
- use null value instead of empty for phone and email state fields to lessen the DB storage
- set pls start date required
Task ID: 2044539
PR #37413
This commit adds two buttons on the link.tracker tree view:
- Visit Page : Redirects the user to the visited page
- Statistics : Redirects to the page statistics
(with the '+' at the end of the shortened url)
In this commit we also add some padding to the graph of the page statistics
LINKS
closes odoo/odoo#37378
Taskid: 2075858
Pr: #37344
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adds support for the parameter 'add_direction' on the '_format_time_ago' method
from tools.
This will allow formatting to '25 minutes' instead of '25 minutes ago'.
Preparation commit for the social 'feedback' task.
Task#2075858
PURPOSE
Sending SMS is sometimes required as an immediate marketing tool.
Using delayed crons is not always the best user choice. Implement a
Send Now mechanism in batch SMS.
Allow people to edit sms templates. Limit that rights to some main
application managers.
Provide some fiximps on sms dependent applications.
SPECIFICATIONS
Allow to send directly SMS when doing SMS marketing
SMS Application
* in sms composer, in mass mode: rename Send SMS to Put in queue and
add a Send Now button by-passing the queue;
* set Put in queue as primary, Send Now as secondary;
SMS Marketing Application
* in mailing view for SMS: rename Send SMS to Put in queue and
add a Send Now button by-passing the queue;
* set Put in queue as primary, Send Now as secondary;
Tests of SMS marketing with 400 contacts to SMS indicates it takes about
10 secondes to be completed with is considered as viable.
SMS Template access rights
GROUP-------------R-W-C-D-Note
Internal User-----X
Admin / Settings--X-X-X-X
Stock Manager-----X-X-X-stock.picking
Sales Manager-----X-X-X-crm.lead, res.partner
Event Manager-----X-X-X-event.registration
Sub Manager-------X-X-X-sale.subscription, res.partner
MarkAut Manager---X-X-X-no limit
Account Manager---X-X-X-res.partner (followup)
Other groups
* Online Appointment NO TEMPLATE USED
* Accounting Manager NO TEMPLATE USED
* SMS Marketing NO TEMPLATE USED
* Studio Automated Action Need Technical Settings Anyway
* Scheduled Actions Need Technical Settings Anyway
* Server Action Need Technical Settings Anyway
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR odoo/odoo#37298
PR odoo/enterprise#5750
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Failed SMS should stay in error state and not be sent to IAP as we already
know it will fail. No pain, no gain.
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
PURPOSE
Allow people to edit sms templates. Limit that rights to some main
application managers.
SPECIFICATIONS
SMS Template access rights
GROUP-------------R-W-C-D-Note
Internal User-----X
Admin / Settings--X-X-X-X
Stock Manager-----X-X-X-stock.picking
Sales Manager-----X-X-X-crm.lead, res.partner
Event Manager-----X-X-X-event.registration
Sub Manager-------X-X-X-sale.subscription, res.partner
MarkAut Manager---X-X-X-no limit
Account Manager---X-X-X-res.partner (followup)
Other groups
* Online Appointment NO TEMPLATE USED
* Accounting Manager NO TEMPLATE USED
* SMS Marketing NO TEMPLATE USED
* Studio Automated Action Need Technical Settings Anyway
* Scheduled Actions Need Technical Settings Anyway
* Server Action Need Technical Settings Anyway
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
PURPOSE
Allow people to edit sms templates. Limit that rights to some main
application managers.
SPECIFICATIONS
SMS Template access rights
GROUP-------------R-W-C-D-Note
Internal User-----X
Admin / Settings--X-X-X-X
Stock Manager-----X-X-X-stock.picking
Sales Manager-----X-X-X-crm.lead, res.partner
Event Manager-----X-X-X-event.registration
Sub Manager-------X-X-X-sale.subscription, res.partner
MarkAut Manager---X-X-X-no limit
Account Manager---X-X-X-res.partner (followup)
Other groups
* Online Appointment NO TEMPLATE USED
* Accounting Manager NO TEMPLATE USED
* SMS Marketing NO TEMPLATE USED
* Studio Automated Action Need Technical Settings Anyway
* Scheduled Actions Need Technical Settings Anyway
* Server Action Need Technical Settings Anyway
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
PURPOSE
Allow people to edit sms templates. Limit that rights to some main
application managers.
SPECIFICATIONS
SMS Template access rights
GROUP-------------R-W-C-D-Note
Internal User-----X
Admin / Settings--X-X-X-X
Stock Manager-----X-X-X-stock.picking
Sales Manager-----X-X-X-crm.lead, res.partner
Event Manager-----X-X-X-event.registration
Sub Manager-------X-X-X-sale.subscription, res.partner
MarkAut Manager---X-X-X-no limit
Account Manager---X-X-X-res.partner (followup)
Other groups
* Online Appointment NO TEMPLATE USED
* Accounting Manager NO TEMPLATE USED
* SMS Marketing NO TEMPLATE USED
* Studio Automated Action Need Technical Settings Anyway
* Scheduled Actions Need Technical Settings Anyway
* Server Action Need Technical Settings Anyway
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
PURPOSE
Allow people to edit sms templates. Limit that rights to some main
application managers.
SPECIFICATIONS
SMS Template access rights
GROUP-------------R-W-C-D-Note
Internal User-----X
Admin / Settings--X-X-X-X
Stock Manager-----X-X-X-stock.picking
Sales Manager-----X-X-X-crm.lead, res.partner
Event Manager-----X-X-X-event.registration
Sub Manager-------X-X-X-sale.subscription, res.partner
MarkAut Manager---X-X-X-no limit
Account Manager---X-X-X-res.partner (followup)
Other groups
* Online Appointment NO TEMPLATE USED
* Accounting Manager NO TEMPLATE USED
* SMS Marketing NO TEMPLATE USED
* Studio Automated Action Need Technical Settings Anyway
* Scheduled Actions Need Technical Settings Anyway
* Server Action Need Technical Settings Anyway
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
Retry was not working for SMS marketing as it was actually not really
implemented. It now correctly unlinks failed sms and traces and reschedule
the mailing accordingly
It is also possible now to force send while being in queue mode to avoid
having to switch too much between states.
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
PURPOSE
Sending SMS is sometimes required as an immediate marketing tool.
Using delayed crons is not always the best user choice. Implement a
Send Now mechanism in batch SMS.
SPECIFICATIONS
Allow to send directly SMS when doing SMS marketing
SMS Application
* in sms composer, in mass mode: rename Send SMS to Put in queue and
add a Send Now button by-passing the queue;
* set Put in queue as primary, Send Now as secondary;
SMS Marketing Application
* in mailing view for SMS: rename Send SMS to Put in queue and
add a Send Now button by-passing the queue;
* set Put in queue as primary, Send Now as secondary;
Tests of SMS marketing with 400 contacts to SMS indicates it takes about
10 seconds to be completed which is considered as ok.
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
Sending void SMS marketing is not considered as a valid use case, more
something we should prevent as each sent SMS consumes credits. Required
is put in view as we have to support void sms body for mail mailings.
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
There is no need to keep traces when unlinking mailings, being mail or sms.
Indeed even with marketing automation unlinking mailings means traces will
be lost and won't serve any statistics or reporting purpose anymore.
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
Batch of 10 text messages was ok for testing. Production environment should
be able to handle more of them.
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
Purpose of this commit is to have recipients of an incoming email being
present only once in recipients / to. Indeed there is no need to have
duplicate entries, for example if Delivered-To is set with same content
of To.
Followup of 7b79045fab .
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
Steps to reproduce:
1) Enter a vat number in a customer field (for exemple Sales Order)
2) Click on the suggestion
=> Traceback
Task-ID 2059940
closesodoo/odoo#37180
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
assertRaise do not rollback and continue with a broken cursor
which could cause problem during the remaining part of the test.
closesodoo/odoo#37421
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
1/ Write a form view with a o2m field that has its own inline tree view
(no other view exist in db for the target model)
2/ Open that view in a mobile environment
3/ Instead of having a list view, you get a kanban view. No luck for
you, since the default kanban generated by `models.py` is an empty one,
your records are *invisible* \o/
From what I can tell, the previous condition made no sense:
```
if (there is a list view and a kanban view) <-- this seems absurd
then (use the list mode)
elif (there is no list view but a kanban view)
then (use the kanban mode)
else (use both modes)
```
The first condition seems absurd: it *actively* ignores a kanban view
if there is one. Even better, the list view whose existence it checks
is never there: it checks for a `tree` when it should be checking for a
`list`. In short, the first condition was *never* met, and you ended up
either with exclusive kanban mode or with both modes - even if you had
no existing kanban view for the target model...
This commit moves the normalization of `tree` into `list` before
attempting to process the x2many field's subviews. It clarify the usage
of `tree` vs `list` (cf. only use `list`) which prevents weird edge
cases like described above.
closesodoo/odoo#36237
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
Co-authored-by: Pierre Paridans <app@odoo.com>