diff --git a/cooperator_eater/__manifest__.py b/cooperator_eater/__manifest__.py
index 129d820c6..1378df95a 100644
--- a/cooperator_eater/__manifest__.py
+++ b/cooperator_eater/__manifest__.py
@@ -4,10 +4,9 @@
"author": "BEES coop, Coop IT Easy SC",
"website": "https://github.com/beescoop/Obeesdoo",
"category": "Cooperative management",
- "version": "12.0.1.1.0",
+ "version": "16.0.1.0.0",
"depends": [
"eater",
- "cooperator",
"partner_contact_birthdate",
"cooperator_worker",
],
diff --git a/cooperator_eater/demo/product_share.xml b/cooperator_eater/demo/product_share.xml
index d1fe936ea..1eb14c7e4 100644
--- a/cooperator_eater/demo/product_share.xml
+++ b/cooperator_eater/demo/product_share.xml
@@ -1,14 +1,10 @@
-
+
3
-
+
2
-
- -1
-
-
diff --git a/cooperator_eater/models/subscription_request.py b/cooperator_eater/models/subscription_request.py
index 70b1de98a..762209f00 100644
--- a/cooperator_eater/models/subscription_request.py
+++ b/cooperator_eater/models/subscription_request.py
@@ -16,7 +16,6 @@ def get_eater_vals(self, partner, share_product_id):
return {"eater": eater}
- @api.multi
def validate_subscription_request(self):
self.ensure_one()
diff --git a/cooperator_eater/tests/test_eaters.py b/cooperator_eater/tests/test_eaters.py
index 664b687a4..d45d1df69 100644
--- a/cooperator_eater/tests/test_eaters.py
+++ b/cooperator_eater/tests/test_eaters.py
@@ -15,27 +15,17 @@ class TestEaters(TestWorkerBase):
@classmethod
def setUpClass(cls):
super().setUpClass()
- cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
partner_obj = cls.env["res.partner"]
ptemplate_obj = cls.env["product.template"]
- cls.eater_1 = partner_obj.create(
- {"name": "Eater 1", "customer": True, "eater": "eater"}
- )
- cls.eater_2 = partner_obj.create(
- {"name": "Eater 2", "customer": True, "eater": "eater"}
- )
- cls.eater_3 = partner_obj.create(
- {"name": "Eater 3", "customer": True, "eater": "eater"}
- )
- cls.eater_4 = partner_obj.create(
- {"name": "Eater 4", "customer": True, "eater": "eater"}
- )
+ cls.eater_1 = partner_obj.create({"name": "Eater 1", "eater": "eater"})
+ cls.eater_2 = partner_obj.create({"name": "Eater 2", "eater": "eater"})
+ cls.eater_3 = partner_obj.create({"name": "Eater 3", "eater": "eater"})
+ cls.eater_4 = partner_obj.create({"name": "Eater 4", "eater": "eater"})
cls.cooperator_x.eater = "worker_eater"
cls.cooperator_y.eater = "worker_eater"
- cls.cooperator_z.eater = "worker_eater"
cls.worker_share = ptemplate_obj.create(
{
@@ -110,16 +100,16 @@ def test_share_with_no_eater_assignment_allowed(self):
"""
Test that share that doesn't allow eater assignment.
"""
- self.share_z.max_nb_eater_allowed = 0
+ self.share_x.max_nb_eater_allowed = 0
max_eater_error_msg = "You can only set 0 additional eaters per worker"
with self.assertRaisesRegex(ValidationError, max_eater_error_msg):
- self.cooperator_z.write({"child_eater_ids": [(4, self.eater_1.id)]})
+ self.cooperator_x.write({"child_eater_ids": [(4, self.eater_1.id)]})
with self.assertRaisesRegex(ValidationError, max_eater_error_msg):
- self.eater_1.write({"parent_eater_id": self.cooperator_z.id})
+ self.eater_1.write({"parent_eater_id": self.cooperator_x.id})
- def test_get_eater_vals_returns_share_zonfiguration(self):
+ def test_get_eater_vals_returns_share_configuration(self):
partner = self.env["res.partner"].create(
{
"name": "Partner with birthdate set",
diff --git a/cooperator_eater/views/product_template_views.xml b/cooperator_eater/views/product_template_views.xml
index 2b97a92d8..2a0d73644 100644
--- a/cooperator_eater/views/product_template_views.xml
+++ b/cooperator_eater/views/product_template_views.xml
@@ -1,19 +1,17 @@
-
- product.template.share.form
+
+ product_template_form_view
product.template
-
+
-
+
+
-
-
-