-
Notifications
You must be signed in to change notification settings - Fork 0
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
16.0 vsf redesign ala #15
Conversation
Renaming to have simpler name and be different from forked one.
Applying pre-commit rules and fixing bad code according to it.
Removing wkf from forked as it does nothing for us.
9fe40ae
to
1bdef4d
Compare
self.env, 1, 100, "", {}, name=self.product_tmpl_bin.name | ||
) | ||
# THEN | ||
self.assertEqual(res[0], self.product_tmpl_bin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be good to add test when searching by barcode or default code, not only name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to add a lot more tests. Original repo has 0 tests:)
yield parent | ||
parent = parent.parent_id | ||
|
||
def get_category_by_slug(self, slug): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_category_from_slug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually its named by
. Meaning get something by using something.
def _get_public_categ_slug(self, category_ids, category): | ||
category_ids.append(category.id) | ||
|
||
if category.parent_id: | ||
category_ids = self._get_public_categ_slug(category_ids, category.parent_id) | ||
|
||
return category_ids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is confusing, as it seems it has nothing to do with slug. Maybe just rename it to _get_category_with_parents
or sth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is leftover from fork. Actually I no longer use it. We can remove this confusing method entirely :)
).mapped("product_attribute_value_id") | ||
product.variant_attribute_value_ids = [(6, 0, attribute_values.ids)] | ||
|
||
variant_attribute_value_ids = fields.Many2many( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Field declarations should be before compute methods [docs]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, leftover
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I think I will remove this entirely as its kind of weird computation, which can also have big impact on performance and might not be very relevant.
This is a forked module previously called ``graphql_vuestorefront``. It is backwards incompatible module, so it should not be installed alongside ``graphql_vuestorefront``. Custom changes different than in forked module: * ``get_product_list`` in ``schemas.product`` now uses offset/limit in standard search instead of searching for all possible products and then slicing (which has terrible performance). * ``website_slug``: (renamed to ``slug``) got rid of translate awareness (to simplify it), and not adding slashes in slug, because slug is not supposed to have that. (on category, removed validation as it was forcing to use slash. Added unique constraint, because category slug can be entered manually). * Split odoo model files into more appropriate, to make it more readable and maintainable. * Removed ``public_categ_slug_ids`` field as it was confusing and redundant field that was very slow to compute for large amount of products. * implemented ``products`` ``category_slug`` filter. * moved Product schema domain method to ``product.template`` to be extendable. Addresses --------- * Moved address domain methods on ``res.partner`` to be extendable. * Moved preparation of partner (address) creation/update on ``res.partner to be extendable. Sale Order ---------- * Added UpdateOrder mutation to be able to update some data on sale order. Users ----- * Can pass extra data when signing up (only ``vat`` for now).
4857256
to
a01fd03
Compare
No description provided.