Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.0] [ADD] sale_order_variant_mgmt #343

Merged
merged 4 commits into from
Oct 12, 2016

Conversation

pedrobaeza
Copy link
Member

@pedrobaeza pedrobaeza commented Sep 29, 2016

WIP until OCA/web#427 is merged.

There are 2 pendings PRs from Odoo to make this completely worked. See known issues section.

Handle easily multiple variants on Sales Orders

This module allows to add/modify of all the variants of a product in a direct
screen without the need of handling them one by one

Configuration

  • Configure your user to have any permission from "Sales" group.
  • Create a product with 2 attributes and several values.

Usage

  • Go to Sales > Sales > Quotations
  • Create a new quotation or edit an existing one.
  • Press "Add variants" button located in the upper right corner of the
    "Order Lines" tab.
  • A new screen will appear allowing you to select the products that have
    variants.
  • Once you select the product, a 2D matrix will appear with the first
    attribute values as columns and the second one as rows.
  • If there are already order lines for the product variants, the current
    quantity will be pre-filled in the matrix.
  • Change the quantities for the variant you want and click on "Transfer to
    order"
  • Order lines for the variants will be created/removed to comply with the
    input you have done.

As extra feature for saving steps, there's also a button on each existing line
that corresponds to a variant that opens the dialog directly with the product
selected.

Known issues / Roadmap

pedrobaeza and others added 2 commits September 16, 2016 15:11
===============================================
Handle easily multiple variants on Sales Orders
===============================================

This module allows to add/modify of all the variants of a product in a direct
screen without the need of handling them one by one

Configuration
=============

* Configure your user to have any permission from "Sales" group.
* Create a product with 2 attributes and several values.

Usage
=====

* Go to Sales > Sales > Quotations
* Create a new quotation or edit an existing one.
* Press "Add variants" button located in the upper right corner of the
  "Order Lines" tab.
* A new screen will appear allowing you to select the products that have
  variants.
* Once you select the product, a 2D matrix will appear with the first
  attribute values as columns and the second one as rows.
* If there are already order lines for the product variants, the current
  quantity will be pre-filled in the matrix.
* Change the quantities for the variant you want and click on "Transfer to
  order"
* Order lines for the variants will be created/removed to comply with the
  input you have done.

As extra feature for saving steps, there's also a button on each existing line
that corresponds to a variant that opens the dialog directly with the product
selected.
@pedrobaeza pedrobaeza changed the title 9.0 sale order variant mgmt [9.0] [ADD] sale_order_variant_mgmt Sep 30, 2016
@pedrobaeza
Copy link
Member Author

@hbrunn, this is the module where the 2D matrix widget is used.

@pedrobaeza
Copy link
Member Author

cc @Tecnativa

Copy link
Member

@atchuthan atchuthan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in Runbot 👍

Copy link
Member

@atchuthan atchuthan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedrobaeza
Copy link
Member Author

@atchuthan, that's due to the related odoo bugs. Please see the README and the first comment in this PR.

@atchuthan
Copy link
Member

@pedrobaeza sorry, I missed the README and thanks for pointing out.

Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very useful!

# This field is for avoiding conflicts with sale_stock module, that
# adds product_tmpl_id, and its possible modifications. This field name
# for sure won't conflict
product_tmpl_id_sale_order_variant_mgmt = fields.Many2one(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain? The sale order line's product_tmpl_id is a related field on the line's product's template id, just like this one. Logic wise, it seems safe to assume the field is not customized further. What is the problem then with using this existing field?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a long history: this field is used in product configurator modules that have a common abstract model using product_tmpl_id field as a regular field. sale_stock_screws up this, so I need to fix it through the glue module https://github.com/odoomrp/odoomrp-wip/tree/8.0/sale_stock_product_variants. I don't want to need another glue module, and as this is only a wildcard field, it doesn't matter the name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification!

@StefanRijnhart StefanRijnhart merged commit e2e2d62 into OCA:9.0 Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants