odoo13-addon-ddmrp 13.0.1.29.3__py3-none-any.whl → 13.0.1.29.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/ddmrp/__manifest__.py +1 -1
- odoo/addons/ddmrp/models/stock_buffer.py +34 -35
- {odoo13_addon_ddmrp-13.0.1.29.3.dist-info → odoo13_addon_ddmrp-13.0.1.29.5.dist-info}/METADATA +1 -1
- {odoo13_addon_ddmrp-13.0.1.29.3.dist-info → odoo13_addon_ddmrp-13.0.1.29.5.dist-info}/RECORD +6 -6
- {odoo13_addon_ddmrp-13.0.1.29.3.dist-info → odoo13_addon_ddmrp-13.0.1.29.5.dist-info}/WHEEL +1 -1
- {odoo13_addon_ddmrp-13.0.1.29.3.dist-info → odoo13_addon_ddmrp-13.0.1.29.5.dist-info}/top_level.txt +0 -0
@@ -192,10 +192,13 @@ class StockBuffer(models.Model):
|
|
192
192
|
def action_view_stock_demand_estimates(self):
|
193
193
|
result = self.env.ref("stock_demand_estimate.stock_demand_estimate_action")
|
194
194
|
action = result.read()[0]
|
195
|
+
locations = self.env["stock.location"].search(
|
196
|
+
[("id", "child_of", [self.location_id.id])]
|
197
|
+
)
|
195
198
|
recs = self.env["stock.demand.estimate"].search(
|
196
199
|
[
|
197
200
|
("product_id", "=", self.product_id.id),
|
198
|
-
("location_id", "
|
201
|
+
("location_id", "in", locations.ids),
|
199
202
|
]
|
200
203
|
)
|
201
204
|
action["domain"] = [("id", "in", recs.ids)]
|
@@ -921,13 +924,16 @@ class StockBuffer(models.Model):
|
|
921
924
|
rec.order_spike_threshold = 0.5 * rec.red_zone_qty
|
922
925
|
|
923
926
|
def _get_manufactured_bom(self):
|
927
|
+
locations = self.env["stock.location"].search(
|
928
|
+
[("id", "child_of", [self.location_id.id])]
|
929
|
+
)
|
924
930
|
return self.env["mrp.bom"].search(
|
925
931
|
[
|
926
932
|
"|",
|
927
933
|
("product_id", "=", self.product_id.id),
|
928
934
|
("product_tmpl_id", "=", self.product_id.product_tmpl_id.id),
|
929
935
|
"|",
|
930
|
-
("location_id", "
|
936
|
+
("location_id", "in", locations.ids),
|
931
937
|
("location_id", "=", False),
|
932
938
|
],
|
933
939
|
limit=1,
|
@@ -1320,6 +1326,15 @@ class StockBuffer(models.Model):
|
|
1320
1326
|
def _get_horizon_adu_past_demand(self):
|
1321
1327
|
return self.adu_calculation_method.horizon_past or 0
|
1322
1328
|
|
1329
|
+
def _get_dates_adu_past_demand(self, horizon):
|
1330
|
+
date_from = fields.Date.to_string(
|
1331
|
+
self.warehouse_id.wh_plan_days(datetime.now(), -1 * horizon)
|
1332
|
+
)
|
1333
|
+
date_to = fields.Date.to_string(
|
1334
|
+
self.warehouse_id.wh_plan_days(datetime.now(), -1)
|
1335
|
+
)
|
1336
|
+
return date_from, date_to
|
1337
|
+
|
1323
1338
|
def _past_demand_estimate_domain(self, date_from, date_to, locations):
|
1324
1339
|
self.ensure_one()
|
1325
1340
|
return [
|
@@ -1349,12 +1364,7 @@ class StockBuffer(models.Model):
|
|
1349
1364
|
horizon = self._get_horizon_adu_past_demand()
|
1350
1365
|
# today is excluded to be sure that is a past day and all moves
|
1351
1366
|
# for that day are done (or at least the expected date is in the past).
|
1352
|
-
date_from =
|
1353
|
-
self.warehouse_id.wh_plan_days(datetime.now(), -1 * horizon)
|
1354
|
-
)
|
1355
|
-
date_to = fields.Date.to_string(
|
1356
|
-
self.warehouse_id.wh_plan_days(datetime.now(), -1)
|
1357
|
-
)
|
1367
|
+
date_from, date_to = self._get_dates_adu_past_demand(horizon)
|
1358
1368
|
locations = self.env["stock.location"].search(
|
1359
1369
|
[("id", "child_of", [self.location_id.id])]
|
1360
1370
|
)
|
@@ -1380,6 +1390,14 @@ class StockBuffer(models.Model):
|
|
1380
1390
|
def _get_horizon_adu_future_demand(self):
|
1381
1391
|
return self.adu_calculation_method.horizon_future or 1
|
1382
1392
|
|
1393
|
+
def _get_dates_adu_future_demand(self, horizon):
|
1394
|
+
date_from = fields.Datetime.now()
|
1395
|
+
date_to = self.warehouse_id.wh_plan_days(date_from, horizon)
|
1396
|
+
date_to = date_to.replace(
|
1397
|
+
hour=date_from.hour, minute=date_from.minute, second=date_from.second,
|
1398
|
+
)
|
1399
|
+
return date_from, date_to
|
1400
|
+
|
1383
1401
|
def _future_demand_estimate_domain(self, date_from, date_to, locations):
|
1384
1402
|
self.ensure_one()
|
1385
1403
|
return [
|
@@ -1407,11 +1425,7 @@ class StockBuffer(models.Model):
|
|
1407
1425
|
def _calc_adu_future_demand(self):
|
1408
1426
|
self.ensure_one()
|
1409
1427
|
horizon = self._get_horizon_adu_future_demand()
|
1410
|
-
date_from =
|
1411
|
-
date_to = self.warehouse_id.wh_plan_days(date_from, horizon)
|
1412
|
-
date_to = date_to.replace(
|
1413
|
-
hour=date_from.hour, minute=date_from.minute, second=date_from.second,
|
1414
|
-
)
|
1428
|
+
date_from, date_to = self._get_dates_adu_future_demand(horizon)
|
1415
1429
|
locations = self.env["stock.location"].search(
|
1416
1430
|
[("id", "child_of", [self.location_id.id])]
|
1417
1431
|
)
|
@@ -1796,13 +1810,8 @@ class StockBuffer(models.Model):
|
|
1796
1810
|
return result
|
1797
1811
|
|
1798
1812
|
def action_view_past_adu(self):
|
1799
|
-
horizon = self.
|
1800
|
-
date_from =
|
1801
|
-
self.warehouse_id.wh_plan_days(datetime.now(), -1 * horizon)
|
1802
|
-
)
|
1803
|
-
date_to = fields.Date.to_string(
|
1804
|
-
self.warehouse_id.wh_plan_days(datetime.now(), -1)
|
1805
|
-
)
|
1813
|
+
horizon = self._get_horizon_adu_past_demand()
|
1814
|
+
date_from, date_to = self._get_dates_adu_past_demand(horizon)
|
1806
1815
|
locations = self.env["stock.location"].search(
|
1807
1816
|
[("id", "child_of", [self.location_id.id])]
|
1808
1817
|
)
|
@@ -1823,12 +1832,8 @@ class StockBuffer(models.Model):
|
|
1823
1832
|
return result
|
1824
1833
|
|
1825
1834
|
def action_view_future_adu(self):
|
1826
|
-
horizon = self.
|
1827
|
-
date_from =
|
1828
|
-
date_to = self.warehouse_id.wh_plan_days(date_from, horizon)
|
1829
|
-
date_to = date_to.replace(
|
1830
|
-
hour=date_from.hour, minute=date_from.minute, second=date_from.second,
|
1831
|
-
)
|
1835
|
+
horizon = self._get_horizon_adu_future_demand()
|
1836
|
+
date_from, date_to = self._get_dates_adu_future_demand(horizon)
|
1832
1837
|
locations = self.env["stock.location"].search(
|
1833
1838
|
[("id", "child_of", [self.location_id.id])]
|
1834
1839
|
)
|
@@ -1943,15 +1948,9 @@ class StockBuffer(models.Model):
|
|
1943
1948
|
def _values_source_location_from_route(self):
|
1944
1949
|
return {"warehouse_id": self.warehouse_id}
|
1945
1950
|
|
1946
|
-
def _source_location_from_route(self,
|
1947
|
-
"""Return the replenishment source location for distributed buffers
|
1948
|
-
|
1949
|
-
If no route is passed, it follows the source location of the rules of
|
1950
|
-
all the routes it finds until it can no longer find a path.
|
1951
|
-
If a route is passed, it stops at the final source location of the
|
1952
|
-
rules of this route only.
|
1953
|
-
"""
|
1954
|
-
current_location = self.location_id
|
1951
|
+
def _source_location_from_route(self, procure_location=None):
|
1952
|
+
"""Return the replenishment source location for distributed buffers"""
|
1953
|
+
current_location = procure_location or self.location_id
|
1955
1954
|
rule_values = self._values_source_location_from_route()
|
1956
1955
|
while current_location:
|
1957
1956
|
rule = self.env["procurement.group"]._get_rule(
|
{odoo13_addon_ddmrp-13.0.1.29.3.dist-info → odoo13_addon_ddmrp-13.0.1.29.5.dist-info}/RECORD
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
odoo/addons/ddmrp/README.rst,sha256=XNXcI9HhLckSPJ7I8n5QRc3807c8GaECWhoYol6o1So,12059
|
2
2
|
odoo/addons/ddmrp/__init__.py,sha256=nksc4q8fpyy8n5h1T3-Wl9lh_CpdgZj9bBt5fQGvW5Y,98
|
3
|
-
odoo/addons/ddmrp/__manifest__.py,sha256=
|
3
|
+
odoo/addons/ddmrp/__manifest__.py,sha256=HbBbN5SYlvjFc0Vo8owHR64S_CKclocPN9U33muqcLY,2483
|
4
4
|
odoo/addons/ddmrp/hooks.py,sha256=junTd_jCWr-VzCtrfXkXRIsvfs38rcc0gdzlpFz569o,3275
|
5
5
|
odoo/addons/ddmrp/data/decimal_precision_data.xml,sha256=mzYy_aam6bZLGPFl7HPhRv5XGTDCbHAKVZeAl0UYms4,528
|
6
6
|
odoo/addons/ddmrp/data/ir_cron.xml,sha256=sW-Y2O0ZfpxQ6IcOOMGzgPX2k-vnSJbKxdcRD_6ybhY,1510
|
@@ -32,7 +32,7 @@ odoo/addons/ddmrp/models/product_product.py,sha256=smTAvzvAyDqpPfgoTmRmrEeh-mk-2
|
|
32
32
|
odoo/addons/ddmrp/models/product_template.py,sha256=sUUZ8kO3V5Cd7phAopCtd_wuMS_7JUR1giVamnPrI54,975
|
33
33
|
odoo/addons/ddmrp/models/purchase_order.py,sha256=tyQvt50nbjZ9v1oij6haq7AcR81LfbTuM6Jv_A5Bsrk,3028
|
34
34
|
odoo/addons/ddmrp/models/res_company.py,sha256=8rRgjIAdiC8ODHNCtC1Mp2dwfkyhqCi1FrdLe20zZ7k,643
|
35
|
-
odoo/addons/ddmrp/models/stock_buffer.py,sha256=
|
35
|
+
odoo/addons/ddmrp/models/stock_buffer.py,sha256=jIwHhb7LpI9KmwcR57JyqJG-k3cIXmOJpMC6GHVgrXU,75157
|
36
36
|
odoo/addons/ddmrp/models/stock_buffer_profile.py,sha256=AYqenfaIX7asd5_x8n1tkjvuFP0yKLfDXRkW8PymxWg,2833
|
37
37
|
odoo/addons/ddmrp/models/stock_buffer_profile_lead_time.py,sha256=RaWVkX4YlXHULR93n1q8iKv0ldD-DP2VjVz9rqnls2s,570
|
38
38
|
odoo/addons/ddmrp/models/stock_buffer_profile_variability.py,sha256=MIUZEWw86lY6WE_xtdAQuKGVB6cUw5s6qLvuSiyKhBg,579
|
@@ -91,7 +91,7 @@ odoo/addons/ddmrp/wizards/make_procurement_buffer_view.xml,sha256=GWRsJWwB2wDlCe
|
|
91
91
|
odoo/addons/ddmrp/wizards/multi_level_mrp.py,sha256=3U3G6yZYxCc3O4bBddHMbrZ40J6EeXDCLbZd_q4hWnA,755
|
92
92
|
odoo/addons/ddmrp/wizards/res_config_settings.py,sha256=6LV2aUKLLFLhUNoDPvsG73E5ht_-uNOZlK2E0wvcYa0,1386
|
93
93
|
odoo/addons/ddmrp/wizards/res_config_settings_views.xml,sha256=aW-VYj96df_cGYCy-LFPMnazvnQI4nEL7rH7XbdFvoY,9555
|
94
|
-
odoo13_addon_ddmrp-13.0.1.29.
|
95
|
-
odoo13_addon_ddmrp-13.0.1.29.
|
96
|
-
odoo13_addon_ddmrp-13.0.1.29.
|
97
|
-
odoo13_addon_ddmrp-13.0.1.29.
|
94
|
+
odoo13_addon_ddmrp-13.0.1.29.5.dist-info/METADATA,sha256=iFbtN2X8QqcUDNaOgEf8T0hq7YEkcFGJu5p0bRZLjVw,12984
|
95
|
+
odoo13_addon_ddmrp-13.0.1.29.5.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
96
|
+
odoo13_addon_ddmrp-13.0.1.29.5.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
97
|
+
odoo13_addon_ddmrp-13.0.1.29.5.dist-info/RECORD,,
|
{odoo13_addon_ddmrp-13.0.1.29.3.dist-info → odoo13_addon_ddmrp-13.0.1.29.5.dist-info}/top_level.txt
RENAMED
File without changes
|