FP request: hide the field from the view as too technical
MAT analysis: it should be true by default as most expected behaviour
(it was the reason why it was displayed in the first place)
closesodoo/odoo#35679
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Improve the usability of the employees profile / "My Profile"
TaskID: 2048672
closesodoo/odoo#35587
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Follow up of 58a2ffa26f
Variant specific field `image_raw_original` was meant to be renamed to
`image_variant_1920` instead of `image_variant_max` to follow the same naming
convention as the other fields (having the pixel number in the name).
closesodoo/odoo#35493
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
PURPOSE
Have a nice ribbon widget to display state of records: part II
SPECIFICATIONS
Next to 883c96b781 and recent ribbon widget update some form views
have to be updated. It is best displayed following those rules
* after oe_button_box in order to fix overlapping;
* before image to overlap it cleanly;
LINKS
Task ID : 2032621
PR : #34662
Task
Since ed18095127, some google fonts are included. The "Open Sans" fonts
prevents RPM packaging to work because of white spaces in file names. This
is a Python setuptools bug (https://bugs.python.org/issue809163) which is
not yet fixed.
With this commit, the "Open Sans" directory and ttf files are renamed
into "Open_Sans", solving the packaging problem.
closesodoo/odoo#35661
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Since commit https://github.com/odoo/odoo/commit/f5cd483216af01001f44a41f7d48f042b9f56ff9
the method `_lang_get` doesn't fallback on a language if the asked language
isn't found.
This causes issues with `formatLang` that uses the language on the
context, which is the language set on the client browser (in most cases).
Meaning, if 'en_US' is the only installed language and a customer
has set his browser to `fr_FR`, when calling `formatLang` this will
crash since no language has been found and `format` on `res.lang`
requires a singleton.
closesodoo/odoo#35633
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
All views defined in the 'enterprise' addons have their validation done
manually in their respective addons. Each one ? No, one rebel still
resists to the standart way to work.
This commit moves the gantt validation to put it in its module. The idea
is (for developper) to have only one module to change when adding feature
in gantt view.
Task-2050019
- Clean form view
- Add a new widget to check if IBAN account number is correct
- On the res.partner model, default value for "is a company" is True.
TaskID: 2025362
closesodoo/odoo#34691
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The line number was only indicative and was not used by the system.
When the translations source were updated, a big part of the diff was
only about the line numbers.
Ignore the given res_id value and export the line at 0
When reading the po file, the res_id from the file is still read and
stored in database but should be ignored
closesodoo/odoo#35582
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
PURPOSE
Add some improvements in mail gateway: remove private discussion, improve
bounce management, allow resetting bounce counters, improve automatic set or
reset of blacklists and ease mass mailing inheritance.
SPECIFICATIONS
Parsing email values: make message_parse effectively prepare all required
values for later processing
* update message_parse to add some more data directly in parsed dictionary
and avoid having to parse value again in later processing and computation.
* notably recipients computation is now done directly in parsing. It
includes email check and reconstruction using tools methods. That way
routing just has to handle those values and not compute part of them;
* from and cc are correctly managed with parsed and cleaned (sanitized)
versions in dictionary;
* remove all code decoding message header and replace them by fetching
the parsed value instead;
* filter parsed values before calling message_post to ensure right values
are given to it instead of having to manage them in message_post. Indeed
caller has to give the right input;
* make parsing sub-methods (extract payload, post process payload) have
a dictionary as input and output to always manage a dictionary of values
through the parsing methods and update their namespace;
Routing: remove deprecated code parts
* remove use of email_references regex. Indeed emails are routed using their
messageId and not the regex anymore since several versions [1];
* clean some unnecessary variables;
* simplify variable type input, like message_parse accepts only valid
email.message instances and to avoid several decode / encode. Tests are
updated accordingly;
Update docstrings of those methods.
LINKS
Related to task 1893155
Linked to PR #33340
[1] See df037e2959 and 0028c42136
If we use a kanban view to select a record we want to hide those elements:
dropdown boxes, buttons, anchors, some widgets, kanban color.
When it was too much change and used the new attribute
"kanban_view_ref" to explicitly define which view to open in selection_mode.
When also had to create previously unexisting kanban for
fleet.vehicle.model to show name and brand.
Task ID : 1924779
- many2one widget in mobile will open kanban view instead of listview when
records needs to be selected
- Add support of "kanban_view_ref" on many2x fields:
For many2one fields, this specific kanban view will be opened when you click
on this field. Note that in desktop, the behavior stay unchanged:
'Search More' will open the tree view.
For many2many fields, this specific kanban view will be opened when you add
a record in mobile.
- Add support "selection_mode" in kanban views.
This boolean is set to true when you want to use a kaban view to
select a record instead of open a record.
"selection_mode" is now passed in qweb_context to allow developers
to use t-if='selection_mode' in kanban views to show or hide elements;
buttons, dropdowns, anchor tags are not necessary when selection_mode
is enabled. So those elements can be hidden based on this condition.
Useful when kanban view is opened from m2o in mobile environment.
Task ID : 1924779
* set country VAT Label "CUIT" which is the country TAX id name in
Argentina in order to used in reports and other places in Odoo. CUIT
mean "Código Único de Identificación Tributaria",
* update address format of the country.
* Use the state name instead of the state code: The address for the
company and partner was showing the state code (defined by ISO) but
this one are not the ones know for the common use. In order to avoid
errors we use the state name instead of the state code.
* Also change the order of the city state and zip are shown in address
in order to match the address in Argentinain "way".
closesodoo/odoo#34961
Signed-off-by: Josse Colpaert <jco@openerp.com>
Improve design and introducing several usability improvements:
- Removed customization of an event card, just display event title.
- Added popover, popover consist of two sections:
1) Show the title, date and time of an event. Date and time are
automatically computed according to the user timing preferences,
language and event duration. Can be hidden with hide_date/hide_time
attribute respectively.
2) Display all the fields specified inside the <calendar/> element.
fields can be specified with a widget and its options.
e.g. <field name="name" string="Custom Name" widget="char" options="{}"/>
- Show avatar in popover for filters.
- Removed hide sidebar feature.
- Increase readability using a better color selection.
- Better UI in mobile.
And, Adapted test cases
Task 1919926
Co-authored-by: jat-odoo <jat@openerp.com>
Sending a quotation by mail is really rare and the option is still
available in dropdown menu. It is also confusing to see the document status
changed while you just want to print as a draft sometimes. So the PRINT button
is removed here.
Only displayed UNLOCK/LOCK for 'sales managers' if the
option “Lock confirmed orders” is activated in the settings.
Removed the ability to open the payment terms via external button
in edit mode
Removed the left,right and top borders in the field of terms and condition.
Kept only bottom border.
Event and Event ticket will come after Product regardless of it being a
template or the product.
In the sale order's form view, made certain changes like shifting
the positions, removing the field, adding title, keeping the field
in debug mode.
task-2033229
get_installed and _lang_get_id are both ormcached and correctly check
the context
Retrieving a res.lang from a code is a frequent action that can be
achieved with _lang_get (cf previous commit).
Using _lang_get ensure the active_test in the context is correct and
is not poluted with another context propagation issue.
odoo/odoo#35490 discussion is an example of bad context propagation
closesodoo/odoo#35504
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
It was very misleading that
self.env['res.lang']._lang_get('fr_FR')
used to return any language if fr_FR was not active or did not exited
There is a very frequent need to get a language from the code
There is rarely a need to get any language
While licence is technically correct, it is not used in America
Change only the label as the key is used at other places (e.g. app store)
closesodoo/odoo#35350
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Remove states according to new address format
No need to keep states that's why they have been remove.
From Module:
Belgium(l10n_be)
Germany(l10n_de)
Poland(l10n_pl)
Purpose :
========
Uniformity for define all state in base.
Specification :
===========
Move states from localization to base module
Localization modules:
China(l10n_cn)
Costa Rica(l10n_cr)
Dominican Republic(l10n_do)
Ethiopia(l10n_et)
Ireland(l10n_ie)
Netherlands(l10n_nl)
Turky(l10n_tr)
Vietnam(l10n_vn)
Romania(l10n_ro)
United Kingdom(l10n_uk)
that it is not a problem to put all these states in base, because the current csv only takes 0.34 s to be loaded
Related to task #1967713Closes#32767
Signed-off-by: Josse Colpaert <jco@openerp.com>
Follow up of 344614b54a
If base64_source is falsy, we don't need to check the other parameters.
closesodoo/odoo#35489
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Currently, only 6 digits after decimal point is stored in database and for some currencies
it may require to have more digits after decimal precision to correctly convert rates,
like MXN -> USD currency. So, we allow maximum digits to be stored in database.
On the view side, wherever rate is editable(form or tree view), we show 12 digits
after decimal point and on list view, we truncate limit it to 6 digits.
Also, a bug is fixed for web where 'digits' attribute for float field on list view isn't considered.
Also, we have to remove a test case statement which only checks for 6 digits for a float number.
task: 2024668
closes: #34279
Signed-off-by: Josse Colpaert <jco@openerp.com>
This package point to first package found in `upgrades_paths` or
fallback to alias of legacy `odoo.addons.base.maintenance.migrations`.
closesodoo/odoo#32650
Signed-off-by: Christophe Simonis <chs@odoo.com>
This commit adds a new way to use upgrades scripts folders
whithout needing to symlink them to an hardcoded path.
The folders specified in --upgrades-paths is then being used by
migration.py to find and execute migrations scripts per module
specified in the -u CLI option.
The folder needs to have the following structure:
- <upgrades_paths folder 1>
- <module1 name>
- <version1>
- <script1>
- <script2>
- ...
- <scriptn>
- <version2>
- <scripts>
- <module2 name>
- <versions>
- <scripts>
- ...
- <upgrades_paths folder 2>
- ...
Update odoo/tools/config.py
Co-Authored-By: Olivier Dony <odony@users.noreply.github.com>
This attribute is misleading as it is insufficient to correctly upgrade
the database. It only renames the column in the database, but other
operations are needed, like updating the corresponding `ir.model.fields`
record (and its xmlid). The default values and the translations are also
lost during the upgrade.
Moreover, this feature was misused. It was:
- left on fields during multiple versions.
- used on reports (SQL views). This would be ok if the feature was
complete, but, as is, it was useless.
- kept unchanged after a second renaming of the field (which can happen
versions later the first rename).
- used, even when the meaning of the field changed. i.e. the field
`archived` has been renamed to the classic `active`, but the value
in the database should be switched.
closesodoo/odoo#35439
Signed-off-by: Christophe Simonis <chs@odoo.com>
This attribute is misleading as it is insufficient to correctly upgrade
the database. It only renames the column in the database, but other
operations are needed, like updating the corresponding `ir.model.fields`
record (and its xmlid). The default values and the translations are also
lost during the upgrade.
Moreover, this feature was misused. It was:
- left on fields during multiple versions.
- used on reports (SQL views). This would be ok if the feature was
complete, but, as is, it was useless.
- kept unchanged after a second renaming of the field (which can happen
versions later the first rename).
- used, even when the meaning of the field changed. i.e. the field
`archived` has been renamed to the classic `active`, but the value
in the database should be switched.
Use pkg_resources.get_distribution() to check if python external
dependencies are installed, instead of trying an import.
The import test is preserved as a backwards compatibility measure.
This better expresses which python distribution needs to be installed
from PyPI and allows declaring a minimum supported version using PEP 440
version specifiers.
Closes#25541closesodoo/odoo#25549
Signed-off-by: Christophe Simonis <chs@odoo.com>
If a dependency was wrong in the triggers, it was hard to debug
Co-Authored-By: Olivier Dony <odo@odoo.com>
closesodoo/odoo#31958
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit removes the store property of `res_name` from `ir.attachment`
as it doesn't need to be stored and could contain outdated information
if the record name was changed after the computation.
Task: #1943295closesodoo/odoo#34930
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
The following models are already using big images, or they might need big images
in the future:
- partner
- hr employee
- shop category
- lunch product
- gamification badge and karma rank
PR: #34925
image_original => image_1920 (now resized to 1920)
image_big => image_1024
image_large => image_256
image_medium => image_128
image_small => image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
what was previously the big size)
+ add new intermediate format:
image_512
PR: #34925
The view name is often not very informative, add the external id for a better
error
closesodoo/odoo#29473
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
If the connection test to mail server succeeds, we shouldn't see
"Oops something went wrong" and "User Error" either
Replace error generation to display success message by bus notify.
closesodoo/odoo#35292
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
* account, crm, hr, im_livechat, l10n_ch, l10n_it_edi, mail,
mass_mailing, project, stock, base
- `String` -> `string`;
- `defaut` -> `default`;
- `defaults` -> `default`;
- `reandonly` -> `readonly`;
- removed redundant `placeholder` attribute for `Char` field;
- removed redundant `size` attribute for `Float` and `Integer` fields;
- changed to use `Selection` instead of `Char` for a field having a
defined `selection`.
closesodoo/odoo#35356
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
No need for selection fields
If in global variable, the _lt should be used instead
closesodoo/odoo#31211
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Introduces the method _lt
The translation method is now evaluated lazily.
It allows to declare global variables with translatable content
e.g. this code will now work:
LABEL = _lt("User")
def _compute_label(self):
context = {'lang': self.partner_id.lang}
self.user_label = LABEL
Those two decorators are removed/deprecated since recent commits but
some references remained in the documentation.
api.guess and api.noguess is deprecated and removed since c552fb7a61closesodoo/odoo#35332
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Purpose
=======
Fields `customer` and `supplier` on `res.partner`
are mostly used in domains of many2x fields.
Those domains can confuse end users because they don't
see the partner they are looking for; and it's not obvious why.
Some identified problems:
1. It can lead to duplicated partners: the user does not find
the partner, so he creates a new one.
2. The user imports supplier contacts in the Contacts app, so they
don't get the `supplier` flag. Then the user wants to make a purchase order,
and cannot find the new suppliers in the list
3. A user removes the customer flag on a prospect, because they don't think
it's a customer yet - except now they can't make a quote for that customer...
Specification
=============
Remove the two mentioned fields.
Since fields `customer` and `supplier` have been removed, all partners
are now shown in many2one dropdowns.
But in some cases, not all partners are relevant or some are more likely
to be relevant than others. e.g. when creating a PO, top suppliers have a
higher priority than other partners.
So, adapt the places where those fields were used with the new mechanism to
display the searched the partners, according to the number purchase/sales
orders they made.
TaskID: 2031147
Co-authored-by: Yannick Tivisse <yti@odoo.com>