Commit Graph
36 Commits
Author SHA1 Message Date
Martin Trigaux c59c10f1bc [FIX] *: correct typos and bad English
Courtesy of translators
Reexport .pot of modified modules

closes odoo/odoo#61010

X-original-commit: 62a18bdb372e234107fd2099a2df5f9e3a442c96
Related: odoo/enterprise#14489
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-29 19:23:41 +00:00
yhu-odoo 2c5ce41c42 [IMP] uom: change default rounding to two
Change the default rouning digits of all UoMs to be two, also change the
decimal.precision of UoM to be two. Adapt all the tests.
Also to avoid hardcoded digits in `should_consume_qty` widget.

PR #56000

X-original-commit: 460ec0402a2352a5b179d81935f7230f6bc97cb7
2020-09-09 09:21:12 +00:00
svs-odoo 8710ce9179 [IMP] product, mrp_subcontracting: price in USD
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
2020-03-26 11:44:56 +00:00
Ankita Raval 1a364b4eeb [IMP] Product: Improve demo data
In this commit,
-Change the price of the three-seat sofa 60.000 to 1.500
-Change invoicing policy based on ordered qty

closes odoo/odoo#41980

Task-id: 2153140
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-12-17 10:25:49 +00:00
Antoine Vandevenne (anv) 897a4baecf [IMP] product(_matrix): clean demo product for matrix
Before this commit, the product 'My Company Tshirt' had too much PTAL and PTAV which lead to an overloaded matrix.

This commit removes the 'Sleeves' attribute, reorder the other attributes and remove the Size attributes '2XL' and '3XL'.

task-2052537

closes odoo/odoo#37543

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-30 11:57:18 +00:00
Antoine Vandevenne (anv) 06bd183ec2 [IMP] product(_matrix), *: add configurator hint to template name
Before this commit, it wasn't easy to find a demo product template that opens either with the product configurator or with the matrix from a list view.

To fix that, this commit appends '(CONFIG)' to the name of all demo product templates that open with the product configurator and '(GRID)' to all demo product templates that open with the matrix.

task-2052537
2019-09-30 11:56:24 +00:00
Sébastien Theys 22a11a6f4d [REF] product, *: save product.template.attribute.value on variants
* account, hr_expense, mrp, sale, sale_product_configurator, stock_account,
  website_sale, website_sale_comparison

Before this commit, the `product.attribute.value` were stored on the variants.
This required filtering of attribute lines to find the appropriate matching
`product.template.attribute.value` that were used in most of the business code,
such as when computing the `price_extra`.

This also prevented to have multiple attribute lines for the same attribute,
which is needed to handle use cases such as grape varieties for wine products.
This will be done in the following commit.

After this commit, the combination of `product.template.attribute.value` will be
directly stored on the product variant.

Other changes
=============

Add `combination_indices` on product, which allows to quickly find a variant
matching a combination (1 simple indexed equality query as opposed to 1 query
with as many joins as there are attribute lines), and to add an easy
SQL constraint to ensure active combination uniqueness.

Add active field on `product.template.attribute.line` and
`product.template.attribute.value`, with the same behavior as variants:

They become archived if they can't be unlinked. This allows to keep the database
consistent, such as archived variants correctly keeping all their values, sales
order lines keeping their custom and no_variant. This is done with the help of
`ondelete=restrict` on the corresponding m2m fields, and the `unlink` methods
falling back to archiving when `unlink` is restricted.

Part of task-1912579

PR: #32946
2019-08-26 13:01:13 +00:00
Sébastien Theys 58a2ffa26f [IMP] *: rename image fields
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
2019-08-02 16:47:58 +00:00
Sébastien Theys e05442fe19 [IMP] product, *: clean test and demo set up with attribute lines
* = account, mrp, purchase_stock, sale, sale_product_configurator,
stock_account, website_sale

It is always better to create the product template attribute lines before
creating the variants. In a following commit, this will become mandatory.

The variants that are created should always match the combination of attributes
set on the template.

Finally explicitly call `create_variant_ids` when possible instead of reassigning
the attribute lines to implicitly call `create_variant_ids`.

closes odoo/odoo#34122

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-17 10:52:01 +00:00
Prakash Prajapati 30128860da [IMP] sale,purchase,...: Improve description of demo data product
Purpose of the task is some demo data values are not matching with the products
mentioned so update the demo data values with matching product.

Task: 1892754

closes odoo/odoo#28573
2019-02-13 09:20:25 +00:00
Juhil Somaiya f50bdf5cb4 [IMP] sale,stock,...: Set weight on consumable/storable demo products
This commit is related to task id: 1915274

closes odoo/odoo#29279
2019-01-30 12:59:27 +00:00
Christophe Simonis d7c5bc02cc [MERGE] forward port branch saas-12.1 up to 8aa8548d8a 2019-01-09 19:59:27 +01:00
Sébastien Theys f8dad1bb4b [FIX] product,(website_)sale(*): fix product configurator
This commit has several parts:

- fix ordering of attributes and values
- fix/create python logic (notably for checking the possibility of a combination
	and for price computing)
- fix currency
- display correct info on the views without the need of JS (prevent flickering)
- fix various issues with website and SO
- add a lot of tests (both unit and tour)

================================================================================

*** Make consistent the filtering and ordering of product variants ***

Filter & Check possibility
==========================

The first variant shown on the website should always be possible.

When activating the customize "list view of variants", we don't want to show
impossible combination on the list.

We also don't want the user to be able to add to cart an impossible variant.

Show appropriate messages when no combination is possible.

Order
=====

We want the variant order to be consistent with what the user selected with the
sequence fields. The display order on the website should be the same than the
display on the various backend views.

This implies also fixing the order of:
- product.attribute
- product.attribute.value
- product.template.attribute.line
- product.template.attribute.value

The general order is now: (parent,) sequence, id.

Before, it was already a mix of those, but not always in the same order, and not
every key for every model. The name has been removed from the order: either we
sequence them correctly, or we want them in the creation order.

On the website, the first combination shown by the python should be the same as
the one that will be computed by the JS to prevent flickering.

Ideally there should be no RPC at page loading if the python has computed
everything correctly, but it is currently not possible to achieve because the
view logic for website_sale_stock is only in JS.

================================================================================

*** Fix product template and variant price computation ***

Move and improve the get_combination_info method:

- take into account tax included/excluded settings (B2B/B2C)
- take into account pricelist discount policy (striked price)
- fix inconsistencies when price after pricelist would be 0
- use proper rounding and discount compute with the currency helper methods
- fix an issue where context "partner" would have a mix of id and recordset

================================================================================

*** Fix currency conversions ***

The list_price and lst_price of a product are always encoded using the currency
of the product.

The results of "combination info" are always returned using the currency of the
pricelist if given, or the currency of the product.

The prices on an order (line) are encoded with the currency of its pricelist.

================================================================================

*** Fix dynamic variants access rights ***

Public users on the e-commerce should be able to create product variants if the
configuration of the attributes of the product template is set as "dynamic".

This uses "sudo" to bypass create security rules for public users.
Multiple checks are done to ensure that it creates a valid product variant.

================================================================================

*** Miscellaneous bugs, tracebacks and necessary improvements ***

In general:
 - correctly show warning when no variant is possible
 - don't let user add to cart an impossible variant (from optional product
 	modal or from any RPC), both in interface and controller logic
 - fix as much flickering as possible by correctly pre-computing in python/views
 - move business logic from controllers to models
 - correctly add no_variant and is_custom values on the SO line description

Sale order:
 - fix traceback when emptying the product_id field from configurator

website_sale:
 - correctly compute first image / carousel, and correctly swap images when
 	changing variants, without duplicate image or zoom problems
 - don't use list view of variants when it doesn't make sense
 - added missing product info when adding a no_variant attribute to cart
 - fix cart accessory product computation

website_sale_wishlist:
 - fix it with dynamic variants, no_variant and is_custom

website_sale_comparison:
 - fix it with dynamic variants (comparison and alternative products)

website_sale_stock:
 - fix it in general (some flickering still present)

================================================================================

Authored by @seb-odoo with contribution from @awa-odoo

task-1910821

closes odoo/odoo#28079
2018-12-18 16:21:32 +00:00
Sébastien Theys bb8e6e7a82 [IMP] product: improve variant demo data
Activate variant by default with demo data: since we have demo data creating
variants, the database will be more consistent if the option is also activated
by default. It also allows to gain time when making a demo or testing feature
using them on a new database.
2018-12-18 13:02:06 +00:00
Tejas Shahu c1a5221ba2 [IMP] product: Dyanamic d.p. on Volume field
Decimal precision for volume on products is always set to 2.
Some users that work on more precise volume would like to increase it.
In order to do it without customisation we add another system parameter
for Volume.
2018-12-11 16:09:55 +00:00
Aurélien Warnon 326dabce09 [IMP] product,(website_)sale: Product configurator naming/cleanup
Targets commit d3530eb07e

Purpose
=======

[Follow up AL review]
Code cleanup and some improved models naming for the product configurator feature (see targeted commit).
Mostly changes the "product.attribute" related models.

Updated models:

- "product.product.attribute.value" to "product.template.attribute.value"
- "product.attribute.filter.line" to "product.template.attribute.exclusion"
- "product.attribute.line" to "product.template.attribute.line"

Updated fields:

- [sale_order_line in sale/sale.py] "product_custom_variant_values" to "product_custom_attribute_value_ids"
- [product_template_attribute_value in product/product_attribute.py] excluded_for is now a o2m instead of a m2m
- [product.attribute in sale/product_product.py] "create_variant" field is now a Selection with "no_variant" (old false), "always" (old true), "dynamic" (new value)
- [product in product/product.py] "product_attribute_value_ids" to "product_template_attribute_value_ids"
2018-09-26 15:08:18 +02:00
Aurélien Warnon 856c2e9008 [IMP] product,(website_)sale: Move product options configurator into sale module
Task #1871557

Purpose
=======

- Configure a product from a sales order as easily as in the ecommerce
  The backend uses the same template as the frontend to configure a products and its options

- Display optionnal products of optionnal products in the "sale options" section

- Allow adding exlusions to some combinations of the product and/or
  to some combinations of the optionnal and accessory products

Specification
=============

PHASE I

1. Improve the "Add to cart" with optional products

- When you add an option to cart, move the product to the cart & show the options of this option
- Don't open the option wizard if no option available (in case this module becomes generic,
  it's better to skip this step when it's not needed)
- Display the options right under their related product in the cart

2. Do not allow to add the product as an optional product for itself
Why ?
- No functional sense
- Creates issues in the add to cart wizard

3. Exclude some attribute combinations within the product or with related options and accessory products

- Rename VARIANT PRICES button -> CONFIGURE VARIANTS
- When you click this button and select a value, open form view rather than inline edition
- Form view of variant values:
	- Attribute
	- Value
	- HTML Color Index
	- Attribute Price Extra
	- Not Compatible with: o2m tab with 2 fields: Product AND Attribute Value (of this product)
	  [m2m tag selection]
	- in any new line, autocomplete the current product by default
	- Tooltip: A list of product and attribute values that you want to exclude for
          this product's attribue value. Also applies on optionnal and accessory products.

4. New option to configure a product in a sales order line

- This option is only visible if the corresponding option is activated in the sales settings
- It opens a wizard to select a product template, configure related attribute values
  and select optional products (based on frontend view)
- Attributes not compatible with other selected attributes should not be selectable
- Must work like in the frontend
2018-09-25 18:39:32 +02:00
Yannick Tivisse 3031ab8f0f [IMP] mrp,purchase,pos: Improve demo data
SPECIFICATIONS
==============

PoS
---

https://drive.google.com/a/odoo.com/file/d/1BkVVQTR7V_kZpNsOO0CwqTQtxAH9boLB/view?usp=drivesdk
Add new products : Cola, Water, Orange Juice (+ images)
in internal category : All/Saleable/PoS
available in PoS

Traceability
------------

The [FURN_9666] Table (MTO) should be tracked by serial number
There should be one purchase order already received for 1 Table Top
There should be one purchase order already received for 4 Table legs
There should be one MO done for the table (consuming the products received in the PO you've created)
> The goal is to have a complete traceability report for one table
Delete SN/LN : https://drive.google.com/a/odoo.com/file/d/1cxdE-2laGYaZ2rnSFKjEbVg6k6MVyLdw/view?usp=drivesdk

Assign crm.lead to the admin user : when opening the pipe, there must be some leads and opportunities

Products
--------

https://drive.google.com/a/odoo.com/file/d/1qaO7MlufZbj7bw6z5S8DtmKPYiK0sQNK/view?usp=drivesdk
route buy should be ticked on pedal bin product

remove some ecommerce categories: https://drive.google.com/a/odoo.com/file/d/1sgIJE49BHVDcoF5CXngbJAvWb2fN_3Wk/view?usp=drivesdk
2018-07-17 17:37:42 +02:00
Yannick Tivisse 0b78516047 [FIX] website_sale_options: Declare the demo data in the correct module
Purpose
=======

A demo data is declared in an incorrect module.

website_sale_comparison declares the model and website_sale_options does not depend on that one (it works on the runbot by chance)

Specification
=============

Move the demo data to product and add its category in website_sale_options.
2018-07-16 13:18:54 +02:00
Yannick Tivisse edd8bad5d9 [IMP] product,...: Improve demo data
* Update demo data sheet for barcode
* Modify product "Book: Office Renovation for Dummies:
    - Name: "eBook: Office Renovation for Dummies"
    - Image:
    - Internal category: All/Services/Saleable
* Tips internal reference
* Product 10.0 % Discount =
    - Name : "10.0% discount on total amount" (no space between 0 and %)
    - Internal reference : 10PERCENTDISC
* Free product - large cabinet
    - Should be a stockable
    - in category All/Saleable/Office Furniture
    - Name : Free Gift - Pencil Holder
    - Picture
* Desk Customizable :
    - Change its website sequence (should be displayed first in the shop)
* https://github.com/odoo/odoo/pull/25263
* Need to clean attributes and attribute values and attribute categories :
    - Attributes, keep : Brand, Color, Dimensions, Legs, Weight
    - Attribute Category : Rename Storage into "Material"
* Events
    - Suppress Functional Webinar and Technical Training
* PoS Categories :
    - Suppress
    - Create PoS Category : Desks (put desks in it)
    - Create PoS Category : Chairs (put chairs in it)
    - Create PoS Category : Miscellaneous (and put all other products in it)
* Products available in PoS
    - Remove : Air Flight, Car Travel Expense, Bpost domestic bpack 24h pro, Bpost World Express Pro, Customer Care, DHL USA Delivery, DHL USA -> International, Deposit, Expenses, Fdex International, Fedexs US, Hotel Accomodation, Restaurant Expenses,
* Product:
    https://drive.google.com/a/odoo.com/file/d/1KjxcB88aDfe8qAzIpFlkBmMj5ekA9eIf/view?usp=drivesdk
    Timesheet : description to update https://docs.google.com/spreadsheets/d/1nB8l8pFcRXRFnudgDJVyZZp3McaHNovlyvY0jE1ZZ54/edit?usp=sharing
* Project : less projects, more tasks
    Remove "Internal - GAP Analysis", "Internal Projects"
    Rename Support into After-Sales Services
    Task to rename: Data import + Doc ==> Office planning
    Move the task Internal Training from "Support" to "Office Design"
* AGR Project : add the following tasks and link it to the right SO line
    Decoration : SO Line ==> Senior Architect
    Planning :  SO Line ==> Senior Architect
    Furniture  SO Line ==> Senior Architect
    Furniture Delivery : not linked to an SO line
* Marketing Automation
    Partnership offer ==> to rename into "Commercial prospection"
    Steps to rename:
        Offer free trial ==> Offer free catalog
        After 7 days (if not yet partners) ==> After 7 days (if not yet customers)
    Message for sale person ==> keep the same
* Mass mailings:
    http://nimb.ws/zrKsZ9
    http://nimb.ws/CbNpwd
* Events:
    Suppress Functional Webinar and Technical Training
    Tracks to update : https://docs.google.com/spreadsheets/d/1sKkJrltXY3Gz7ue3mVysZxaWGybKpx5fIhgUBnhbNDs/edit?usp=sharing
* Helpdesk
    Rename team into Customer Care
    Create 2 tickets in default team
    Urgent : Kitchen collapsing (assigned to admin) : link to the task  SO053: [SERV_585189] Customer Care (Prepaid Hours)
    No pririoty : Where can I download a catalog ? (not assigned).  Ticket type = question
2018-07-12 13:58:45 +02:00
Fabien Pinckaers bed29a4aea [IMP] product: Unify/Clean product demo data
PURPOSE
=======

1. Unified product demo data
2. Less demo: one per use case
3. Demo data for all models

Specification
=============

1. Refactor all the brol in the demo data
2. Adapt the tests to make them green, as some products are
   renamed, removed, created in python instead of as demo data
   ...
2018-07-05 08:57:41 +02:00
Martin Trigaux 4592567641 Revert "[IMP] product: set no company on demo data"
This reverts commit 861e21c612.

Failing test
While the purpose seems fine, it needs more work
2018-02-28 17:40:12 +01:00
Miquel Raïch 861e21c612 [IMP] product: set no company on demo data
demo products shouldn't have company if they will be used by other companies
Was the company of the administrator

Closes #21220
2018-02-28 17:33:22 +01:00
XavierDo 2966d4faed [IMP] product: rename product.uom into uom.uom
Also rename product.uom.categ into uom.category to
 give it a decent name.
2018-02-26 14:27:26 +01:00
XavierDo 6a378e3839 [IMP] product: move uom in a new addon
Moves UoM models, test and data to a new addon in
order to be able to use uom without product.
A simple example is be to be able to use UoM for
timesheets.

This commit only move code, and adapt xml ids
without chaging any feature or functionnal
behavior.
Note: 'product' module now depends on new
'uom' module.
2018-02-26 14:27:26 +01:00
Mehul Patel 257bf539d5 [IMP] sale_timesheet: add demo data
This commit adds demo data to populate
the project overview with billable
timesheet on sold projects and tasks.
This will ease the testing and reinforce
the wow effect during demonstration.

Note: those demo data should never be
involved in python test cases.

Closes #21132
2018-02-20 09:34:56 +01:00
Thibault Delavallée 4fd6945535 [REM] base, various: remove res.request.link
Not used since a while, remaining of old res.request. Requests have been
removed at 881a76dbcf . Links have been kept because still
used in some reference fields. It seems the last use was in OpenERP v9.0
in crm_claim module. As links are not used since a while let us get rid of
it.
2017-10-19 14:53:39 +02:00
Mansi Gandhi 5985860255 [IMP] mrp_repair: invoice method and reports
When you select an invoice method different than 'No Invoice', all the
parts lines except the 'Remove' ones and the fee lines will be invoiced.

When you print a quotation, the price of parts and fees is shown
only if you have an invoice method (you only have the quantity if you
don't invoice)

The invoice is available through a stat button.

The price of removed parts is set to 0.0 by default as it won't be
invoiced.
2017-03-22 16:56:04 +01:00
Fabien Pinckaers 511e025671 [IMP] product: fix demo data, no space at start of line in products descriptions 2016-12-22 15:07:23 -08:00
Jeremy Kersten 7d5751f2c5 [IMP] product: remove default property for sale_pricelist 2016-09-29 15:46:27 +02:00
This Is Banana a5e03c1bf4 [FIX] product: avoid having data depending on demo 2016-09-06 16:33:12 +02:00
Jeremy Kersten f2db00d7ac [IMP] website_sale: improve data to be multi currency, multi pricelist and fix tests according to new data 2016-09-06 13:59:35 +02:00
Jeremy Kersten fb860c11b5 [IMP] product, website_sale: add field sequence on pricelist.
Now that property is computed automatically.
In some case, the compute will take the first on available.
So, the order (sequence) allow to specify the priority.

Test from point of sale are base on currency $,
So we force for the test to use a pricelist in dollard (My company, Chicago)
2016-09-06 13:59:35 +02:00
Jeremy Kersten 53abb4a277 [REF] sale,product,website_sale: merge website.pricelist and product.pricelist
Make it generic... It is not only a concept to website !

Update tests
2016-09-06 13:59:35 +02:00
Thibault Delavallée 1aa5bc0fdf [MIG] product: migrate addon to new API 2016-08-01 15:05:33 +02:00
mdi-odoo 75867d7bf6 [MOV] product: reorganize addon directory 2016-08-01 12:13:08 +02:00