Skip to content

Commit

Permalink
[MIG] spreadsheet_oca: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoRomera committed Jul 26, 2024
1 parent ae924b6 commit b73f9ec
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion spreadsheet_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Spreadsheet Oca",
"summary": """
Allow to edit spreadsheets""",
"version": "16.0.1.3.0",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"author": "CreuBlanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/spreadsheet",
Expand Down
3 changes: 2 additions & 1 deletion spreadsheet_oca/models/ir_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def _build_bus_channel_list(self, channels):
model_name, "read", raise_exception=False
):
continue

Check warning on line 45 in spreadsheet_oca/models/ir_websocket.py

View check run for this annotation

Codecov / codecov/patch

spreadsheet_oca/models/ir_websocket.py#L45

Added line #L45 was not covered by tests
# If user don't have access to the model, we don't even try to read
# If user don't have access to the model, we don't
# even try to read

document = self.env[model_name].search(

Check warning on line 49 in spreadsheet_oca/models/ir_websocket.py

View check run for this annotation

Codecov / codecov/patch

spreadsheet_oca/models/ir_websocket.py#L49

Added line #L49 was not covered by tests
[("id", "=", res_id)], limit=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class SpreadsheetSpreadsheetImportMode(models.Model):
_name = "spreadsheet.spreadsheet.import.mode"
_description = "Import Mode"
_order = "sequence asc"
_order = "sequence asc, id"
_rec_name = "name"

sequence = fields.Integer(default=20)
Expand Down
2 changes: 1 addition & 1 deletion spreadsheet_oca/views/spreadsheet_spreadsheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<field name="action" ref="spreadsheet_spreadsheet_act_window" />
<field
name="web_icon"
>spreadsheet_oca,static/description/icon.svg</field>
>spreadsheet_oca,static/description/icon.png</field>
<field
name="groups_id"
eval="[(4, ref('spreadsheet_oca.group_user'))]"
Expand Down
12 changes: 8 additions & 4 deletions spreadsheet_oca/wizards/spreadsheet_spreadsheet_import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,31 @@
<field name="mode_id" widget="selection_badge" />
<field
name="name"
attrs="{'invisible': [('mode', '!=', 'new')], 'required': [('mode', '=', 'new')]}"
invisible="mode != 'new'"
required="mode == 'new'"
/>
<field name="datasource_name" required="1" />
<field name="mode" invisible="1" />
<field name="import_data" invisible="1" />
<field
name="spreadsheet_id"
domain="['|', ('owner_id', '=', uid), ('contributor_ids', '=', uid)]"
attrs="{'invisible': [('mode', 'not in', ['add', 'add_sheet'])], 'required': [('mode', 'in', ['add', 'add_sheet'])]}"
invisible="mode not in ['add', 'add_sheet']"
required="mode in ['add', 'add_sheet']"
options="{'no_create': True}"
/>
<field name="can_be_dynamic" invisible="1" />
<field name="is_tree" invisible="1" />
<field
name="dynamic"
force_save="1"
attrs="{'invisible': [('can_be_dynamic', '=', False)], 'readonly': [('is_tree', '=', True)]}"
invisible="not can_be_dynamic"
readonly="is_tree"
/>
<field
name="number_of_rows"
attrs="{'invisible': [('dynamic', '=', False)], 'required': [('dynamic', '=', True)]}"
invisible="not dynamic"
required="dynamic"
/>
</group>
</sheet>
Expand Down

0 comments on commit b73f9ec

Please sign in to comment.