Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions product_catalog_tree/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,8 @@ def _inverse_catalog_values(self, product_catalog_qty):

order = self.env[res_model].browse(order_id)
for rec in self:
# Actualizar la información de la línea de orden
order.with_company(order.company_id)._update_order_line_info(rec.id, product_catalog_qty)

# Si la cantidad es mayor a 0, recalcular precios y descuentos
if product_catalog_qty > 0:
order_lines = order.order_line.filtered(lambda line: line.product_id.id == rec.id)
if order_lines:
# Tomamos la última línea en caso de que haya varias
order_line = order_lines[-1]
# Ejecutar el método que recalcula linea
order_line._compute_price_unit_and_date_planned_and_name()

def increase_quantity(self):
for rec in self:
rec._inverse_catalog_values(rec.product_catalog_qty + 1)
Expand Down