Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to upgrade my Odoo module V12 to V13 Please guide me how can I do that. And can I upgrade just single module in ODOO 12? Please guide me step by step.
You can try Tasks to do in the migration listed above.
Bump module version to 13.0.1.0.0.
Remove any possible migration script from previous version.
Squash administrative commits (if any) with the previous commit for reducing commit noise. They are named as "[UPD] README.rst", "[UPD] Update $MODULE.pot", "Update translation files" and similar names, and comes from OCA-git-bot, oca-travis or oca-transbot.
Remove all the decorators #api.multi, #api.returns, #api.one, #api.cr, #api.model_cr from the code. Now they are all multi-record by default. In case of the last ones, you will need to adapt the code to the behavior change.
Check that all "compute" methods of non-stored computed fields assign a value in any case to the field, even if it is a falsy one. (https://github.com/odoo/odoo/pull/36743/commits/2e43bfc1c4b2f61e0459614f61f90a77dc3b7233).
Computed stored fields will keep their previous value if not assigned during the compute method, so don't rely on any expected default value.
Replace sudo(user): "deprecated use of sudo(user), use with_user(user) instead"
Some of the Font Awesome (FA) icons have changed their name as now Odoo uses FA v5, so you might need to change them in your module views. Check the changed names in https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes.
Remove all the oldname field attributes in the code. If they were added in previous version, they have served their function any way, and now in this version it's not supported, so if you have the need, create a migration script and use openupgradelib's rename_fields method.
Remove view_type tag on action window XML definition. It's now always form (tree is not supported since 11.0 any way).
Remove multi field from ir.actions.act_window models. Now you have binding_view_types field for indicating in which view the action will be available: list, form or empty for both. If declaring the action through the accelerator tag <act_window>, then use the attribute binding_views. More reference in https://github.com/odoo/odoo/pull/24738/commits/33d51480688065e367eb646f12b89d721749cac9.
If having an smart-button for active field, with widget toggle_button, the archive/unarchive actions are available without doing anything more, so you can remove it. And the new paradigm is to put instead a ribbon when archived with the code <widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>.
If using any decimal precision in float fields (example: import odoo.addons.decimal_precision as dp; x = fields.Float(digits=dp.get_precision("Account"))), now the qualifier is put directly without the need of importing anything and simplifying syntax: x = fields.Float(digits="Account").
In the manifest, rename python dependencies to use the PyPI distribution name instead of the import name (see https://github.com/odoo/odoo/pull/25549 for more information)
If the module is touching Accounting part, see https://github.com/OCA/maintainer-tools/issues/430 for the structural changes detected in it.
Add tests to increase code coverage.
Check tasks of previous versions if you are migrating from lower versions than v12. It's also recommended to check for things not done in previous migrations.
Do the rest of the changes you need to do for making the module works on new version.
Regex which can help to find the things to remove/change:
grep -nri 'oldname\|sudo([^\)]\+)\|api.multi\|api.returns\|api.one\|api.cr\|api.model_cr\|12.0\|compute=' $MODULE
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I have inherited a bunch of Access projects. I found a very strange issue where some form code accesses a variable that does not exist. The compile works fine, intellisense will auto complete the variable but at runtime I get an error 2465, can't find the field 'xxx' referred to in your expression.
The field most certainly does not exist, there is no variable by that name.
Any ideas why the compiler is not finding the issue?
I think it may have something to do with the query to fill the form. I think it did have the column XXX at some point, then it was removed. The compile still works but the run does not. I'm not sure.
There is no code with this question because the code is not at fault. If you read the accepted answer below its a 'feature' of Access that the VBA compiler uses the auto generated column names from a record source as variable names, modifying the query breaks this linkage.
You don't mention if the var comes up with you type me + "dot" in the given form.
This would reveal important information.
You can also type in the variable name (it it is not a me.dot var) and then hit shift f2, and that should/can jump you to the location of the variable.
However, if this is a me.dot value? then open the form in design mode. Display property sheet, data tab.
Now select and CUT out the forms datasource to your paste buffer. You now must TAB out of the datasource. Now, tab back in, re-paste in the forms datasource, and AGAIN tab out. This forces access to re-generate the "me." members for the form. So, over time it is possible to delete columns and controls on that form, but the "members" are thus no re-generated until such time you do above.
so, the missing detail here is this a me.dot intel-sense, or is this some global var defined in some code module? As noted, if this is a not a me.dot member of a form, then click on that var, and try shift-f2 and see if that finds the variable.
Of course in the vba editor, you can also do a ctrl-f and search the GLOBAL application for all and any occurrences of that variable - and thus such a search of all code would and could again find the origin of that variable.
I want to improve my work productivity with Rubymine (Jetbrains) by adding autocomplete to most common words:
like if I type b and enter , it will auto populate Byebug, for Example.
Not sure I've got what you mean by 'most common words'... there is a 'hippie completion' feature (Alt+slash) that allows completing words already entered in file.
Yopu can also use Live Templates to expand certain abbreviations into words
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I need to write some user macros in Atlassian Confluence. It uses the Apache Velocity templating engine. How can I find which APIs are available in that context?
For example, one community-provided macro uses objects like $spaceManager. How can I enumerate all of the objects that are available, and also get documentation for their methods?
The page on the Atlassian site listing the objects is incomplete: not only does it only list a small fraction of the true objects available, it's also not specific to the user macro context, or even to my specific version of Confluence. (For example, user macros are given a different Velocity context than Velocity used in other plugin points and have different objects available, and the objects available in Confluence 5.1 are different from those available in Confluence 5.6.)
There are similar questions on the Atlassian Answers site, but none point to complete API and type references.
The official list of Velocity objects visible in Confluence is listed on Atlassian's site, but as you may have noticed, it is far from complete.
With JIRA, there is a trick that one can use to list all objects in the current Velocity context:
#foreach($p in $ctx.keySet().toArray())
$p.toString() - $ctx.get($p).getClass().getName().toString()
#end
Unfortunately, the JIRA trick above does not work for Confluence because Confluence does not expose the ctx map.
Luckily, you mentioned that you are writing user macros, so not all is lost! Using another trick to access objects that are not normally available in the default context, you can punch a hole through to the class that provides the Velocity context for user macros and give yourself a copy. Combining the two approaches, we get the following for Confluence:
#set($macroUtilClass=$action.class.forName('com.atlassian.confluence.renderer.radeox.macros.MacroUtils'))
#set($getContextMethod=$macroUtilClass.getDeclaredMethod('defaultVelocityContext',null))
#set($ctx=$getContextMethod.invoke(null))
#foreach($p in $ctx.keySet().toArray())
$p.toString() - $ctx.get($p).getClass().getName().toString()<br/>
#end
This gives you a list of all objects available and their corresponding types, like this:
res - com.atlassian.confluence.web.filter.DebugFilter$LoggingResponseWrapper
bootstrap - com.atlassian.confluence.setup.DefaultBootstrapManager
settingsManager - com.atlassian.confluence.setup.settings.DefaultSettingsManager
userAccessor - com.sun.proxy.$Proxy54
seraph - com.atlassian.confluence.util.SeraphUtils
xsrfTokenGenerator - com.atlassian.xwork.SimpleXsrfTokenGenerator
...
To find the methods available through each of those objects, you will need to look up the corresponding JavaDocs by the class name. I find that Google is often the fastest path to done, but you can also go directly to the JavaDocs (for example, for the SpaceManager) and then root around in the other packages or adjust the URL to match the class you want. You will also want to adjust the "latest" in the URL to correspond to the actual version of Confluence you have installed. Lastly, a few of the classes are hidden behind proxies (like userAccessor above), but the variable name often matches the class name, so these are usually easy to figure out.
Note that this example is specifically tailored for user macros. The objects available in other Velocity contexts will certainly be different.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
When I create my second core data model and run the application everything is fine. But when I modify the second model, application is crashed, and I have to delete my app and run again. Is it normal? When I put my application's second version into the AppStore will it be OK or not?
This is expected behavior. You have altered your Core Data Model, and when you attempt to run the new model over the existing one in your previous build, it can't figure out how to migrate the old store to a new store with the new model; this is called a migration. A lightweight migration (meaning you don't have to write any custom migration logic) can be performed as long as you version your model for every set of model changes. When changes are made within a version and you install over a previous build, the migration fails and your app crashes.
For working in the simulator, it's normal to reset content and settings very often when messing with your core data model, but when shipping to the store, it's very important to be aware of model versions. Once you ship with Model Version 1, no more edits can be made to that model version. As soon as you ship with model 1, go ahead and create a new model that you can edit freely until your next ship date. Do this by selecting your xcdatamodelId file, and selecting Editor -> Add Model Version. The "based on model" is your current model. Once this is created, select your xcdatamodelId file again and in the file inspector, make sure you new model version is selected under the heading Model Version.
Doing this will allow you to use lightweight migrations and stop your crashes, and you data will migrate from your old store to the new one on installing an update. Read here in the docs for more!
I'm new to both Orbeon and XForms and please forgive me for asking help on a version not yet released.
I am building an application that requires repeated blocks with multiple fields. The client wants to be able to use the form builder in the future to update the forms so manual xforms programming is out of question. At the moment I am using the night-built version of orbeon which supports repeatable grid, hoping that it will be included in the next release soon.
A problem I ran into is the lack of support of labels inside the grid. The forms builder does not allow input of lables to the fields. When I manually edit the source and put in the labels in the resources section, the labels are not visible except the first row of fields.
My first question is whether this is the intended behavior for the eventual release version? If so would it be possible to make it overridable by using a runner property?
Now the client is willing to accept some minor editing in the source code. Is there a simple way to make the (mnually input) labels visible? Some CSS code perhaps?
All information would be much appreciated.
regards,
Jeff
This is not the intended behavior. As you have noted the new builder is not yet in a stable version and the code is very much in flux at this time.
The idea is that if each repeated group of rows contains only one row, then the labels of the fields will appear as table headers. This is the behavior of the current Form Runner repeater. See for example:
Now if a repeated group contains more than one row, then the labels of the controls should probably be within the grid cells themselves, as it doesn't make sense to put the labels in table headers in this case. But note that this scenario is not implemented yet.