profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/ernestotejeda/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Ernesto Tejeda ernestotejeda Tecnativa

ernestotejeda/account-analytic 0

Odoo Account Analytic Related Addons

ernestotejeda/account-invoicing 0

Odoo Invoicing Extension Addons

ernestotejeda/crm 0

Odoo CRM, Mail & Newsletter advanced features

ernestotejeda/e-commerce 0

Odoo E-Commerce server automation addons

ernestotejeda/eficent-odoo-addons 0

Eficent's Odoo addons

ernestotejeda/knowledge 0

Odoo Document & Knowledge Management

ernestotejeda/maintainer-tools 0

Odoo Maintainers Tools & conventions for OCA members which evaluate and maintain repositories.

ernestotejeda/odoo 0

Odoo. Open Source Apps To Grow Your Business.

ernestotejeda/OpenUpgrade 0

Open source upgrade path for Odoo/OpenERP

ernestotejeda/product-attribute 0

Odoo Product Attribute

push eventTecnativa/purchase-workflow

Ernesto Tejeda

commit sha 867cc5674efc9a0f8dcf579daae0c4b913f50b9a

[ADD] purchase_order_supplierinfo_update: new module

view details

push time in 3 days

pull request commentOCA/purchase-workflow

[13.0][ADD] purchase_order_supplierinfo_update: new module

@carlosdauden @legalsylvain @AlvaroTForgeFlow @JordiBForgeFlow changes done.

I have used the same _select_seller method of product.product , what do you think @carlosdauden

ernestotejeda

comment created time in 3 days

pull request commentOCA/purchase-workflow

[13.0][ADD] purchase_order_supplierinfo_update: new module

Hello. We have been testing the code and, while it works fine for single-product orders, it doesn't seem to work for multi-product orders. ..

@AlvaroTForgeFlow could you test that use case again to see if it still does'n work fine, thanks

ernestotejeda

comment created time in 3 days

PullRequestReviewEvent

Pull request review commentOCA/purchase-workflow

[13.0][ADD] purchase_order_supplierinfo_update: new module

+# Copyright 2021 Tecnativa - Ernesto Tejeda+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).++from odoo import api, models+++class PurchaseOrder(models.Model):+    _inherit = "purchase.order"++    def write(self, vals):

@carlosdauden check the changes I made regarding this, please.

ernestotejeda

comment created time in 3 days

Pull request review commentOCA/purchase-workflow

[13.0][ADD] purchase_order_supplierinfo_update: new module

+# Copyright 2021 Tecnativa - Ernesto Tejeda+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).++from odoo import api, models+++class PurchaseOrder(models.Model):+    _inherit = "purchase.order"++    def write(self, vals):+        res = super().write(vals)+        if vals.get("state", "") in ["purchase", "done"]:+            self.mapped("order_line").update_supplierinfo_prince()+        return res+++class PurchaseOrderLine(models.Model):+    _inherit = "purchase.order.line"++    @api.model_create_multi+    def create(self, vals_list):+        res = super().create(vals_list)+        res.update_supplierinfo_prince()+        return res++    def write(self, vals):+        res = super().write(vals)+        if vals.get("price_unit"):+            self.update_supplierinfo_prince()+        return res++    def update_supplierinfo_prince(self):+        for line in self.filtered(lambda r: r.order_id.state in ["purchase", "done"]):+            domain = [+                ("partner_id", "=", line.partner_id.id),+                ("product_id", "=", line.product_id.id),+                ("date_order", ">", line.date_order),+            ]+            if not self.env["purchase.order.line"].search(domain, limit=1):+                # The same domain used in purchase.order.line to suggest the price.+                # see _suggest_quantity method in models/purchase.py of odoo core+                # purchase module.+                supplierinfo = self.product_id.seller_ids.filtered(+                    lambda r: (+                        r.name == self.order_id.partner_id+                        and (not r.product_id or r.product_id == self.product_id)+                    )+                ).sorted(key=lambda r: r.min_qty)+                if supplierinfo and line.price_unit != supplierinfo[0].price:

@legalsylvain I have extract the supplierinfo update in a separate method to make it extensible as you suggested, could you check it, please?

ernestotejeda

comment created time in 3 days

PullRequestReviewEvent

pull request commentOCA/purchase-workflow

[13.0][ADD] purchase_order_supplierinfo_update: new module

One suggestion to make module modular.

A general question. i see this module very similar to account_invoice_supplier_info_update, but the design is completely different. In the other module, we have a wizard that display differences, and we can update (or remove some lines we don't want to update). In your implementation, that's not possible. I see it as a limitation, and also something quite dangerous. (update automatically data without saying the update to the user).

I understand that Odoo make that for creation, but update is something more sensible.

what your point of view ?

did you thought to intherit from account_invoice_supplierinfo_update to reuse wizard and algorighm ?

Ref module : https://github.com/OCA/account-invoicing/tree/12.0/account_invoice_supplierinfo_update#readme

kind regards.

Sylvain thank you very much for your suggestion. I think you can do a PR to incorporate the functionality of the wizard, but that must be optional per company since our client wants it to be done automatically.

ernestotejeda

comment created time in 3 days

Pull request review commentOCA/purchase-workflow

[13.0][ADD] purchase_order_supplierinfo_update: new module

+# Copyright 2021 Tecnativa - Ernesto Tejeda+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).++from odoo import api, models+++class PurchaseOrder(models.Model):+    _inherit = "purchase.order"++    def write(self, vals):+        res = super().write(vals)+        if vals.get("state", "") in ["purchase", "done"]:+            self.mapped("order_line").update_supplierinfo_prince()

done

ernestotejeda

comment created time in 3 days

PullRequestReviewEvent

push eventTecnativa/purchase-workflow

Ernesto Tejeda

commit sha 241fcb0d0085679ee3b228ee82f29b3a7668398b

[ADD] purchase_order_supplierinfo_update: new module

view details

push time in 3 days

PullRequestReviewEvent

PR opened OCA/purchase-workflow

[13.0][ADD] purchase_order_supplierinfo_update: new module

Cc @Tecnativa TT31625

This module extends the functionality of purchase to allow the price of the supplier-info to be updated automatically for each product of the a purchase when it is confirmed. This will allow that when a purchase order is created that the suggested price for those products is the last one purchased.

+728 -0

0 comment

12 changed files

pr created time in 9 days

pull request commentOCA/stock-logistics-workflow

[13.0][ADD] purchase_stock_picking_invoice_link

.vscode file removed

ernestotejeda

comment created time in 15 days

push eventTecnativa/stock-logistics-workflow

David Alonso // Solvos

commit sha 6f1380283f7b862d04aea439b32bd740520a409e

[MIG] purchase_stock_picking_invoice_link: Migration to 13.0

view details

push time in 15 days

pull request commentOCA/stock-logistics-workflow

[13.0][ADD] purchase_stock_picking_invoice_link

@chienandalu travis and runbot are red

ernestotejeda

comment created time in 17 days

PR opened OCA/edi

[FIX] edi_voxel_account_invoice: send button not shown in posted invoices.

Cc @Tecnativa TT31685

Attending issue https://github.com/OCA/edi/issues/440

ping @carlosdauden

+1 -1

0 comment

1 changed file

pr created time in 18 days

create barnchTecnativa/edi

branch : 13.0-fix-edi_voxel_account_invoice

created branch time in 18 days

PullRequestReviewEvent

Pull request review commentOCA/partner-contact

13.0 mig partner default sale discount

+# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).++{+    "name": "Default sales discount per partner",+    "version": "13.0.1.0.1",+    "category": "Partner Management",+    "license": "AGPL-3",+    "author": "Tecnativa, " "Odoo Community Association (OCA)",
    "author": "Tecnativa, Odoo Community Association (OCA)",
alexeirivera87

comment created time in 18 days

Pull request review commentOCA/partner-contact

13.0 mig partner default sale discount

+# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).++{+    "name": "Default sales discount per partner",+    "version": "13.0.1.0.1",
    "version": "13.0.1.0.0",
alexeirivera87

comment created time in 18 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

pull request commentOCA/product-pack

13.0

This PR should be closed, this modules is already migrated to v13.0. Ping @pedrobaeza

ebelrose

comment created time in 18 days

PullRequestReviewEvent

push eventTecnativa/stock-logistics-workflow

sergio-teruel

commit sha 6699defcd098ac29dc3c6912113d0b345a8cfd19

[FIX] stock_picking_show_return: Use Form in tests to avoid crash test due to this Odoo commit https://github.com/OCA/OCB/commit/8ca10a8f39c6e6b8647a695aa543f008f01ba034

view details

sergio-teruel

commit sha 20c821292a9b9000518551d820b9a90a7828f05c

[FIX] stock_picking_return_restricted_qty: Use Form in tests to avoid crash test due to this Odoo commit https://github.com/OCA/OCB/commit/8ca10a8f39c6e6b8647a695aa543f008f01ba034

view details

Pedro M. Baeza

commit sha d3ac5b43efd96479969d724a3904f68451104656

Merge pull request #886 from Tecnativa/13.0-stock-return-fix-tests [13.0][FIX] stock return picking fix tests.

view details

cubells

commit sha d9e9b6829550a70bda0ca91722fbd9a5b3f231e6

[ADD] purchase_stock_picking_invoice_link: linking purchases, pickings and invoices

view details

Dimitrios T. Tanis

commit sha 6fbc4480dd753a5b96e65b5a3c2cea080f522cce

[MIG] purchase_stock_picking_invoice_link: : Migration to 12.0

view details

Ernesto Tejeda

commit sha 86d98fadb5b4ffc594839007d6fa0179fa5c0c96

[IMP] purchase_stock_picking_invoice_link: black, isort, prettier

view details

David Alonso // Solvos

commit sha b484fa293ec5e9cb2469813bb9a75a5f454f1b3b

[MIG] purchase_stock_picking_invoice_link: Migration to 13.0

view details

push time in 19 days

pull request commentOCA/stock-logistics-reporting

[13.0][ADD] stock_inventory_valuation_pivot

@carlosdauden changes done

ernestotejeda

comment created time in 19 days

push eventTecnativa/stock-logistics-reporting

Ernesto Tejeda

commit sha bd4a4fc1bbec03a4e3fa0ef843d70506b9b5b95d

[ADD] stock_inventory_valuation_pivot

view details

push time in 19 days