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

Fix double data elements #26

Closed
wants to merge 1 commit into from
Closed

Conversation

flachica
Copy link
Contributor

No description provided.

r"\t\t<field name=\2domain_force\2>"
r"['|',('company_id','=',False),"
r"('company_id', 'in', company_ids)]</field>\n",
r"src_model": "binding_model"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move to a separate PR

<record id="action_order_custom_field_a" model="ir.actions.act_window">
<field name="name">Custom field A</field>
<field name="res_model">sale.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('custom_field','=','a')]</field>
</record>
</data>

<data noupdate="1">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good test

<record name="demo_category" model="product.category">
<field name="name">My Demo Category</field>
</record>
</data>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the solution don't add <data> until we have <data noupdate="1"> in the source?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better in another PR. This one was not thought out all that well. But it was fixing an important bug

@flachica flachica changed the title Fix multi company style and double data elements Fix double data elements Oct 18, 2020
@flachica
Copy link
Contributor Author

Push forced

@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<data noupdate="0">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You add noupdate="0" here, but not in result xml. Why?

@@ -25,9 +25,10 @@
r"\.sudo\((?P<user>[^/)]+?)\)": r".with_user(\g<user>)",
r"\.suspend_security": ".sudo",
r"\"base_suspend_security\",\n": "",
r"self.env.user.company_id": r"self.env.company"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better in a separate PR with a link to commit in odoo/odoo

r"( |\t)*<openerp>(\n| |\t)*<data>": "<odoo>",
r"( |\t)*<\/data>(\n| |\t)*<\/openerp>": "</odoo>",
r"( |\t)*<openerp>": "<odoo>",
r"( |\t)*<\/openerp>": "</odoo>",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fine. It fixes cases when we have

<data noupdate="1">
</data>

@yelizariev
Copy link
Member

Also, you have conflicts in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants