This module had been introduced in stable to add a field to store the QR-IBAN in case it differed from the regular account number. We now merge it into the original module and make it so that the only way to define a QR-IBAN is to populate this field (no more magic with account number).
Purpose
=======
Avoid creating / enriching multiple time the same company.
It can occur in many situation; when IAP do not return an email address
the the company, when the domain is blacklisted...
We also want to remove the field "iap_enrich_info" from the res.partner
model because this field can be heavy (JSON field) and the res.partner
model is used a lot.
Technical
=========
For this purpose, we create a new model <res.partner.iap> which will
store the IAP response and the requested domain.
So we can retrieve the previously enriched company regardless of the
partner's values
Task 2466653
See odoo/odoo/pull/68286
See odoo/upgrade/pull/2301
closesodoo/odoo#68286
Related: odoo/upgrade#2301
Related: odoo/enterprise#17426
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- fixes some typos
- adds command parameters which are present when running odo-bin --help
- updates some descriptions, e.g. regarding configuration file and data-dir
closesodoo/odoo#67778
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
In belgian accounting, some tax lines in the tax report must be carried
over to the next period if they are negative.
If the balance for the next period is positive, it will be deduced by
the maximum possible amount that is carried over. If it is negative,
the negative balance will simply be added to the carried over balance.
This process repeats itself from one period to the other endlessly,
until the carried over balance come back to 0.
This is done by putting the carried over balance in dedicated analytic
accounts.
task id #2271978
Prior to this commit:
Once the user clicked on View Task in the "Blocked By" task list, the
Create button in the form view of the targetted task is hidden. Also,
in the subtask notebook the user is not able to create additionnal
subtasks.
Reason:
In the action, the create argument is set to False.
After this commit:
We merge the two action_open_task and action_open_task_form into a
unique one. We remove the create set to false.
Related PR : #66740closesodoo/odoo#68652
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
A few changes to the layout and texts of the "Assets Management" part of
the javascript reference documentation.
closesodoo/odoo#68649
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Prior to this commit:
1) The display_project_id was not set if user created a task from the
form view.
2) The project_id followed the display_project_id once the
parent_id and display_project_id was modified and set to False
Reason:
1) The display_project_id was set to False in the vals and not overriden in
the create method.
2) The project_id always followed the display_project_id if the
display_project_id was modified.
After this commit:
1) The display_project_id follows the project_id if the task has no
parent_id.
The project_id follows the display_project_id if the task has a
display_project_id defined and a parent_id.
2) The display_project_id always follows its project_id if it has no
parent_id
The project_id always follows the display_project_id if set or the
parent_id.project_id if not and is changed only when the
display_project_id is modified.
task-2497080
closesodoo/odoo#68647
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit the darkening area of the Dexter effect is visible
through the rounded corners when the blog post was not hovered.
After this commit the darkening area is moved inside the right element
thus not requiring magic numbers for truncating the area and fixing the
display of the darkening area behind the rounded corners.
closesodoo/odoo#68640
X-original-commit: f08e6e02cda9080d39f3a81fb83853df917f9ebc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Currently, when duplicating an event, it also copies the stage_id and
kanban_state, which should be set to their respective default values.
This commit improves the behavior and sets the default values for
stage_id and kanban_state while duplicating an event.
taskID-2463576
COM PR odoo/odoo#67633
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit improves the following behavior:
* Truncates long names/emails (with ellipses) to avoid
overlapping
* Aligns the start and end dates with bootstrap grid structure
* Where Phone number is not provided, removes phone icons and
N/A
* When there is no ticket, instead of displaying 'N/A', simply
provide ID of the attendee as a reference (like 'Ref: 10')
taskID-2463576
COM PR odoo/odoo#67633
So, instead of waiting for the cron every hour, we create
a cron trigger, which is created/activated every time
we post/cancel an invoice. When the CRON worker is available,
it can take the job immediately.
To be sure that we don't miss any crons or that events
might be needed that are not triggered, we still launch the
cron every day.
A test was added to check that the crons are correctly
triggered.
closesodoo/odoo#67088
Signed-off-by: Josse Colpaert <jco@openerp.com>
Currently, graph view display the blank chart when the
sample data is set and the noContentHelp message is empty.
so in this commit, graph view display the sample data with
noContentHelp message even if the noContentHelp message is empty.
TaskID-2347554
closesodoo/odoo#62153
Related: odoo/enterprise#14840
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Steps to reproduce the bug:
- Install l10n_it_edi
- Let's consider an italian company C with l10n_it xhart of accounts
- Create a customer invoice I in C and add a line with a price and a tax
- Add a note line
- Confirm I
Bug:
This UserError was raised: You must select one and only one tax by line.
opw:2484338
closesodoo/odoo#68609
X-original-commit: 49cf25fcc80ec2cb8ba3b3473c7c8d31533e2037
Signed-off-by: Josse Colpaert <jco@openerp.com>
Before, account_fiscal_country_id was only use for tax operations; and country_id was used for all the other accounting stuff. Now, with the new ability to use foreign tax reports (with foreign VAT fiscal positions), we can generalize the fiscal country, sot that it is the one that needs to be used for the whole accounting. Since foreign tax reports were not supported before, account_fiscal_country_id is already set on existing database as the country for the "main" accounting, so the impact of this change is small.
closesodoo/odoo#68349
Related: odoo/upgrade#2322
Related: odoo/enterprise#17299
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Such fiscal positions define an alternate VAT for a specific region. When foreign_vat is set, a country must be set on the fiscal position; it'll be used to know for which tax report the fiscal position must be available as an alternate VAT (in the tax report; see enterprise branch). Note that it is possible to defined several foreign VATs for the same country, as long as they belong to different states within that country.
Note that this new feature is only for FOREIGN stuff; so, when you have to submit a tax report in different regions than yours. For example if you have a Belgian accounting, have French customers, and have a French VAT in addition to your Belgian VAT, to submit a tax report in France. For domestic operations, simply use your the vat field of your company, just like before.
[IMP] account: add country_id on taxes and filter them on invoices
The invoices now compute the country from which they should accept the taxes: it's either the one defined by fiscal_position_id.country_id (if fiscal_position_id is a foreign VAT fiscal position, i.e. it defines a foreign_vat value), or the company's account_fiscal_country_id.
Taxes from other countries are filtered from the view; we don't want them to be available there. There is also a constraint ensuring that. Same goes for tax repartition lines and tags from other countries.
We don't want to mix taxes, tags and foreign VAT fiscal positions from different countries, as it would break the tax report in enterprise. Doing this ensures the tax report can efficiently discriminate the move lines between the different regions whose report they have to appear in.
[IMP] account: add country_id to account.chart.template
This is done so that the taxes are created in the right country, and the fiscal country is initialized in a consistent way when instantiating the CoA on the company.
[IMP] account: print foreign VAT on invoice instead of company VAT if one is defined
[IMP] web: allow forcing company vat on document templates
This is done to allow the use of foreign vat fiscal position on invoices: in that case, we don't want to use the company VAT, but the value of fiscal_position_id.foreign_vat. So, when such a value exists, the invoice simply set the force_vat variable to the right value.
[IMP] base_vat: also validate VAT of foreign VAT fiscal positions
We generalize the code formerly only done for res.partner so that the foreign_vat field of account.fiscal.position can be checked in the same way.
Before, we only cheked the name to know whether or not there were moves forbidding the deletion of the whole accounting to replace the CoA. This was too strict, as an accounting with only draft moves couldn't do it if some move had a sequence number (which could happend with moves that were reset to draft). If everything is in draft, we want to allow such deletion.
We don't check anymore that a move has been posted before in order to allow its deletion. Instead, we look at its sequence: if it's set and is not at the end of the sequence chain it belongs to, we know removing the move will create a gap, whatever the move state, so we forbid it.
If the user really wants to remove the move anyway, it is possible, by manually emptying the name of the move to delete. This way, he won't have any sequence anymore, and will be deletable. Users should however, rather rely on move cancellations and reversals, just for the sake of a cleaner accounting.
User may use Settings menu just to click "Manage Users" buttons. Such simple
navigation sends ``create`` request, which may trigger a chain of
recomputations. To avoid that we redefine ``create`` method to check if a value
is really changed.
The previous explicit implementation lacks in v14 two fields at least:
* from module `account`
```
qr_code = fields.Boolean(string='Display SEPA QR-code', related='company_id.qr_code', readonly=False)
```
* from module `enterprise/account_reports`
```
account_tax_fiscal_country_id = fields.Many2one(string="Fiscal Country", related="company_id.account_tax_fiscal_country_id", readonly=False)
```
Performance Tests
=================
In this test we click "Manage users" and check stats for
``res.config.settings/create`` request.
Demo database with eCommerce and Accounting app installed:
```
| | Number of queries | Query time, sec | Remaining time, sec |
|--------+-------------------+-----------------+---------------------|
| Before | 707 | 0.325 | 0.215 |
| After | 382 | 0.283 | 0.174 |
```
The same, but with extra 1400 invoices:
```
| | Number of queries | Query time, sec | Remaining time, sec |
|--------+-------------------+-----------------+---------------------|
| Before | 715 | 0.459 | 0.349 |
| After | 382 | 0.176 | 0.107 |
```
---
opw-2489335
closesodoo/odoo#68620
X-original-commit: 5e3f37191a4687b305e2337780c7f10278f6a7aa
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
*: website_form
This commit introduces a simple & light popover/tooltip (as in Google Doc) when
editing a link.
It will be used:
1. (web_editor) On every page links.
2. (website) In the website navbar, when clicking on a menu, it will replace the
popup shown to ask the user what he wants to do (edit the menu or go to the link
or do nothing). That popup was a bit invasive and old-fashioned.
Part of https://github.com/odoo/odoo/pull/64756
task-2439860
closesodoo/odoo#64756
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, when a menu inside a dropdown was clicked, the dropdown
would close itself, making the menu impossible to be edited.
That was not really an issue as those menu could still be edited through the
menu editor dialog.
That behavior was already prevented for mega menu in order to be able to edit
them.
This commit adds the same behavior to regular dropdown menu. It is mandatory
for the following commit adding a popover on menu to edit them instead of the
dialog.
Part of https://github.com/odoo/odoo/pull/64756
task-2439860
Require to website snippets options was missing.
Indeed, `CoverProperties` is defined in it, but is `include` in website_blog
without requiring it.
Somehow, it was not raising an error on runbot but adding new odoo module
(totally unrelated to CoverProperties or blog) seems to change the order of
import and reveal the issue.
Part of https://github.com/odoo/odoo/pull/64756
In relativedelta, `day` means day of the month and `days` is for number
of days. Today, the demo data failed because the computed `date_to` was
before the `date_from`.
closesodoo/odoo#68632
X-original-commit: 67cb39aa74ae60dd069bf552ed06c878ec643f9c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Purpose is to allow members to quickly opt-out / opt-in from assign
process. For example if for some reason (leaves, too much leads, temporarily
working on something else) a salesperson cannot handle more leads he may
opt-out from assign process.
When member is opt-out, hide assign details from both kanban and form
views. It allows notably to see at a glance who is out and who is in.
Task ID-2494749
COM PR odoo/odoo#68476
UPG PR odoo/upgrade#2318
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Improves list; kanban and form view for currencies and currency rates.
Add checks to prevent changing/adding rates when accounting entries exists
on dates concerned by those rates.
Task: 2450747
Before this commit: all groupable fields were offered to selection when
a user would click on a suitable pivot header. While guaranteeing maximal
flexibility, this was easily overwhelming to any new commer.
After this commit: when at least one groupby is defined in the search
arch, the selection is done in the search arch groupbys (plus eventually
some custom groupbys) via a menu similar to the "Group By" menu in the
control panel. The advanced users have still access to more options in a
"Add custom group" menu again as in the control panel. When no groupby
is defined in the search arch, the selection is done among the groupable
fields as before.
This has led to a small modification of control_panel_model_extension.js:
it has become necessary to distinguish the groupBy filters coming from
the arch from those created by the user via the "Add custom group" menu.
Task ID: 2376505
closesodoo/odoo#61572
Related: odoo/enterprise#17341
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Reduce friction submitting a CRM contact us form while linking the
lead to the portal contact.This facilitates the flow generating leads
from the contact us form.
The partner_id of the lead created from form is set to the one of the
logged visitor if model is crm.lead and there is a logged_visitor and
if the prefilled email and phone number of form match the logged partner's
(otherwise it would change the partner when setting it on lead
In details : there must be an email, the same in input and in partner,
after normalization. Only then:
- If there are both a phone in values and a phone on partner,
propagate partner on lead only if they are the same.
- Else, that is if there is no phone in partner or no phone in values,
propagate partner on lead. If no phone in input, it will not propagate.
on the model. If no phone in partner, then if there is one in input, it
will write that additional info on partner, completing its profile.
Concerning phone comparison: extending current logic, the numbers are
still formatted before comparison. That is:
- Before this comit, the form value was formatted according to country in
record or geoip. Now, if there is no country_id in record, uses the logged
visitor partner's country or env company country, if there is a logged user.
Finally, it uses session geoip as last option. (changes in _get_country())
- The partner's number is formatted through its model function _phone_format,
according to the partner country (or env company).
- Both formattings are done in international format.
Adds tours to check that partner is linked to lead only if phone and email
are not changed from prefilled data (from logged visitor's partner on form.
Task-ID : 2241639
PR : #61126
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
1) Improves user experience by filling contact form with logged partner info.
This facilitates the flow when logged.
The contact us form is filled with data from the partner linked
with logged in web visitor, logged_partner. Its data is used in priority.
Empty fields (e.g. no partner is logged) will be set to default values
in request.params if any. This way, previous behaviour is preserved (as well
as widget correct display behaviour).
2) This commit also adds a star next to the required field Subject in the contact
us form like for the rest of required fields of the form : s_website_form_mark
This improves coherence and clarity when filling the form.
Task-ID : 2241639
PR : #61126
This PR changes the way assets are declared in Odoo modules.
Before: assets were declared in template files. Template bundles were
generated from primary templates, so technically any qweb template could
have been called as an asset bundle, with the 't-call-assets' directive.
Being standard qweb templates, they had access to standard HTML tags
(script, link, with or without raw scripts or style definition), qweb
directives (t-call, t-raw, etc.) and could be inherited by other
templates.
Now: assets are defined in the module's manifest and generated by the
't-call-assets' directive.
More information on the new system can be found on the updated user
documentation (see the "JavaScript Reference" section).
closesodoo/odoo#60632
Task: 2352566
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Before this commit, on the /shop page, tables inside modals (e.g.
modal optional product) were modified by the CSS of the table of the
product grid. After this commit, the CSS is modified to only target
the product grid table.
task-2492086
closesodoo/odoo#68600
X-original-commit: 312e9b60b7f2ffe6f10b9bb7c202cb72e67ac8ab
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Conversion of all modules to the new manifest assets declaration.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
This commit changes the way assets are declared in Odoo modules.
Before: assets were declared in template files. Template bundles were
generated from primary templates, so technically any qweb template could
have been called as an asset bundle, with the 't-call-assets' directive.
Being standard qweb templates, they had access to standard HTML tags
(script, link, with or without raw scripts or style definition), qweb
directives (t-call, t-raw, etc.) and could be inherited by other
templates.
Now: assets are defined in the module's manifest and generated by the
't-call-assets' directive.
More information on the new system can be found on the updated user
documentation (see the "JavaScript Reference" section).
Task: 2352566
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
This commit removes a template file that was does not exist anymore in
the account module.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
This commit removes a needless priority attribute on a portal template.
This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
This commit handles 2 things:
- The line odoo._modules = <t t-raw="get_modules_order()"/>; used to be in
assets_backend but is now directly added to the web.bootsrap (the odoo
index template). Since pos has its own index, we add it there.
- An "id" attribute has been removed from a link tag which was used to
indentify said link as an xpath target. The xpath has been adapted to
target the href instead.
This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Before this commit, the recaptcha widget got the database public key
from a qweb "t-set" directive fetching directly the key from the
database when rendering the template.
Now, it is loaded beforehand and given to the session_info instead.
This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
This commit handles 2 things:
- Clarifies why some inline style has to remain inline instead of being moved
to a separate file.
- Moves an inline modification to field_html for testing purpose to
a dedicated file.
This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
This commit handles 2 things:
- Moves snippets used to call the summernte library inside several new
dedicated files.
- Removes a raw script declaration to move it to a dedicated file.
Also the calls to the lib files have been changed from a qweb loop to an
explicit list of script tags.
This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Before this commit, the asset bundle "_assets_helpers" was the only
bundle using a "t-raw" directive to insert assets in between other asset
calls.
Now _assets_helpers only contains the assets called before the t-raw
directive, and the second part (1 file actually) has been added after
every call of the bundle.
This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
This commit changes the way tours are automatically disabled when in
demo data.
Previously, an override of the assets_common template was applied by a
file loaded in the web_tour demo data, ensuring that the tours are
disabled when demo data are loaded in the database.
Now, a "tour_disable" boolean will be given to the session_info object
to determine whether the tour manager must be disabled, meaning that it
will automatically consume all registered tours.
This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>