-
Notifications
You must be signed in to change notification settings - Fork 1
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
jbaudoux
wants to merge
17
commits into
acsone:16.0-alc_master
Choose a base branch
from
jbaudoux:16.0-alc-fix-avco
base: 16.0-alc_master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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.
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.
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
the typing_extension is required by the type annotations
Calls a dedicated method to clone an existing field to ensure that the type args is preserved when instantiating the cloned instance
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.
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.
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.
Can this be considered an Odoo bug? @jbaudoux |
Definitely an odoo bug to report to odoo. They should also fix their 2
todos in the buggy method.
Fyi, i also spotted that it does not properly support multi company.
Le ven. 1 déc. 2023, 17:44, Stéphane Bidoul ***@***.***> a
écrit :
… Can this be considered an Odoo bug? @jbaudoux
<https://github.com/jbaudoux>
—
Reply to this email directly, view it on GitHub
<#79 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3Q6ZMPSQEOZNYVSTEM5TTYHICPFAVCNFSM6AAAAABABZWJPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZWGQ2DENRTHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
lmignon
force-pushed
the
16.0-alc_master
branch
from
February 21, 2024 12:45
0835045
to
8a7a95d
Compare
rousseldenis
force-pushed
the
16.0-alc_master
branch
from
July 2, 2024 16:06
43d1550
to
146c83b
Compare
lmignon
force-pushed
the
16.0-alc_master
branch
2 times, most recently
from
July 16, 2024 14:19
14694ea
to
982f767
Compare
lmignon
force-pushed
the
16.0-alc_master
branch
from
September 26, 2024 15:21
982f767
to
667bcad
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.