PURPOSE
=========================
The goal of this task is to set up some kind of guidelines to make
kanban views consistent.
It is fine having different kanban views, but if a UI element is shared
among several kanban views, it should behave/look the same so the user
knows what to expect.
Kanban views can be split into two types:
==> 'documents' kanbans, such as res.partner, crm.lead, etc.
- those records are created/edited often, numerous
- 'opening' the card means accessing the record
==> 'dashboard' kanbans,such as stock.picking.type,account.journal, etc.
- those records are not created/edited often, there are much less numerous
- usually presented as dashboard, where 'opening' the card means
accessing a set of related 'documents' (clicking on a account.journal
to access account.move, or stock.picking.type to access stock.picking)
- configuration of the 'card record' is done through a dropdown to
access configuration
Here are some guidelines for consistency. Bear in mind that those are
not rules, but guidelines for consistency that we'd like to keep in
mind when designing.
==> 'documents' kanbans
- the record is accessed through global click
- the user avatar is at the bottom right
- the activity widget is at the bottom left (in last position if
there are other elements)
==> 'dashboard' kanbans
- the record is accessed through a 'Configuration' option in the card dropdown
- there is no global click, and therefore no focus shadow
- the dropdown icon (o_kanban_manage_toggle_button) is always visible,
with icon fa-ellipsis-v
- the listview counterpart should be presented as a dedicated
configuration menu, and shouldn't be in the 'dashboard action'
- links in the body of the card are structured as follows: link with
<count>+label, then any additional aggregated metrics (not link) to the right
example https://drive.google.com/file/d/1ZP6HDHTtC7cQ6rDWgqLoPs6U8JCeNVkW/view?usp=sharing
==> global guidelines
- the title font color is #212529, with 500 weight
- the subtitle font color is #666666, with 400 weight
- the font size is 1.083rem
- text overflow is handled through linebreak, not ellipsis
- numerical values are aligned to the right
- the kanban state widget is at the bottom right
SPECIFICATION
=================
AS per guidelines Improved follwing kanban/dashbaord view
- hr_job
- hr_department
- hr_work_entry
- hr_appraisal
- fleet_vehicle
- product_template
- sale_subscription_template
- crm_team
- res_partner
- event
- stock_picking_type
- mrp_eco_type
- maintenance_team
- quality_alert_team
- account_journal
Added the department menu on employee with default kanban view
Added sequence in hr_work_entry list view
TaskID: 2206372
Related Enterprise PR: https://github.com/odoo/enterprise/pull/10341Closes: #50536
render, render_template, load, activity_schedule_with_view,
get_website_pages should all be private:
It should not be possible to render an aribtrary template only with
its name or id
Still need to render some qweb views from js so the method
render_template is kept public.
This explains why the website editor still need read access on
ir.ui.view as we want to allow any snippet to be rendered.
The attribute defined isn't the right one, thus on population,
those models are populated with the default _populate_sizes defined in base.
closesodoo/odoo#50464
X-original-commit: ad7436bb9d2b965f926aa2d1f45a89ea5f6dfc9f
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Before this commit, pricelist boundaries were dates. It was not possible to get a modified price at a precise time: e.g. modify the formula at 12h00.
closesodoo/odoo#49030
Taskid: 2221094
Related: odoo/upgrade#1055
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
When no pricelist property is defined for a customer, we use a search as
fallback, without considering the current companies.
This means you can see the pricelist of company B as pricelist for a
partner, even with company A as main current company (if both company
are enabled in the multi-company widget).
Forward-Port of #46429
X-original-commit: 68040c92c8e09218641d823d690e0ce36dcdef30
Since https://github.com/odoo/odoo/commit/7d8df4bec192e5a2ff3341dcf43d59e06a57f9a9, the groups
managing pricelists features have been updated.
But the onchange feature enabling pricelist on multi-currency activation was wrongly
adapted, it was only activating advanced pricelists, iff basic pricelists were enabled.
The wanted feature is to activate pricelist (basic pricelist features: group_product_pricelist)
when multi-currency is enabled.
Also add an implied_group on multi_currency group to enforce this behavior.
closesodoo/odoo#49633
X-original-commit: f862f9650395b02f6a43c57cdf232a309fa6948e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
The 'Configure Variant' button doesn't show any relevant information in
case of a product variant. It is only useful for a product template.
opw-2229881
closesodoo/odoo#49059
X-original-commit: d57331f5403159692591fe75c6e8e4f1e9ac6b02
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Since the wizard to set a logo and chose a layout has been removed, we
don't need anymore to throw an error if they are not set because the
report can be generated.
closesodoo/odoo#48831
X-original-commit: b7c7039667d9ec816e647a0dd30570a4a690cca2
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Steps to reproduce:
- install sales and barcodes
- go to sales > catalog > products > create
- give the product a random name and the following barcode: #1N4005-T+A
- save > print > product labels
Current behavior:
the barcode is not generated properly because it is not url encoded
everything after the # charachter is ignored
Current behavior:
barcodes are url encoded and generated properly
opw-2203716
closesodoo/odoo#48607
X-original-commit: 5aaacb825d0c408bc11c4fbb386e1d365a68594b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Sets the currency of supplier info (purchase price) in demo data on USD.
The reason is the default company currency is EUR, so the supplier info
created use the company currency by default.
But once account is installed, the company currency is switched for USD.
As multi currency is inactive by default, the user can't see the product
purchase prices aren't in the same currency than all the other prices.
task-1970460
When the value is the same for all records, the write can be done in
batch, this can lead to a "slight" performance improvement, depending on
write overrides, and how the value was computed for each line.
Steps to reproduce the bug:
- Let's consider an attribute A with two values V1 and V2
- Let's consider a product P with V1 and V2 as attributes
- Duplicate A
Bug:
P was associated with 4 attributes V1, V1, V2 and V2
opw:2219540
closesodoo/odoo#48342
X-original-commit: 1c44aeb7d1734cd7a6dbdb80971f98553c67003b
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Adaptation of the code throughout all modules to properly instantiate the newly
refactored control panel and update it accordingly.
Part of task 2196029
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Issue
- Install purchase_product_matrix, Inventory
- Create a (storable) Product P with default_code e.g. VOB2A
with a vendor V who uses a product_code e.g. VOB2a
- Create a PO/RFQ for vendor V
- Add a product, search "vob2" (copy/paste)
Infinite loop
Cause
purchase_product_matrix replace purchase.order_line.product.product
by product.template so the name_search is different and the
product.template's name_search loop doesn't support the case where
you have default_code == product_code
Solution
Check if the product's name_search returned a product containing
product_template_ids that we did not wanted (as mentionned in the
domain). If yes, it means that we will have an infinite loop so
we should break.
Additional note: the issue could be in versions < 13 but
purchase_product_matrix is only in 13.0 and this is not a
very common case.
OPW-2193005
closesodoo/odoo#47576
X-original-commit: 9d5d80f77bc04be83d5b2ca0569a6ea50e26a07e
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Steps to reproduce:
* Create a template with 2 variants
* Archive one variant
* Unarchive this same variant
--> the template is archived
This is due to commit 6a13b565cbbad89ff1c4177b171b01f30c83edf9. If the
variant is the only one, toggle_active on the variant should be
reflected on the template. The issue is that toggle active do not count
archived variant. One active variant and one archived variant are
counted as 1.
This commit make toggle_active count all variants
closesodoo/odoo#34769
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Before this commit when a user archives the product, the barcode
field in its template used to get disappeared.
Since barcode field in template is a related field to product,
the field gets invisible in product template when the user archives
the related product.
After this commit, even when a product is archived,
its barcode will still be visible in template.
Here the barcode field is changed from related to computed.
task-1978559
purpose of this commit is to change the field type
of min_quantity from int to float on product pricelist
object
task:2165208
closesodoo/odoo#45792
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit updates product, stock and manufacturing views for improved
usability. Handles view only changes of overall usability improvement
task. Specifically spec numbers:
1. Add "Run Scheduler" (from stock) to the manufacturing app under operations
5. Make "detailed operations" wizard modal have more intitutive footer
buttons (i.e. don't say "Confirm"/"Cancel" when changes aren't
possible.
8. Rearranging of vendor pricelist view
9. Updating of tooltip content for "property_stock_account_input_categ_id"
Task: 2041853
Product templates standard_price (cost) is company_dependent,
because the product_product standard_price is company dependent.
closesodoo/odoo#47041
Forward-port-of: odoo/odoo#46841
X-original-commit: 30ee9f1ac411aca9c2bf2158fca9be7db743616d
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Issue: on main product's kanban, if you group by categories, all
categories (even the empty ones) appear. This is not desired.
We only wanted this group_expand logic when using the products stat
button on the product category form view.
closesodoo/odoo#46966
X-original-commit: e3f1254e5b28aa801f137835d871427786fb3428
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
The default product category and uom should be fixed on generic
undeletable records (in data files).
And by caching those default values, we can gain up to 20% time when
creating products without providing uom and categories.
Also remove the unnecessary defaults on the compute fields, which do the
same as the compute (and have no use because it is a non stored field).
closesodoo/odoo#45791
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Delete the uom 'kg'(kilos, kilograms), open a product form view
Traceback will popup because the hardcoded xmlid cannot find the value
in the database since has been deleted. Adding a fallback fix the issue
opw-2194659
closesodoo/odoo#45265
X-original-commit: 62baf8ba12cdf4521c6d0d0fea61ff1aa2e3f4d8
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Without at least one field, performing a search in these models' search
view is outright impossible.
closesodoo/odoo#45177
X-original-commit: 0aabfbff3ce5d68bf37e1734ba7aa43f62803f3a
Related: odoo/enterprise#8379
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Activate variants and pricelists
- Go to Product > Products Variants
- Search for anything on the 'Pricelist' filter
A traceback is raised: 'Can only create cache keys from hashable
values...'.
This comes from the following change:
https://github.com/odoo/odoo/blob/4b06fe19fa68255b7982d15e5847da2f6d6209fd/addons/web/static/src/js/views/control_panel/control_panel_model.js#L962
It returns a list instead of a string. Since a list is not hashable, it
causes the issue.
There are not much solutions since the context key `pricelist` can be a
`list` or an `int` (an ID). We force the cache key conversion to a tuple
to avoid the `TypeError` and handle the `list` use case (which was
broken on top of crashing).
opw-2187757
closesodoo/odoo#45064
X-original-commit: ec0a8767143b4c4818418281803c4f52fefa8d2a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Steps to reproduce:
- install sales
- activate units of measures and variants
- set imperial units under general settings (pounds for weight and ft³ for volume)
- create at least 2 variants on a product and access them via the smart button
from product.template
Previous behavior:
the volume remains in m³, it is hardcoded in the template
Current behavior:
the volume is printed just like the weight (generic uom notation)
opw-2186965
closesodoo/odoo#44777
X-original-commit: d7f2beac5ff856afeb684be4b13317838a0257a1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Replace an assertRaises(StopIteration) by a next() with a default
value.
Following PEP 479, *any* StopIteration reaching the toplevel of a
generator triggers a DeprecationWarning. And while the assertRaises
looks innocuous, both _assertRaises and the underlying
clear_upon_failure are implemented with functools.contextmanager,
which wraps a generator.
As a result, exceptions raised in the assertRaises "body" get
reinjected inside the wrapped context manager[0] and if the exception
is a StopIteration it triggers the warning.
By not using assertRaises we side-step the issue.
[0] https://github.com/python/cpython/blob/b6999e5690c7006b0ba4049cfd638513c982a90c/Lib/contextlib.py#L131
Use the 'Volume' decimal precision on all `volume` fields.
Complement of commit c1a5221ba2
opw-2185374
closesodoo/odoo#44473
X-original-commit: dc0111d6cdf4032fa840f9ff95f4fa687d33f77c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Purpose of this commit is pricelist/pricelist item can not
created/modifided linking records of diffrent companies together
closesodoo/odoo#44391
Task: 2090409
X-original-commit: 9b62813cddb2726003b4b989c32185400059dfa1
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
purpose of this commit is to make import template compatible with v13
task-2146510
closes-#42279
closesodoo/odoo#44375
X-original-commit: 37aadf1227531838ada7dc3810cf463379736e96
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Sometimes when we try to buy a product that doesn't have any variants,
it would result in an error saying there isn't any valid combination
for that product.
This was happening because `_get_variant_id_for_combination` was
considering that the field `combination_indices` would always be
equal to `''` (empty string) in such a case.
This isn't true as `combination_indices` isn't a required field
thus allowing `null` \ `None` to be valid values for that field.
This fix will simply include products with no values set for their
`combination_indices` when searching a corresponding variant from
the `product_template`.
closesodoo/odoo#44056
X-original-commit: 03e7efc3b4592c5f063c665130011a91fcc4d683
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Unfortunately caught in a really wide try/except clause where it was
completely silenced, causing a lot of stuff to be archived instead of
deleted.
closesodoo/odoo#43543
X-original-commit: cfa2993615150416b801ce942f18339065678648
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Since [1] `computer_hdd_attribute_lines` is archived instead of unlinked in
`TestSaleProductAttributeValueConfig` which leads to indeterminism in tests due
to the missing `flush`.
Indeed `flush` is necessary before `invalidate_cache` since [2] if the data
that are pending being written must be saved to the database before the cache
invalidation.
[1] which highlighted the issue was merged after v13.0, but it still makes sense
to merge the current fix in the earliest version possible.
[1] 5361706e5e
[2] 9920f20e4cclosesodoo/odoo#43483
X-original-commit: f721bfe2860293d1456770d57be7805920929ca0
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Steps to reproduce the bug:
- Let's consider a product template P with an internal reference = I
- Archive P
- In the list view of product template select the Archived filter and
search for I with the Product filter
Bug:
P was not found.
opw:2169441
closesodoo/odoo#43414
X-original-commit: 051e8581ba05ed0e5762b6e7e18a78179822146d
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>