Open
Conversation
6b4adfd to
b979984
Compare
bealdav
commented
Aug 9, 2024
| @@ -0,0 +1,2 @@ | |||
| * Akretion | |||
| * David BEAL <david.beal@akretion.com> | |||
| class StockQuant(models.Model): | ||
| _inherit = "stock.quant" | ||
|
|
||
| warehouse_id = fields.Many2one(store=True, index=True) |
Member
Author
There was a problem hiding this comment.
Il me semble cela peut etre pénalisant au niveau perf de storer ce champ !?
|
|
||
| def _set_account_stock_valuation(self, company_string_id): | ||
| self = self.env.ref(company_string_id) | ||
| value, attach = self._get_stock_valuation_another() |
Member
Author
There was a problem hiding this comment.
Suggested change
| value, attach = self._get_stock_valuation_another() | |
| value, attach = self._get_stock_valuation() |
| ) | ||
| attach.res_id = move.id | ||
|
|
||
| def _get_stock_valuation_another(self): |
Member
Author
There was a problem hiding this comment.
Suggested change
| def _get_stock_valuation_another(self): | |
| def _get_stock_valuation(self): |
| warehouse_id = warehouse_quantities[i] | ||
| quantity = warehouse_quantities[i + 1] | ||
| warehouse_id = self.env["stock.warehouse"].browse(warehouse_id) | ||
| vals[f"qté_{warehouse_id.name}"].append(round(quantity)) |
Member
Author
There was a problem hiding this comment.
Suggested change
| vals[f"qté_{warehouse_id.name}"].append(round(quantity)) | |
| vals[f"qty_{warehouse_id.code}"].append(round(quantity)) |
|
|
||
| # TODO quand la valeur est < cost_vs_purchase_threshold % de ce seuil | ||
| # mettre une colonne 'check' à la valeur 1 | ||
| vals["valeur"].append( |
Member
Author
There was a problem hiding this comment.
Suggested change
| vals["valeur"].append( | |
| vals["value"].append( |
| <odoo noupdate="1"> | ||
|
|
||
| <record id="stock_account_valuation_main_company" model="ir.cron"> | ||
| <field name="name">Stock Valorisation</field> |
Member
Author
There was a problem hiding this comment.
Suggested change
| <field name="name">Stock Valorisation</field> | |
| <field name="name">Stock Situation</field> |
| ["product_id", "warehouse_id", "quantity"], | ||
| ["product_id", "warehouse_id"], | ||
| lazy=False, | ||
| ) |
Member
Author
There was a problem hiding this comment.
Du coup je ne pense pas kil faut utiliser le read_group vu que c pas top de stocker le warehouse ds les locations.
Tu pourrais modifier la PR en ce sens ?
| # mettre une colonne 'check' à la valeur 1 | ||
| vals["valeur"].append( | ||
| round( | ||
| max( |
Member
Author
There was a problem hiding this comment.
Suggested change
| max( | |
| product.standard_price |
| prices[product] and prices[product].price or 0 * coef / 100, | ||
| ) | ||
| * product["quantity"] | ||
| ) |
Member
Author
There was a problem hiding this comment.
Ne pas mettre les lignes dessus de 136 à ici , je reverrai plus tard.
8210887 to
f46bf86
Compare
71a6485 to
aa0da11
Compare
This file contains hidden or 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
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.