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

11.0 mig mass editing #1048

Closed
wants to merge 65 commits into from
Closed

Conversation

jnegrete
Copy link

No description provided.

SerpentCS and others added 30 commits November 10, 2017 09:42
…w when we define it, is why that I remove the tag type in the view to avoid that server shows us a warning
Fixes OCA#15
Check that `domain[2]` is `str` because in some cases it's an `int` and `list`
operations don't work on `int`s.
bealdav and others added 14 commits November 10, 2017 09:42
This resulted in frontend searching for ` tree` view, which of course does not exist.
Without this patch, if you created a mass editing definition that included a *2many object and then opened the wizard, you got this exception:

    Uncaught TypeError: Cannot read property 'list' of undefined

    http://localhost/web/static/src/js/views/form_view.js:488
    Traceback:
    TypeError: Cannot read property 'list' of undefined
        at http://localhost/web/static/src/js/views/form_view.js:488:30
        at Function._.each._.forEach (http://localhost/web/static/lib/underscore/underscore.js:150:9)
        at http://localhost/web/static/src/js/views/form_view.js:486:19
        at Function._.each._.forEach (http://localhost/web/static/lib/underscore/underscore.js:150:9)
        at Class._build_onchange_specs (http://localhost/web/static/src/js/views/form_view.js:473:11)
        at Class.do_onchange (http://localhost/web/static/src/js/views/form_view.js:523:18)
        at Array.<anonymous> (http://localhost/web/static/src/js/views/form_view.js:377:26)
        at fire (http://localhost/web/static/lib/jquery/jquery.js:3119:58)
        at Object.fireWith [as resolveWith] (http://localhost/web/static/lib/jquery/jquery.js:3231:49)
        at Object.<anonymous> (http://localhost/web/static/lib/jquery/jquery.js:3360:58)
* Made Mass Editing module v10 compatible
* Mass Editing module v10 translations
* Update ir_model_fields.py
* [FIX] mass_editing v10 port openerp->odoo
* [FIX] pep8
* [FIX] remove no-longer supported auto_refresh in view
* [FIX] View

* [FIX] viewing in community
Without this fix, it is impossible to uninstall an addon that removes a model for which we had a `mass.object`.
Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

Could you explain why are you removing all things related to ir.values?

Also, squash all translation-related commits together and fix Travis please.

'author': 'Serpent Consulting Services Pvt. Ltd., '
'Tecnativa, '
'Odoo Community Association (OCA)',
'contributors': [
'Oihane Crucelaegui <oihanecrucelaegi@gmail.com>',
'Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>',
'Jay Vora <jay.vora@serpentcs.com>'
'Jay Vora <jay.vora@serpentcs.com>',
'Juan Negrete <jnegrete@casasalce.com>'
Copy link
Member

Choose a reason for hiding this comment

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

Contributors nowadays go into README, this part can be dropped from here.

@@ -7,6 +6,5 @@ def uninstall_hook(cr, registry):
cr.execute("""SELECT id FROM ir_act_window
WHERE res_model = 'mass.editing.wizard'""")
for res in cr.dictfetchall():
value = 'ir.actions.act_window,%s' % res.get('id')
cr.execute("DELETE FROM ir_values WHERE value = %s", (value, ))
cr.execute("DELETE FROM ir_act_window WHERE id = '%s'" % res.get('id'))
Copy link
Member

Choose a reason for hiding this comment

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

  1. Is this needed? Doesn't Odoo by itself automatically remove tables when an addon is uninstalled?
    • Yes: Add a docstring on why.
    • No: remove it.
  2. This query is a little bit.... well, not KISS. Just DELETE FROM ir_act_window WHERE res_model = 'mass.editing.wizard' and you're done

@@ -238,7 +238,7 @@ def create(self, vals):
self._context.get('active_ids')):
model_obj = self.env[self._context.get('active_model')]
values = {}
for key, val in vals.items():
for key, val in list(vals.items()):
Copy link
Member

Choose a reason for hiding this comment

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

why?

@@ -208,7 +208,7 @@ def fields_view_get(self, view_id=None, view_type='form', toolbar=False,
'colspan': '4',
})
# Patch fields with required extra data
for field in all_fields.values():
for field in list(all_fields.values()):
Copy link
Member

Choose a reason for hiding this comment

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

why?

@yajo yajo added this to the 11.0 milestone Nov 13, 2017
@jnegrete
Copy link
Author

jnegrete commented Nov 13, 2017 via email

@@ -9,8 +9,7 @@
'contributors': [
Copy link
Member

Choose a reason for hiding this comment

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

Please remove the key and move contributors to README

@CasVissers-360ERP
Copy link

CasVissers-360ERP commented Nov 15, 2017

I ran a functional test everything worked fine untill I tried to edit some values:

TypeError: val is null

https://xxx.odoo.com/web/content/960-ac050f6/web.assets_backend.js:1245
Traceback:
_parseServerData/<@https://xxx.odoo.com/web/content/960-ac050f6/web.assets_backend.js:1245:545
_.forEach@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:12:558
_parseServerData@https://xxx.odoo.com/web/content/960-ac050f6/web.assets_backend.js:1245:288
_fetchRecord/<@https://xxx.odoo.com/web/content/960-ac050f6/web.assets_backend.js:1185:81
then/</</<@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:802:678
fire@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:796:281
fireWith@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:801:198
then/</</<@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:802:849
fire@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:796:281
fireWith@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:801:198
Deferred/</deferred[tuple[0]]@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:803:31
rpc/</<@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:3858:346
then/</</<@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:802:678
fire@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:796:281
fireWith@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:801:198
Deferred/</deferred[tuple[0]]@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:803:31
fire@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:796:281
fireWith@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:801:198
then/</</<@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:802:849
fire@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:796:281
fireWith@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:801:198
then/</</<@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:802:849
fire@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:796:281
fireWith@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:801:198
done@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:1192:86
callback@https://xxx.odoo.com/web/content/906-d57f445/web.assets_common.js:1212:15

@jnegrete
Copy link
Author

jnegrete commented Nov 15, 2017 via email

@yajo
Copy link
Member

yajo commented Nov 16, 2017

Please remove cd3c87e, it was better before. If any computed method fails with that, it should be fixed in the computed method, not there.

OTOH, @CasVissers' logs are JS logs, not Python logs, so there's a high chance that the problem is in the client side.

As always, those logs are not in ?debug=assets mode, so they are almost completely useless. Can you switch to that mode and paste the good logs please @CasVissers?

@RoelAdriaans
Copy link

@pedrobaeza
Copy link
Member

Yeah!

@yajo
Copy link
Member

yajo commented Nov 17, 2017

True, closing. Reopen there please.

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

Successfully merging this pull request may close these issues.

None yet