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

16.0 vsf redesign ala #15

Merged
merged 5 commits into from
Dec 14, 2023
Merged

16.0 vsf redesign ala #15

merged 5 commits into from
Dec 14, 2023

Conversation

oerp-odoo
Copy link

No description provided.

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.
@oerp-odoo oerp-odoo force-pushed the 16.0-vsf-redesign-ala branch from 9fe40ae to 1bdef4d Compare December 8, 2023 14:16
self.env, 1, 100, "", {}, name=self.product_tmpl_bin.name
)
# THEN
self.assertEqual(res[0], self.product_tmpl_bin)

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?

Copy link
Author

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):

Choose a reason for hiding this comment

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

get_category_from_slug

Copy link
Author

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.

Comment on lines 32 to 38
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

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.

Copy link
Author

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(

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]

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, leftover

Copy link
Author

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).
@oerp-odoo oerp-odoo force-pushed the 16.0-vsf-redesign-ala branch from 4857256 to a01fd03 Compare December 14, 2023 11:30
@oerp-odoo oerp-odoo merged commit 8cdc527 into 16.0-versada Dec 14, 2023
1 check passed
@oerp-odoo oerp-odoo deleted the 16.0-vsf-redesign-ala branch December 14, 2023 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants