Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0] saas_portal: Migrate to v12.0 #822

Open
wants to merge 1 commit into
base: 12.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions saas_portal/models/saas_portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from odoo import api, exceptions, fields, models
from odoo.tools import scan_languages
from odoo.tools.translate import _
from odoo.addons.base.res.res_partner import _tz_get
from odoo.addons.base.models.res_partner import _tz_get
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT

from odoo.addons.saas_base.exceptions import MaximumTrialDBException
Expand Down Expand Up @@ -288,7 +288,7 @@ def create_new_database(self, **kwargs):
@api.multi
def _create_new_database(self, dbname=None, client_id=None,
partner_id=None, user_id=None, notify_user=True,
trial=False, support_team_id=None, async=None):
trial=False, support_team_id=None, asynchronous=None):
hieuhani marked this conversation as resolved.
Show resolved Hide resolved
self.ensure_one()
p_client = self.env['saas_portal.client']
p_server = self.env['saas_portal.server']
Expand Down
17 changes: 10 additions & 7 deletions saas_portal/views/saas_portal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
<field name="expired" invisible="1"/>
<button name="%(action_edit_database)d" type="action"
icon="fa-sign-in" attrs="{'invisible':[('state', 'in', ['deleted', 'draft'])]}"
aria-label="Log in"
title="Log in"
help="Log in to client database."/>
<button name="show_upgrade_wizard" attrs="{'invisible':[('state', 'in', ['deleted'])]}" type="object" icon="fa-cogs" help="Configure client database"/>
<button name="delete_database_server" type="object" attrs="{'invisible':[('state', 'in', ['draft', 'deleted'])]}" icon="fa-eraser" help="Delete client database"
<button name="show_upgrade_wizard" attrs="{'invisible':[('state', 'in', ['deleted'])]}" type="object" icon="fa-cogs" title="Configure" aria-label="Configure" help="Configure client database"/>
<button name="delete_database_server" type="object" attrs="{'invisible':[('state', 'in', ['draft', 'deleted'])]}" icon="fa-eraser" title="Delete" aria-label="Delete" help="Delete client database"
confirm="Are you sure to delete this database?"/>
</tree>
</field>
Expand All @@ -48,13 +50,14 @@
<button string="Log in" name="%(action_edit_database)d" type="action"
attrs="{'invisible':[('state', 'in', ['deleted','draft'])]}"
icon="fa-sign-in" class="oe_highlight"
aria-label="Log in"
help="Log in to client database."
/>
<button string="Configure" name="show_upgrade_wizard" type="object" attrs="{'invisible':[('state', 'in', ['deleted','draft'])]}" icon="fa-cogs" />
<button string="Delete" name="delete_database_server" type="object" attrs="{'invisible':['|',('state', 'in', ['draft', 'deleted'])]}" icon="fa-eraser"
<button string="Configure" name="show_upgrade_wizard" type="object" attrs="{'invisible':[('state', 'in', ['deleted','draft'])]}" aria-label="Configure" icon="fa-cogs" />
<button string="Delete" name="delete_database_server" type="object" attrs="{'invisible':['|',('state', 'in', ['draft', 'deleted'])]}" aria-label="Delete" icon="fa-eraser"
confirm="Are you sure to delete this database?"/>
<button string="Sync server" type="object" name="action_sync_server" icon="fa-refresh"/>
<button string="Sync client" type="object" name="sync_client" icon="fa-refresh"/>
<button string="Sync server" type="object" name="action_sync_server" aria-label="Synchronize server" icon="fa-refresh"/>
<button string="Sync client" type="object" name="sync_client" aria-label="Synchronize client" icon="fa-refresh"/>
<button name="%(saas_portal.action_rename_database)d" string="Rename Database" type="action"/>
<field name="state" widget="statusbar" statusbar_visible="open,pending,deleted" clickable=""/>
</header>
Expand Down Expand Up @@ -104,7 +107,7 @@
<separator/>
<field name="partner_id" string="Contact" filter_domain="[('partner_id', 'child_of', self)]"/>
<group expand="0" string="Group By">
<filter string="Plan" domain="[]" context="{'group_by':'plan_id'}"/>
<filter string="Plan" name="plan" domain="" context="{'group_by':'plan_id'}"/>
</group>
</search>
</field>
Expand Down
2 changes: 1 addition & 1 deletion saas_portal/wizard/config_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def apply(self):
user_id=self.user_id.id,
notify_user=self.notify_user,
support_team_id=self.support_team_id.id,
async=self.async_creation,
asynchronous=self.async_creation,
trial=self.trial)
if self.async_creation:
return
Expand Down