From d0e0d7d5752164190dbccc686e2e877b45d13e7a Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Fri, 15 Dec 2017 02:14:07 +0100 Subject: [PATCH] Add stock_consignment patches: issue7011.diff and issue7012.diff --- issue7011.diff | 12 ++++++++++++ issue7012.diff | 14 ++++++++++++++ series | 3 +++ 3 files changed, 29 insertions(+) create mode 100644 issue7011.diff create mode 100644 issue7012.diff diff --git a/issue7011.diff b/issue7011.diff new file mode 100644 index 0000000..b60a70f --- /dev/null +++ b/issue7011.diff @@ -0,0 +1,12 @@ +diff -r c5fad88f4be1 stock.py +--- a/trytond/trytond/modules/stock_consignment/stock.py Mon Oct 30 15:55:27 2017 +0100 ++++ b/trytond/trytond/modules/stock_consignment/stock.py Fri Dec 15 02:05:38 2017 +0100 +@@ -107,7 +107,7 @@ + + def get_invoice_line_consignment(self): + if (self.from_location.type == 'supplier' +- and self.to_location.type == 'storage' ++ and self.to_location.type in ('storage', 'production') + and self.from_location.consignment_party): + return self._get_supplier_invoice_line_consignment() + elif (self.from_location.type == 'storage' diff --git a/issue7012.diff b/issue7012.diff new file mode 100644 index 0000000..708923c --- /dev/null +++ b/issue7012.diff @@ -0,0 +1,14 @@ +diff -r c5fad88f4be1 stock.py +--- a/trytond/trytond/modules/stock_consignment/stock.py Mon Oct 30 15:55:27 2017 +0100 ++++ b/trytond/trytond/modules/stock_consignment/stock.py Fri Dec 15 02:05:29 2017 +0100 +@@ -291,6 +291,10 @@ + @classmethod + def __setup__(cls): + super(OrderPoint, cls).__setup__() ++ cls.storage_location.domain = ['OR', ++ cls.storage_location.domain, ++ ('type', '=', 'supplier'), ++ ] + cls.provisioning_location.domain = ['OR', + cls.provisioning_location.domain, + ('type', '=', 'supplier'), diff --git a/series b/series index c1162e6..a6d8a3c 100644 --- a/series +++ b/series @@ -68,3 +68,6 @@ issue6836.diff # [sale] [sale_price_list] [purchase] - Recompute unit price when issue6896.diff # [sale_credit_limit] - Use quantity sold and invoiced to compute credit amount issue6931.diff # [stock] - Complete Inventory discards inactive products on update issue6845-issue5613.diff # [commission] Missing agent type domain on sale and invoice + Remove old usage of out_credit_note + +issue7011.diff # [stock_consignment] stock_consignment should create invoices for moves that go to a production location +issue7012.diff # [stock_consignment] Allow to create internal order points to provision supplier consignment locations