[REF] website: rename website.redirect,type to redirect_type
Part of odoo/odoo#27599 to rename fields named 'type' which may conflict closes odoo/odoo#28112
This commit is contained in:
committed by
Martin Trigaux
parent
b6c3ad1b8d
commit
2924b77b6f
@@ -1210,7 +1210,7 @@ class WebsiteRedirect(models.Model):
|
||||
_order = "sequence, id"
|
||||
_rec_name = 'url_from'
|
||||
|
||||
type = fields.Selection([('301', 'Moved permanently (301)'), ('302', 'Moved temporarily (302)')], string='Redirection Type', required=True)
|
||||
redirect_type = fields.Selection([('301', 'Moved permanently (301)'), ('302', 'Moved temporarily (302)')], string='Redirection Type', required=True, oldname='type')
|
||||
url_from = fields.Char('Redirect From', required=True)
|
||||
url_to = fields.Char('Redirect To', required=True)
|
||||
website_id = fields.Many2one('website', 'Website')
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<field name="url_to"/>
|
||||
|
||||
<group string="Group By">
|
||||
<filter string="Redirection Type" name="group_by_type" domain="[]" context="{'group_by': 'type'}"/>
|
||||
<filter string="Redirection Type" name="group_by_type" domain="[]" context="{'group_by': 'redirect_type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -94,7 +94,7 @@
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="type"/>
|
||||
<field name="redirect_type"/>
|
||||
<field name="url_from"/>
|
||||
<field name="url_to"/>
|
||||
</group>
|
||||
@@ -113,7 +113,7 @@
|
||||
<field name="model">website.redirect</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Website Redirects" editable="bottom">
|
||||
<field name="type"/>
|
||||
<field name="redirect_type"/>
|
||||
<field name="url_from"/>
|
||||
<field name="url_to"/>
|
||||
<field name="website_id" options="{'no_create': True}" groups="website.group_multi_website"/>
|
||||
|
||||
Reference in New Issue
Block a user