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

[FIX] purchase_stock: AVCO computation - support line discount #79

Open
wants to merge 17 commits into
base: 16.0-alc_master
Choose a base branch
from

Commits on May 4, 2023

  1. [IMP] product_expiry: Don't trigger move lines expiration date recomp…

    …utation
    
    If one change the use_create_lots field on stock.picking.type, we should not trigger
    all move lines recomputation of that picking type.
    rousseldenis committed May 4, 2023
    Configuration menu
    Copy the full SHA
    a2b8a4f View commit details
    Browse the repository at this point in the history

Commits on May 15, 2023

  1. Add some type annotations

    sbidoul authored and lmignon committed May 15, 2023
    Configuration menu
    Copy the full SHA
    d98c706 View commit details
    Browse the repository at this point in the history
  2. Annotate Field descriptors

    sbidoul authored and lmignon committed May 15, 2023
    Configuration menu
    Copy the full SHA
    410c639 View commit details
    Browse the repository at this point in the history
  3. Init comodel_name on relational fields from generic type's arg

    This change allows to take advantage of field descriptors on relational fields to initialize the comodel_name from optional type's arg that can be specified on field declaration. With this change, this kind of syntax becomes valid and will avoid errors in the comodel_name args.
    
    partner = fields.Many2one[Partner]()
    
    This code is not part of the _Relational class constructor since we need to get access to the __orig_class__ attribute which is set on the instance by the Generic metaclass after the call to the _Relational class constructor.
    lmignon committed May 15, 2023
    Configuration menu
    Copy the full SHA
    59a521f View commit details
    Browse the repository at this point in the history
  4. Take into account FrowardRef when computing the comodel_name

    To avoid circular import it's common to reference a type as a string for generics:
    
    ```python
    from odoo import models, fields
    
    from typing import TYPE_CHECKING
    
    if TYPE_CHECKING:
        from .res_partner import Partner as ResPartner
    
    class Thing(models.Model):
    
        _name = "thing"
        _description = "Thing"
    
        partner_id = fields.Many2one["ResPartner"]()
    
    ```
    
    In such a case, the type's arg at runtime is not a class but an instance of typing.ForwadRef. In such a case, the comodel_name is computed by converting the classname provided by te ForwardRef from CamelCase to dot.case
    lmignon committed May 15, 2023
    Configuration menu
    Copy the full SHA
    4f1c9b2 View commit details
    Browse the repository at this point in the history
  5. Add typing_extension to the requirements list

    the typing_extension is required by the type annotations
    lmignon committed May 15, 2023
    Configuration menu
    Copy the full SHA
    8b4b7df View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d23a4ce View commit details
    Browse the repository at this point in the history
  7. Fix code after rebase on odoo at 2f22565

    Calls a dedicated method to clone an existing field to ensure that the type args is preserved when instantiating the cloned instance
    lmignon committed May 15, 2023
    Configuration menu
    Copy the full SHA
    ffae38c View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. [FIX] core: importlib find_module is deprecated

    As find_module has been deprecated since python 3.4:
    
    https://github.com/python/cpython/blob/05c28b08f6e2fc8782472b026c98a3fdd61a2ba9/Lib/importlib/_bootstrap.py#L1347
    
    and warnings added in python 3.10:
    
    https://github.com/python/cpython/blob/f91dfdf5ff9f68a4b012e1b70ab9997c6dc1542d/Lib/importlib/_bootstrap.py#L764
    
    to respect the PEP-451 specification : https://peps.python.org/pep-0451/
    
    So, override the find_spec() method to display depreaction warnings if applicable.
    rousseldenis committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    2efccd4 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2023

  1. Configuration menu
    Copy the full SHA
    71c6ae2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f3da532 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c93418d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5900b59 View commit details
    Browse the repository at this point in the history
  5. setup: support PEP 660 and setuptools >= 64

    Allow building a wheel or an sdist through the pep517
    interface, taking care of the required pre-processing
    to copy addons in odoo/addons.
    
    Force the setuptools compat mode for editable installs.
    This mode is the simplest, since it just installs a .pth
    files which extends PYTHONPATH with the Odoo root directory.
    sbidoul authored and rousseldenis committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    d295879 View commit details
    Browse the repository at this point in the history
  6. core: add odoo.__main__

    This allows launching Odoo with "python -m odoo".
    
    This manner of launching python applications is now widespread.
    In particular it makes it easier to configure an IDE debugger to run with the correct python version.
    sbidoul authored and rousseldenis committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    283f501 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6768b10 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2023

  1. Configuration menu
    Copy the full SHA
    fa6ad36 View commit details
    Browse the repository at this point in the history