From b0b215d05175e9edf03fcce7f49146c328a63a3f Mon Sep 17 00:00:00 2001 From: Raimon Esteve Date: Mon, 2 Mar 2020 15:33:44 +0100 Subject: [PATCH] issue9103.diff # [trytond] User-defined reports for custom template extensions --- issue9103.diff | 18 ++++++++++++++++++ series | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 issue9103.diff diff --git a/issue9103.diff b/issue9103.diff new file mode 100644 index 0000000..8543d62 --- /dev/null +++ b/issue9103.diff @@ -0,0 +1,18 @@ +diff --git a/trytond/trytond/pool.py b/trytond/trytond/pool.py +index 9e195ab0..4f7ea490 100644 +--- a/trytond/trytond/pool.py ++++ b/trytond/trytond/pool.py +@@ -182,6 +182,13 @@ class Pool(object): + cls = builtins.type(str(name), (Report,), {}) + cls.__setup__() + self.add(cls, type) ++ for mixins in self.classes_mixin.values(): ++ for parent, mixin in mixins: ++ if (not issubclass(cls, parent) or issubclass(cls, mixin)): ++ continue ++ cls = builtins.type(cls.__name__, (mixin, cls), {}) ++ self.add(cls, type=type) ++ cls = self._pool[self.database_name][type][name] + return cls + elif name[:15] == 'babi_execution_': + with Transaction(new=True).start(self.database_name, 0, readonly=False): diff --git a/series b/series index 8580d9d..ca266e6 100644 --- a/series +++ b/series @@ -76,4 +76,5 @@ statement_of_account.diff # [account] Cumulate balance of previous fiscal years # issue260381003_284691002.diff # Update cost of moves when recomputing product cost price # issue8690.diff # Set company context in product instance product_cost_fifo.diff # [product_cost_fifo] Use round in compute_qty of move_qty -stock_supply.diff # [stock_supply] Force rounding in the quantity of internal shipment moves +stock_supply.diff # [stock_supply] Force rounding in the quantity of internal shipment moves +issue9103.diff # [trytond] User-defined reports for custom template extensions