mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
IMP sale_planner Fake objects now return False for any attribute they don't implement.
This commit is contained in:
@@ -78,6 +78,9 @@ class FakePartner():
|
|||||||
|
|
||||||
return self.date_localization
|
return self.date_localization
|
||||||
|
|
||||||
|
def __getattr__(self, item):
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
class FakeOrderLine():
|
class FakeOrderLine():
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
@@ -108,6 +111,9 @@ class FakeOrderLine():
|
|||||||
"""
|
"""
|
||||||
return qty
|
return qty
|
||||||
|
|
||||||
|
def __getattr__(self, item):
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
class FakeSaleOrder():
|
class FakeSaleOrder():
|
||||||
"""
|
"""
|
||||||
@@ -149,6 +155,10 @@ class FakeSaleOrder():
|
|||||||
def _compute_amount_total_without_delivery(self):
|
def _compute_amount_total_without_delivery(self):
|
||||||
return self.amount_total
|
return self.amount_total
|
||||||
|
|
||||||
|
def __getattr__(self, item):
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def distance(lat_1, lon_1, lat_2, lon_2):
|
def distance(lat_1, lon_1, lat_2, lon_2):
|
||||||
R = 6373.0
|
R = 6373.0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user