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

[WIP] Split beesdoo_product #264

Closed

Conversation

carmenbianca
Copy link
Collaborator

WIP PR to split beesdoo_product into sale_suggested_price and product_label, although I suspect that it will be split up into more modules than two.

Some misc notes:

  • Updated black because it would complain on me otherwise.

  • Should this not be product_suggested_price?

  • Make category product_margin default value configurable?

  • main_seller_id was used in a view, but is no longer available to this module.

  • There's a views/point_of_sale_view.xml file, but point_of_sale is not a dependency. Should there be a module sale_suggested_price_point_of_sale or some such that exists solely to add the view iff point_of_sale is installed?

The previous version of black had a bug where the following list:

foo = [
    1,
    2,
]

would be formatted as:

foo = [1, 2,]

which caused flake8 to complain. The new version doesn't have this
problem.

Signed-off-by: Carmen Bianca Bakker <[email protected]>
The new module more or less works after this commit. beesdoo_product has
not been tested, and is probably in a bad way from this invasive
surgery. That's OK---it will recover from this.

Signed-off-by: Carmen Bianca Bakker <[email protected]>
@carmenbianca
Copy link
Collaborator Author

Some notes on converting beesdoo_product into product_labe;. beesdoo_product contains considerably more functionality than suggested in #247. It contains:

  • beesdoo.product.hazard:
    • Model with a name and type.
  • product.template:
    • Labels (but different model structure from grap/product_label). Eco, local, fair, origin.
    • FDS (SDS in English?) label, which I believe is a hazard label, but it has a hazard label as well.
    • Setting main seller res.partner
    • display_unit, default_reference_unit, and display_weight to (I guess?) use a different uom internally and in outward views?
    • Calculating total prices with VAT. Also a deposit price.
    • Some interaction with printing labels?
    • Adding notes (comments)
    • Adding sell-before and best-before date
    • An ingredients field
    • Something to do with scales, scale categories, and scale labels?
    • Creating barcodes?
  • beesdoo.scale.category
    • This entire model, which has a name and code
  • beesdoo.product.label:
    • The labels described in product.template. name, type, and colour code.
  • product.supplierinfo:
    • Price field added
  • uom.category:
    • Type added? Not sure what this is. Unit, weight, time, distance, surface, volume, other.
  • A bit of JavaScript code that interacts with the POS. Not sure what it does.
  • Views:
    • Apart from adding fields to views…
    • Invoice policy is made invisible in sale.product_template_form_view_invoice_policy. Not sure why.
    • purchase_method, route_ids, and property_account_creditor_price_difference made invisible in product.product_template_only_form_view. Also not sure why.

I think that's fairly comprehensive. I'm not sure whether it's sensible to put all of that in product_label, but I'm not familiar enough with the codebase to make a good call on what to split where.

@robinkeunen
Copy link
Member

Cool, we'll make that call together when we get to this module. The main point of the exercise now is to evaluate how long and complex the migration script will (not) be so that we can plan the project with @polchampion

@robinkeunen robinkeunen marked this pull request as draft February 2, 2022 14:12
@robinkeunen
Copy link
Member

robinkeunen commented Feb 21, 2022

@carmenbianca can you ?

  • close this issue (we will open a new one when we reach this in the todo list)
  • add the list of feature you identified to the module readme
  • push it on 12.0

carmenbianca added a commit to carmenbianca/Obeesdoo that referenced this pull request Feb 28, 2022
List extracted from analysis done in
<beescoop#264>.

Signed-off-by: Carmen Bianca Bakker <[email protected]>
carmenbianca added a commit that referenced this pull request Mar 7, 2022
List extracted from analysis done in
<#264>.

Signed-off-by: Carmen Bianca Bakker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants