Commit Graph
379 Commits
Author SHA1 Message Date
svs-odoo bc01c7bcec [IMP] product,purchase,sale,*: product catalog
This commit makes two major things:

1. Move the product catalog from `sale` to `product`.
It moves the product catalog's code from `sale` to `product` module in
order to be able to use it in other modules.
A mixin, `product.catalog.mixin`, was created for to make other models
catalog compatible.

2. It enables the product's catalog in `purchase`.
In `purchase`, the catalog differs a little bit from `sale`:
- If Unit of Measure is enable, the UoM for each product will appear in
  the catalog;
- If the product purchase's UoM or the purchase order line's UoM is
  different than the default product's UoM, the former one will be
  displayed (in bold so the user can know it's the UoM to refer);
- When opening the product's catalog from a purchase order, the products
  will be filtered by the PO's vendor;
- Some data from the vendor list will be used if appliant: the minimum
  quantity and the price;
- If there is at least one product's packaging, a button will be
  displayed to increase the qty by the packaging's one. If a packaging
  is set on the purchase order line, this one will be used.

task-3373589

Part-of: odoo/odoo#135502
2023-10-26 07:22:56 +00:00
Adrien Schoffeniels 6fb1d19ecd [IMP] product: move properties from product.product to product.template
Purpose:
-------
Commit [1] added the properties field on the product.product template.
However, the product.template model is more suitable to hold these
properties as the product.product model already has attributes which
are quite similar to properties.

Task-3570286

[1]: https://github.com/odoo/odoo/commit/70043822103638f651a521bd2da36cfdfd86245e

closes odoo/odoo#139702

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-25 19:37:37 +00:00
Valentin Chevalier e3fe2b01f1 [IMP] web,sale: allow selection widget in kanban view
Currently, users who want to change the visibility of product's
documents need to open their form view and edit it.

The selection widget now allows users to quickly edit the way a document
is displayed to their customers from the product's documents kanban view.

Part-of: odoo/odoo#137975
2023-10-25 18:10:55 +00:00
miad-odoo 2e974c10af [FIX] product: print labels only for consu, storable, combo
Before this commit, the "Print Labels" button shows for all products except
services.

However, this button does not make sense for event_booth, event_ticket, course,
... products

So we only show this button for storable, consumable and combo products.

Task-3390587

closes odoo/odoo#136753

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-10-25 15:50:32 +00:00
divy-odoo c05336d273 [IMP] product, *: add image option for color attribute
*: website_sale, sale_product_configurator

With this commit, Image options for the color variant have been
implemented. Now, users can use images to represent pattern colors such
as "leopard" instead of solely selecting a solid color.

- User can add, remove or change the color attribute value image from
  the backend. If no image has been uploaded, it will use the
  corresponding HEX color to represent color/patterns.

task-3381738

Part-of: odoo/odoo#132685
2023-10-23 20:07:14 +00:00
Adrien Schoffeniels 31af631607 [IMP] *: add properties fields to various models
Purpose:
--------
This commit adds properties (and related properties definitions) on the
following models:
- hr.employee (hr.department)
- hr_recruitment.hr_applicant (hr_recruitment.hr_job)
- product.product (product.category)
- stock.picking (stock.picking_type)

These have been added to the related form, kanban and calendar views when
applicable.

Properties have also been added to kanban and calendar views of
- crm.lead
- event.event
- project.task
(Properties had already been added on these models and form views)

Task-3458627

Part-of: odoo/odoo#132578
2023-10-20 11:21:56 +00:00
Pierre-Yves Dufays 725e7ffae3 [IMP] various: improve custom activity views
The following summary view of the record in the activity views have been
improved:
- project_task: task state added
- project_project: project manager added
- event_event: responsible and the dates (date_begin_located and
date_end_located) added
- account_move: total amount, customer and state added
- sale_order: total amount and the state added
- purchase_order: total amount and the state added
- crm_lead: customer and stage added
- hr_applicant (hr_recruitment): recruiter added
- survey_survey: responsible added
- maintenance.request: added equipment and responsible
- stock.picking: added scheduled_date
- repair.order: responsible, schedule_date and product_id added
- mrp.production: added responsible
- hr_leave (hr_holidays): status is added and default deadline modified see
below

Ensures that "Schedule activity" is in one line by adding a colspan.

hr_leave activity: When a time off approval activity is created as a
consequence of the creation of a hr.leave, the deadline of the activity is set
to the date_from of the hr.leave minus activity type delay_count (default 15)
except if it leads to a date anterior to today. In that case it is set to
today. That way, in the activity view, the time off approval activities are
more or less sorted by related hr.leave date_from and the cell date is an
indication of when the time off is planned.

Technical note: on most activity view, the activity record was not occupying
all the horizontal space. To solve that problem the css has been modified and
the max-width (200) that was imposed on the sub div has been removed. And as
it was impossible to impose a max-width for a flex div (which is the common
case for the activity record), the max width is imposed on each text that might
be too long using the class o_text_block. That class has been modified to
impose a max-width. That's why that class has been added in most view.
Alternativly, we could have modified the activity compiler to add that class
when the attribute full was set (not done because not sure of the consequence).

Task-3300854

Part-of: odoo/odoo#138135
2023-10-19 19:08:12 +00:00
Xavier Bol (xbo) adb0476e5f [FIX] product,sale,point_of_sale: fix sales page visibility
Before this commit, the `Sales` page is always visible in product
form view when `point_of_sale` and/or `sale` modules are installed
even if the product cannot be sold.
The reason is because the initial condition contained in
`attrs="{'invisible': ...}"` for that page has been completely removed
since the recent changes to remove `attrs` attribute and allow having
python condition inside `invisible`, `readonly` and `required` attributes
(instead of having only True or False as value for those attributes).

This commit reviews the visibility condition for that page to completely
hide that page in product module as it is currently the case but it also
adds the condition we had in attrs. That is, in product module, the
invisible attribute for that page will be equal to `1 or not sale_ok`
(and so always invisible thanks to `1 or ...`) and when `sales` or
`point_of_sale` modules will be installed then `1 or ` will be removed
to just keep `not sale_ok` inside `invisible` attribute.

task-3506730

closes odoo/odoo#135840

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-19 14:47:20 +00:00
Xavier Bol (xbo) fed423910b [FIX] product,*: fix purchase page visibility in product form view
Before this commit, when purchase app (or account) is installed,
the `purchase` page in product form view is always visible even
if the product displayed in the form view cannot be purchased.
The reason is when `attrs` has been removed and replaced by python
condition inside `readonly`, `required` and `invisible` attributes,
since the purchase page had `attrs="{'invisible': ...}"` and
`invisible="1"` defined in its attributes, the condition in `attrs`
has completely removed when the `attrs` has been deleted.

This commit fixes the issue by updating the initial invisible defined
in product module to have `invisible="1 or not purchase_ok"` to keep
the condition that was initially defined in `attrs`.
In purchase and account module, instead of replacing `invisible="1"`
by `invisible="0"`, we will just remove `1 or` to show the purchase
page only if `not purchase_ok` as it was the case before.

task-3506730

Part-of: odoo/odoo#135840
2023-10-19 14:47:20 +00:00
Demesmaeker 211a5bb13b [IMP] sale(_management,_pdf_quote_builder),*: improve pdf quote builder
Following 116879e17e81657f48a7d11780d8d30715ecc68f a few improvements were needed to make it more
complete.

task-3484125

closes odoo/odoo#137522

Related: odoo/enterprise#48563
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-10-17 08:53:06 +00:00
Aaron Bohy daf05d48ac [IMP] *: views: deprecate active_* keys from evalContext
This commit aims to simplify the evaluation context used to
evaluate expressions used in views (invisible, required, readonly,
domain and context attributes). For now, the evaluation context is
typically the current record (there's a key for each field in the
view). In addition to that, there're static keys (that may conflict
with field names): uid, allowed_company_ids, current_company_id,
active_id, active_ids and active_model.

The motivation of this commit is at some point to get rid of the
3 active_* keys, because they are misleading and basically useless.

The notion of active_* exists, but it is something else: when you
are in a form view (let's say the form of a partner) and you open
its opportunities (by clicking on the stat button), the list view
of opportunies shows up and in the context, there're 3 keys
active_*, referring to the record from which we came. One can
easily access those information with context.get("active_*"), in
python or in view archs.

However, almost all `active_id` found in archs were actually used
to refer to the id of the current record. Indeed, for now, in the
evaluation context of a record, the value of the `active_id` key is
always the id of the record. So this commit adapts them to
directly use `id` instead. There was no use of active_ids, and
a single use of active_model which was removed (active_model is
the res_model of the view, so it isn't really necessary).

This commit doesn't drop the support of those keys, it deprecates
them. They will be removed for v18. A warning will be displayed if
they are used.

closes odoo/odoo#136665

Related: odoo/enterprise#47917
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-10-10 00:54:04 +00:00
Romain Derie 58607d1cf7 [REV] pos_self_order, product, website_sale: add product info popup
This reverts commit 3b9401c354.

It shouldn't have been merged in the first place. The PR was `r-` but it
seems like the mergebot bugged and still merged it because there was an
occurence of `r+` in the sentence which asked robodoo to `r-`.

> robodoo r- just to be sure, since there was a random r+ not [...]

Rationale of the revert:
- Bad field name:
  - "ecommerce" in product module
  - "ecommerce" but used in POS
- Arguably very low value to share the field -> This field is used in
  ecommerce to add info exactly between the price and the name of a
  product. There is low chance that you want to share that exact
  information with the POS.
- Technically, it couldn't work. What you design in website builder on
  the product page is related to website assets JS and CSS, which are
  not loaded neither in the backend and neither in the POS.
  It was leading to multiple critical issues, mainly:
  - Losing the whole style of the content (CSS)
  - Breaking completly the snippets (visually and design wise) (CSS/JS)
  - Not even show (JS is in charge of showing the content eg)

Note that the same issues were already existing in that field in the
backend (it's shown in the product form view). The ecommerce team was
looking for a solution to make it work, but it's impossible as to work,
it would need the website / frontend assets, which can't be loaded in
the backend / POS.

The cancel of this PR was validated with PO of POS and ecommerce
following those explanation, which they weren't aware of.

Apart from this revert, further PR will be done to:
1. Remove the field from the product form view (ecommerce app)
2. Create a new field for POS

Revert of https://github.com/odoo/odoo/pull/136906

task-3524272

closes odoo/odoo#137514

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-10-05 15:36:21 +00:00
Adrien Guilliams (adgu) 3b9401c354 [IMP] pos_self_order, product, website_sale: add product info popup
This commit adds a popup to show product information when clicking on an
info button in the product card in the self order app. The popup shows
the ecommerce description and the name of the product.

The ecommerce description field has thus been moved from website_sale to
the product module so that the pos_self_order module can use it.

closes odoo/odoo#136906

Task-id: 3524272
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-10-03 20:17:41 +00:00
Jitendra Prajapat af0d1b565c [IMP] purchase: added discount field in Vendor Pricelist
In this commit
==============

- Added the discount fields to the vendor pricelist and PO line models,
  making them optional and hidden.
- Implemented automatic filling of the discount field on the PO line when
  the unit price is sourced from the vendor pricelist.
- Implemented a mechanism to automatically populate the discount field on the
  PO line when the unit price is fetched from the vendor pricelist.
- Modified the pricing logic to ensure the discount is applied to the
  tax-excluded price.
- PO confirmation process to check if a pricelist already
  exists for the vendor. If not, a new pricelist line is created, including the
  discount if it is present.

task - 3380306

closes odoo/odoo#126804

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-09-22 11:55:50 +00:00
Victor Feyens 087ff42e3a [IMP] product: stricter documents creation
Do not allow modifying documents types, correctly mark necessary fields
as required, ...

Part-of: odoo/odoo#135894
2023-09-21 18:27:47 +00:00
Victor Feyens cec9dbc8ab [FIX] product: simplify documents list view
Part-of: odoo/odoo#135894
2023-09-21 18:27:47 +00:00
nikj-odoo 62a8e81f28 [IMP] product: reorder product attribute
Currently the user cannot modify the order as he adds new attribute to the product.
In this commit he will be able to do that

task-3451377

closes odoo/odoo#131514

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-09-07 14:45:19 +00:00
Valentin Vallaeys (vava) 5ca1da8ab3 [ADD] product: add multi-checkbox attribute type for extra options
Currently there is no efficient way to suggest extra-options to
customers in PoS or eCommerce. Extra options should be easily selected
by customers (or PoS waiters) with checkbox. Each checked option would
add an extra-price to the product price and appear on tickets,
receipts, invoices, kitchen display, ...

This commit introduces a new type of attribute: multi-checkbox. This
will not create product variants. A default extra-cost is defined at the
attribute level, but it can be changed at the product level.

The new attribute is available in Sales, not yet in eCommerce nor in PoS
(it will be in a future task).

task-3256585

closes odoo/odoo#130915

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-09-07 11:46:06 +00:00
Victor Feyens 5a801bc602 [ADD] product,(website_)sale: product documents
Introduce new model of "Product Documents" to hold documents linked
to a given product template/variant, displayed on:

* quotations
* confirmed sale orders
* e-commerce product page

This will also replace the previous "Digital Files" (website_sale_digital)
logic & module, which allowed to specify product documents available
to customers after the SO invoice was paid.

This exact feature will be lost after upgrade, since we only keep the
choice to link documents on quotations/orders, but:

1) on e-commerce, carts are supposed paid when confirmed
2) on portal, the "Online Payment" settings makes sure the users
have to pay to confirm their quotation.

therefore we consider new configuration sufficient, without needing
a "paid order" choice as well.

task-3249201

Part-of: odoo/odoo#132739
2023-09-05 10:59:17 +00:00
Julien Alardot (jual) 3c216395b1 [IMP] product,hr_expense: product.product kanban view
- Updates the product.product kanban view so that it matches
the product.template one.
- Fixes the favorite button
- hr_expense also requires the cost to be shown

task-3457035

closes odoo/odoo#131208

Signed-off-by: William André (wan) <wan@odoo.com>
2023-09-04 10:56:02 +00:00
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Gorash 1e12f68a1d [REF] base,all: Update modifier syntax: prepare view migration
These changes are made as a result of simplifying attrs and 'states' in
views.

Before applying the migration script, it is necessary to fix some views.
These views are erroneous and either work by chance or are simply
untested. We have for example wrong domains, elements used by modifiers
but not present in the view, obsolete domain operators, inherit views
not targeting the right views, xpaths using attributes as target, the
use of %(...)s in views, false attribute value types in python.

Part-of: odoo/odoo#104741
2023-08-18 09:49:12 +02:00
mehjabinfarsana 805735fd9f [IMP] product: vendor product name and code in search view
before this commit, vendor product name and
vendor product code was not added in
vendor pricelists search view

after this commit, vendor product name
and vendor product code is added

closes odoo/odoo#129301

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-08-16 12:47:45 +02:00
Valeriya(vchu) 8f8271abe5 [FIX] website_sale, product: fix tags view and filter
- fix tag filter
- fix product_product view in sales
- fix add to cart animation
- impove product tag view in website_sale and product

closes odoo/odoo#129901

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-07-28 14:53:50 +02:00
Valeriya(vchu) bc3026e2b2 [IMP] product, website_sale(comparison): enable product tags and ribbons
use product tags to display information as color/image on the product
page, enable filtering by tags, add tags to specification/comparison
table. Remove the link between ribbons and tags because there is no use
as we are able to show the tags on the page, add ribbon to
product.product

task-3299538

closes odoo/odoo#124299

Related: odoo/upgrade#4824
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-07-20 10:06:47 +02:00
Tejas Modi 4d9da8b9eb [IMP] product: rename labels in product list view
In this commit, I have make responsible optional hidden and rename some labels
in product list view.

TaskID - 3150983

Part-of: odoo/odoo#116799
2023-06-20 19:08:56 +02:00
niyasraphy 98cd8f90ad [IMP] product: hide all products label when no product is linked to tag
When no product is linked to a given tag there is no need to display
a void many2many. Indeed tags are configured mainly from products and
this field is used as a reminder of its usage.

closes odoo/odoo#124342

X-original-commit: 42ab359785fb38c098a524d03535c3aa6cca1173
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-08 21:52:49 +02:00
Valeriya(vchu) 09583d1563 [IMP] product, website_sale: add chatter to pricelist
add chatter to product pricelist to improve collaboration. Track
currency, company, country groups, discount policy and website fields.

task-3316528

closes odoo/odoo#121244

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-08 19:15:17 +02:00
clesgow a9bf6ba57f [FIX] product: display barcode field on new products
Following 459760c, the `barcode` field wouldn't appear on a new product
form until the form was saved at least once.
This was due to the new product not having any variants until it was
saved.
In the case of the product not having any variants, we check if it does
have a least one attribute at the same time (which would be the case for
dynamic attributes).

closes odoo/odoo#121925

X-original-commit: 5f3db6683ab191cb68af4c8d6bb2e86a5b114ee1
Signed-off-by: Steve Van Essche <svs@odoo.com>
2023-05-22 15:09:11 +02:00
Elisabeth Dickinson 45b9e04db4 [IMP] *: status buttons fix
Part-of: odoo/odoo#116641
2023-05-12 22:59:23 +02:00
Elisabeth Dickinson b2ef35a431 [IMP] *: replace .bg-color by .text-bg-color on ribbons
Also remove unnecessary CSS on ribbons.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
clesgow 459760c422 [FIX] product: hide barcode when with dynamic variants
Steps to reproduce:
- Inventory -> Configuration -> [Products] Attributes
- Create new Attribute with 'Variants Creation Mode' set to
'Dynamically' with a few values
- Inventory -> Products -> Products -> New
- Set the new dynamic attribute to the product and save
- If you try to set a barcode, the field will empty itself at each save

When a product is created with 'Dynamic' attributes, the variants will
only be created once the combination of attributes is used. So initially
there is no variant, hence nowhere to set the barcode.
So we avoid letting the attribute being set when there is still no
variant.

Part of task-3218314

Part-of: odoo/odoo#119381
2023-05-09 21:04:03 +02:00
Julien Mougenot 10dc896c1e [REF] *: Adapt views to Owl DateTimePicker
This commit follows the addition of the OWL date picker and intends to:

- update views calling daterange widgets to use the new syntax (and
remove the end date field from the view in most cases);

- change the remaining components extending the previous DatePicker and
DateTimePicker components.

Part of task 3121497

Part-of: odoo/odoo#112171
2023-05-05 13:52:22 +02:00
Alexandre Kühn 9f115fce17 [FIX] mail,*: fix style in 1st column of activity view
Task-3290752

closes odoo/odoo#120189

X-original-commit: a97c86a2b962f56955e3c16b7ad99cabb0b13b9c
Related: odoo/enterprise#40564
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-03 17:24:58 +02:00
Julien Carion (juca) eaacaf122d [IMP] web, *: Add autoresize hooks
This commit adds two autoresize hooks for text inputs and textareas to
make it adapt their size (width for text inputs, height for textareas)
depending on their content.
The commit therefore solves the issue of several form view task titles
being restricted to 1 line while it can be annoying if the title is too
long. The autoresizeTextarea feature was moved from TextField to the
autoresizeTextarea hook and the autoresizeInput feature was moved from
the AutoresizeInput mail component to the autoresizeInput hook.
The TextField component has a new option for disabling linebreaks.

task-3138826

closes odoo/odoo#117355

Related: odoo/enterprise#39493
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-25 14:07:15 +02:00
Adesh JolheandManisha Tulsiyani 23cf931808 [IMP] hr_,sale_(timesheet, project),purchase: generic improvements for the project
Purpose of the commit is to do the generic improvements for project.

So in this commit did the following changes:
 - adding a label 'last update' to the stat button in project form view.
 - indicate 'my project' in the tab instead of 'project sharing view in portal' in project sharing.
 - set the first non-folded stage of the project as default on newly created tasks.
 - remove user confirming the SO as the default project manager.
 - hide fields service_tracking, service_upsell_threshold if sale_ok is false.
 - set purchase_method to purchase by default if product is of service type.
 - remove the : next to the totals labels and decrease the font-size for values of 'total hours'
   and 'remaining hours' in timesheets notebook in project task form view.

task-2897867

closes odoo/odoo#96548

Related: odoo/enterprise#29774
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Co-authored-by: Manisha Tulsiyani <matu@odoo.com>
2023-04-04 11:01:59 +02:00
Mathieu (mano) d8958a45ba [FIX] web: checkboxes design & consistency
The main objective of this commit is to make checkboxes consistent
and fix their spacing issues.

Prior to these changes, the checkboxes on the `product_view` were
too close to their neighboring option labels, making it difficult to
know which checkbox to tick.

The new changes fixes inconsistencies in general such as undesired
hovering effects and the cursor behaviors on disabled inputs.

This commit also removes the margin in the checkbox template since the
padding from the checkbox wrapper compensates for the spacing between
the checkboxes and their respective labels.

Tweaking the selector in `settings_form_view.scss` to ignore boolean
field inputs allows us to get rid of max-width and margin overrides
introduced in commit b90059e936.

Most checkboxes were already falling under their labels on mobile, but
this change impacted those that were not. To address this issue, we
decided to consistently change the position of the checkboxes left to
their labels for small devices in form view.
This required slight adjustments to the `form_group.xml` template.

Still in form_view, for some of the specific checkboxes such as
`o_checkbox_optional_field` the changes in `form_controller.scss` are
made to mimic the new behavior for mobile sized screen.

However, if they are using the form_group template, their behavior
is unchanged at the moment.

Finally, even if these changes makes it better for most of them, some
checkboxes in `settings` still require some minor adjustments and will
be addressed in task-3113372.

task-3094083

closes odoo/odoo#114612

X-original-commit: ddb7574f97f11e69f0304c8bd8d55c2c53ab53fd
Related: odoo/enterprise#37887
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-03-10 12:31:11 +01:00
Victor Feyens 24ccf7d9b0 [CLN] *: useless type info for actions
The type fields of actions already defaults to
the model name in the base model definition.

Therefore, specifying `ir.actions.server`, `ir.actions.act_window`
& so on as type is useless (and adds noise since it's the same as
the action model).

closes odoo/odoo#114539

Related: odoo/enterprise#37855
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-03-08 17:33:37 +01:00
Bruno BoiandMathieu Duckerts-Antoine d19037e141 [IMP] web,*: better classes handling in view archs
**Before this commit**
- The optional "class" attribute set on the root node of a view arch
  is ignored, except for the kanban view which has a custom
  way of using it.
- The optional "js_class" attribute set on the root node of a view arch
  does not have any impact on the class names passed to its controller.

**After this commit**
The content of the optional attribute "class" set on the root node of an
arch like in

<list class="o_custom_class">
    ...
</list>

as well as an additionnal class derived [1] from the value of the
"js_class" attribute set on the root node of an arch like in

<list js_class="extended_list">
    ...
</list>

will both be found in the prop "className" of any view controller.

[1] a js_class value of "xyz" yields to the class "o_xyz_view"

**Note on this commit**
The kanban view was already appending the root node class attribute
to its renderer element. This is no longer the case and some styling
rules has been adapted.

closes odoo/odoo#113014

Related: odoo/enterprise#37265
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
2023-03-01 17:01:03 +01:00
svs-odoo 0e71e350e3 [IMP] product,stock: packaging product id
Makes the `product.packaging` `product_id` required in the model instead
of the view only, since a packaging is supposed to always be relative to
a product.
Edits some views to add the default product in the context and makes the
field readonly if there is no `product_id` (that way, the user can't
no more create packaging without product).
Also, removes the domain in the action to display the packaging list
view so the user can see if there are some packagings without product
and can eventually delete them.

task-3076044

Part-of: odoo/odoo#109511
2023-02-13 15:15:09 +01:00
Horacio TellezandXavier ca623471cd [IMP] product: migrate product_pricelist_report to OWL
Migration of the js code of `product_pricelist_report` to OWL.

Task - 3058360

closes odoo/odoo#105341

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Xavier (xlu-odoo) <xlu@odoo.com>
2023-02-03 05:08:43 +01:00
luve-odoo ac0395a1e8 [FIX] product : UI product.product form was broken
UI improvements for the form of product.product model.

task-3043184

closes odoo/odoo#111052

X-original-commit: d8bc64e6cf04291370e577abe8c58303ae4a9741
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2023-01-26 17:33:49 +01:00
Victor Feyens 3ef26523fb [FIX] product: UX of advanced pricelist rules
task-3062387

closes odoo/odoo#110060

X-original-commit: f91f3db47469d4f516083f8cbcfeb0381c066844
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-17 10:21:05 +01:00
Danial Sheikhani 21a40421ca [IMP] website_sale: make compare_list_price visible in comparison
Compare list price as base price or list price in comparison or comparison preview

task-2795129

closes odoo/odoo#87134

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2023-01-02 11:53:08 +01:00
niyasraphy 769aca56d3 [IMP] *: remove type from ir.ui.view records
closes odoo/odoo#108132

Related: odoo/enterprise#35031
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-12-19 11:33:47 +01:00
Viktors Lipskis (vili) 6409687f5f [FIX] product: fix pricelist item visibility
In pricelist form view and product form view, pricelist rules are now invisible if referring to an archived product or an archived pricelist.

task-2920563

closes odoo/odoo#105112

Related: odoo/enterprise#33910
Related: odoo/upgrade#4028
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-12-07 16:31:49 +01:00
Jorge Pinna PuissantandMichael Mattiello (mcm) c7c2959449 [IMP] web, *: simplification and standardization of the settings arch
The aim of this commit is to simplify and standardize the settings archs.

To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.

The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.

```xml
    <app string="CRM" name="crm">
    ...
    </app>
```

- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
        logo is created using the `name` parameter :
        `/{name}/static/description/icon.png`.

The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.

```xml
    <block title="Title of group Bar">
    ...
    </block>
```

- `title` *optional* : The title of the block of settings (the old h2),
        you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
        (the old h3), you can perform research on its text.

The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.

```xml
    <setting string="this is bar">
        <field name="bar"/>
        ...More elements
    </setting>
```

- `type` *optional* : By default, a setting is visually separated on two
        panels (left and right), and is used to edit a given field. By
        defining `type='header'`, a special kind of setting is rendered
        instead. This setting is used to modify the scope of the other
        settings. For example, on the website application, this setting
        is used to indicate to which website the other settings apply.
        The header setting is visually represented as a yellow banner on
        the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
        not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
        displayed just below the setting label (with classname
        `text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
        icon is displayed next to the setting label to explicit that
        this setting is company-specific.
- `documentation` *optional* :  If this attribute is set, an icon is
        added next to the setting label, this icon is a link to the
        documentation. Note that you can use relative or absolute path.
        The relative path is relative to
        `https://www.odoo.com/documentation/server_version`, so it's not
        necessary to hard-code the server version on the arch anymore.

closes odoo/odoo#106425

Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
2022-12-02 14:40:25 +01:00
Touati Djamel (otd) 5741ade043 [FIX] product: hide cost label from the view if product with variant
The group `“base.group_user”` is added in the view for the field
`standard_price` while it is already set on the python side:
https://github.com/odoo/odoo/blob/16.0/addons/product/models/product_template.py#L76
this causes an issue in the case of a product with variants,
the invisible attrs is ignored, the `standard_price` and
`uom_name` field are hidden, but the label will still be displayed

opw-3076827

closes odoo/odoo#106925

X-original-commit: 206e88b0ad9fdb6e1767c93b3eca8feeecddd3da
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-12-01 10:56:48 +01:00
Maruan Aguerdouh (magm) f8b60ea4cb [FIX] product: views in product form for bom price displayed correctly
Steps to reproduce:

Go to a product form view that has a BoM.

Issue:

The price is diplayed collapsed with the units and currency text.

Solution:

We need to remove the class "o_row" in order to be displayed in 2
columns as it is in other versions.

opw-3041120

closes odoo/odoo#104460

X-original-commit: 812614b7d6e194f510491ff83f9a8e48594ae7c5
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2022-10-28 19:42:46 +02:00
Damien Bouvy 5a79a2857f [FIX] (various): adapt to grid form views
closes odoo/odoo#102993

X-original-commit: c5a9d95ee13d0ed1d261e803d15d1f17cedfaab6
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-10-25 16:11:59 +02:00