Skip to content

Commit

Permalink
Fix pre-commit errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ellbristow committed May 14, 2024
1 parent 5e09e2e commit 4cccd52
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
4 changes: 2 additions & 2 deletions product_simple_variant_builder/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"summary": """
Simple wizard to build dynamic variants from a product template""",
"author": "Glo Networks",
"website": "https://glo.systems",
"website": "https://github.com/GlodoUK/stock-delivery",
"category": "Inventory",
"version": "17.0.1.0.0",
"depends": ["product", "product_variant_configurator"],
Expand All @@ -13,5 +13,5 @@
"views/product_template_view.xml",
],
"demo": [],
"license": "Other proprietary",
"license": "AGPL-3",
}
3 changes: 3 additions & 0 deletions product_simple_variant_builder/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8' ?>
<odoo>
<record id="product_template_only_form_view" model="ir.ui.view">
<field name="name">product_template_only_form_view</field>
Expand All @@ -7,9 +7,12 @@
<field name="arch" type="xml">
<xpath expr="//page[@name='variants']" position="inside">
<field name="has_configurable_attributes" invisible="1" />
<button name="%(wizard_simple_create_variant_action)d" type="action"
<button
name="%(wizard_simple_create_variant_action)d"
type="action"
string="Create Variant"
attrs="{'invisible': [('has_configurable_attributes', '=', False)]}" />
attrs="{'invisible': [('has_configurable_attributes', '=', False)]}"
/>
</xpath>
</field>
</record>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8' ?>
<odoo>
<record id="wizard_simple_create_variant_form" model="ir.ui.view">
<field name="name">wizard_create_variant_form</field>
Expand All @@ -14,18 +14,28 @@
<tree editable="top" create="false" delete="false">
<field name="attribute_id" readonly="1" force_save="1" />
<field name="required" readonly="1" force_save="1" />
<field name="attribute_value_ids" widget="many2many_tags" invisible="1" />
<field name="selected_value_ids"
<field
name="attribute_value_ids"
widget="many2many_tags"
invisible="1"
/>
<field
name="selected_value_ids"
attrs="{'required': [('required', '=', True)]}"
widget="many2many_tags"
domain="[('id', 'in', attribute_value_ids or [])]"
options="{'no_create': True}" />
options="{'no_create': True}"
/>
</tree>
</field>
</sheet>
<footer>
<button string="Create Variants" name="action_create_variants" type="object"
class="btn-primary" />
<button
string="Create Variants"
name="action_create_variants"
type="object"
class="btn-primary"
/>
<button string="Cancel" class="btn-secondary" special="cancel" />
</footer>
</form>
Expand Down

0 comments on commit 4cccd52

Please sign in to comment.