changeset 0f55aab5e813 in modules/product:default
details: https://hg.tryton.org/modules/product?cmd=changeset&node=0f55aab5e813
description:
        Use order_code when ordering on rec_name

        issue11833
        review412121003
diffstat:

 product.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r d310fc6d024e -r 0f55aab5e813 product.py
--- a/product.py        Thu Oct 27 13:24:21 2022 +0200
+++ b/product.py        Thu Oct 27 13:53:05 2022 +0200
@@ -166,7 +166,7 @@
     @classmethod
     def order_rec_name(cls, tables):
         table, _ = tables[None]
-        return [table.code, table.name]
+        return cls.order_code(tables) + [table.name]
 
     def get_rec_name(self, name):
         if self.code:
@@ -543,7 +543,7 @@
                 }
         else:
             template = tables['template']
-        return [product.code] + Template.name.convert_order('name',
+        return cls.order_code(tables) + Template.name.convert_order('name',
             tables['template'], Template)
 
     def get_rec_name(self, name):

Reply via email to