summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/hr_contract/tests/test_auto_status.py3
-rw-r--r--addons/stock_account/models/stock_config_settings.py3
-rw-r--r--addons/website_sale/models/product.py2
3 files changed, 2 insertions, 6 deletions
diff --git a/addons/hr_contract/tests/test_auto_status.py b/addons/hr_contract/tests/test_auto_status.py
index 010524924d3..fb755bdb82f 100644
--- a/addons/hr_contract/tests/test_auto_status.py
+++ b/addons/hr_contract/tests/test_auto_status.py
@@ -14,8 +14,7 @@ class TestHrContracts(TransactionCase):
self.test_contract = dict(name='Test', wage=1, employee_id=self.employee.id, state='open')
def apply_cron(self):
- self.env.ref('hr_contract.ir_cron_data_contract_update_to_pending').method_direct_trigger()
- self.env.ref('hr_contract.ir_cron_data_contract_update_to_close').method_direct_trigger()
+ self.env.ref('hr_contract.ir_cron_data_contract_update_state').method_direct_trigger()
def test_contract_enddate(self):
self.test_contract.update(dict(date_end=datetime.now() + relativedelta(days=100)))
diff --git a/addons/stock_account/models/stock_config_settings.py b/addons/stock_account/models/stock_config_settings.py
index 2ffbeb108f8..c2f60ecc29f 100644
--- a/addons/stock_account/models/stock_config_settings.py
+++ b/addons/stock_account/models/stock_config_settings.py
@@ -9,6 +9,3 @@ class StockConfigSettings(models.TransientModel):
module_stock_landed_costs = fields.Boolean("Landed Costs",
help="Affect landed costs on receipt operations and split them among products to update their cost price.")
-
- if self.user_has_groups('stock.group_stock_manager') and self.user_has_groups('base.group_system'):
- self = self.sudo() \ No newline at end of file
diff --git a/addons/website_sale/models/product.py b/addons/website_sale/models/product.py
index d9a7beccc95..d5ea40a9eeb 100644
--- a/addons/website_sale/models/product.py
+++ b/addons/website_sale/models/product.py
@@ -142,7 +142,7 @@ class ProductTemplate(models.Model):
# This makes sure that every template below has a corresponding product in the zipped result.
self = self.filtered('product_variant_id')
# use mapped who returns a recordset with only itself to prefetch (and don't prefetch every product_variant_ids)
- for template, product in zip(self, self.mapped('product_variant_id')):
+ for template, product in pycompat.izip(self, self.mapped('product_variant_id')):
template.website_price = product.website_price
template.website_public_price = product.website_public_price