[10.0][MIG][base_export_manager] Full migration to version 10#870
Merged
Conversation
- Improve user instructions in README. - Require some required fields. - Allow to select models from a list. - Allow to select up to 3 fields from dynamic lists. - Improve translations. - More tests. - Translate column labels. Some methods have been renamed, so version tag is raised to 8.0.2.0.0.
…nes. Depending on the context where the record is created, it gets `resource` or `model_id`. The problem is that Odoo checks constrains before inverses, so constrains would fail always. Test added to ensure future versions contemplate all use cases.
…9 * Rename JS to base_export_manager
[FIX][base_export_manager] Fix "Expected singleton" bug.
If you had a field that got translated in more than 1 addon, you'd possibly getto this error:
File "/opt/odoo/0079_ahk_openerp/oca/base_export_manager/models/ir_exports_line.py", line 105, in _compute_label
field.name)),
File "/opt/odoo/common/openerp/v8/openerp/fields.py", line 825, in __get__
record.ensure_one()
File "/opt/odoo/common/openerp/v8/openerp/models.py", line 5355, in ensure_one
raise except_orm("ValueError", "Expected singleton: %s" % self)
except_orm: ('ValueError', 'Expected singleton: ir.translation(4899, 703976)')
With this patch, now we let Odoo return the translated string by using its
standard method to do so, so we have to care for less.
* Move installation outside a data file.
This makes the whole installation to be able to roll back if something goes
wrong, instead of entering an error loop.
* Include envorionment in its manager.
* Add 4th field
* Move to api.multi, refactoring some stuff.
- Add some comments in complex parts.
- Rename `onchange_name` to `_onchange_name` (guidelines).
- Make `_compute_name`'s try block shorter and easier to understand.
* Allow R/W of name directly in model.
* Update tests to cover new behaviors.
yvaucher
requested changes
Jun 22, 2017
yvaucher
left a comment
Member
There was a problem hiding this comment.
Just the test to fix. Code review 👍 + tested locally (only the export access right and the visibility of the button didn't try export profiles)
| check_label = " (res.partner) (parent_id/name)" | ||
| self.assertEqual(export_line.with_context(lang="en_US").label, | ||
| "Related Company/Name (parent_id/name)") | ||
| "Related Company (res.partner)/Name" + check_label) |
Member
There was a problem hiding this comment.
This seems to fail:
FAIL: test_get_label_string (odoo.addons.base_export_manager.tests.test_ir_exports_line.TestIrExportsLineCase)
Traceback (most recent call last):
` File "/home/travis/build/OCA/server-tools/base_export_manager/tests/test_ir_exports_line.py", line 42, in test_get_label_string
` "Related Company (res.partner)/Name" + check_label)
` AssertionError: u'Related Company/Name (parent_id/name)' != 'Related Company (res.partner)/Name (res.partner) (parent_id/name)'
FAILED
Module base_export_manager: 1 failures, 0 errors
pedrobaeza
requested changes
Jun 22, 2017
pedrobaeza
left a comment
Member
There was a problem hiding this comment.
Little changes, but overall OK
| from openerp import models, fields, api, exceptions | ||
| from openerp.tools.translate import _ | ||
| from odoo import models, fields, api, exceptions | ||
| from odoo.tools.translate import _ |
chienandalu
approved these changes
Jun 27, 2017
chienandalu
left a comment
Member
There was a problem hiding this comment.
Tested funcionality:
- Create an export list and check that it's added to the new export view.
- Create an export from the new view and check that appears on its model view.
- Restrict export for a users group and check that export is not available anymore on the affected views.
pedrobaeza
approved these changes
Jul 3, 2017
Member
|
@yvaucher please give your approval. |
Member
|
As @yvaucher's comment is attended and he doesn't answer, I proceed to merge. |
SiesslPhillip
pushed a commit
to grueneerde/OCA-server-tools
that referenced
this pull request
Nov 20, 2024
Updating from latest OCA 15.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was becoming crazy with git... versions 8 and 9 of the addon diverged.
Now, features from both versions will be available for 10.0.
I'm thinking on removing transbot commits, since translations are gonna be broken anyways (either missing v9 strings or v8 ones).
This resumes work form #712.
@Tecnativa