-
Notifications
You must be signed in to change notification settings - Fork 69
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
[14.0][ADD]deltatech product tracking #262
base: 14.0
Are you sure you want to change the base?
Conversation
Atentie, daca se schimba in template-ul de produs trasabilitatea, nu intra prin functia write din varianta. |
Putem face si asta destul de repede? |
…gu/deltatech into 14.0-add-deltatech_product_tracking
_inherit = "product.template" | ||
|
||
def write(self, vals): | ||
res = super(ProductTemplate, self).write(vals) |
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.
Ar trebui sa filtram template si product inainte si sa rulam doar pentru alea, nu pentru toate:
def write(self, vals):
templates_without_lot = self.filtered(lambda p: p.tracking == "none")
res = super(ProductTemplate, self).write(vals)
if templates_without_lot and vals.get("tracking", "none") == "lot":
templates_without_lot.mapped("product_variant_ids").fill_lot_in_stock_docs()
return res
@@ -17,61 +30,63 @@ def onchange_tracking(self): | |||
def write(self, vals): |
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.
la fel si aici:
def write(self, vals):
products_without_lot = self.filtered(lambda p: p.tracking == "none")
res = super(ProductProduct, self).write(vals)
if products_without_lot and vals.get("tracking", "none") == "lot":
products_without_lot.fill_lot_in_stock_docs()
return res
domain = [("lot_id", "=", False)] + domain | ||
st_move_lines = self.env["stock.move.line"].search(domain) | ||
def fill_lot_in_stock_docs(self): | ||
warehouses = self.env["stock.warehouse"].with_context(active_test=False).search([]) |
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.
gasim o varinate pe history, sa actualizam si quant-uri di nalte locatii, adica daca avem transfer prin transit, si quant-urile sunt in tranzit in momentul asta...
Pare ok. |
…com/dhongu/deltatech into 14.0-add-deltatech_product_tracking
@feketemihai ce mai trebuie aici ? |
Salut, nu mai stiu daca e la fel cu ce e in
https://github.com/NextERP-Romania/war_optimization/tree/14.0/deltatech_product_tracking,
dar undeva isi pierde loturile, adica daca ai receptii neprocesate, dar
pentru care ai deja lot_name completat, noi nu mai verificam asta,
verificam doar lot_id, si atunci le suprascriem...
Cu respect,
Mihai Fekete
NextERP Romania S.R.L.
600B, Peciu Nou, Romania
E-mail: ***@***.***
Telefon: 0788-749989
Website: https://nexterp.ro
…On Fri, Nov 19, 2021 at 10:57 AM Dorin Hongu ***@***.***> wrote:
@feketemihai <https://github.com/feketemihai> ce mai trebuie aici ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#262 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2MDKZREALTPL4YIFOYLZTUMYGODANCNFSM5A72VN4A>
.
|
…atech_product_tracking
…ing' into 14.0-add-deltatech_product_tracking
No description provided.