[IMP] various improvment from Yajo.
parent
3b172ff276
commit
74159600bc
|
@ -19,17 +19,11 @@ class UpgradeAttribute(models.Model):
|
|||
|
||||
def _compute_is_oca_module(self):
|
||||
for module in self:
|
||||
if "/OCA/" in module.website:
|
||||
module.is_oca_module = True
|
||||
else:
|
||||
module.is_oca_module = False
|
||||
module.is_oca_module = "/OCA/" in module.website
|
||||
|
||||
def _compute_is_odoo_module(self):
|
||||
for module in self:
|
||||
module_path = get_module_path(module.name)
|
||||
absolute_repo_path = os.path.split(module_path)[0]
|
||||
x, relative_repo_path = os.path.split(absolute_repo_path)
|
||||
if relative_repo_path == "addons":
|
||||
module.is_odoo_module = True
|
||||
else:
|
||||
module.is_odoo_module = False
|
||||
module.is_odoo_module = relative_repo_path == "addons"
|
||||
|
|
|
@ -15,6 +15,7 @@ class UpgradeAttribute(models.Model):
|
|||
|
||||
record_id = fields.Many2one(
|
||||
comodel_name="upgrade.record",
|
||||
index=True,
|
||||
ondelete="CASCADE",
|
||||
readonly=True,
|
||||
)
|
||||
|
|
|
@ -67,9 +67,9 @@ class UpgradeComparisonConfig(models.Model):
|
|||
"params": {
|
||||
"type": "info",
|
||||
"message": _(
|
||||
"You are correctly connected to the server {server}"
|
||||
" (version {version}) with the user {user_name}"
|
||||
).format(
|
||||
"You are correctly connected to the server %(server)s"
|
||||
" (version %(version)s) with the user %(user_name)s"
|
||||
) % dict(
|
||||
server=self.server,
|
||||
version=self.version,
|
||||
user_name=user_info["name"],
|
||||
|
|
|
@ -29,8 +29,8 @@ class TestUpgradeAnalysis(common.TransactionCase):
|
|||
)
|
||||
|
||||
wizard.select_other_modules()
|
||||
self.assertTrue(
|
||||
self.product_module.id not in wizard.module_ids.ids,
|
||||
self.assertFalse(
|
||||
self.product_module.id in wizard.module_ids.ids,
|
||||
"Select Other module should not select 'product' module",
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue