how to import one project(.zexp file) to another project? - zope

can any one tell how to solve
TypeError:('object.__new__(X): X is not a type object (classobj)', <function
_reconstructor at 0xb766fa04>, (<class DateTime.DateTime.DateTime at 0x9382d4c>, <type
'object'>, None))
while importing a one project(for ex. brundelre3.zexp file) to another in zmi.
I tried it importing the project(brundelre3.zexp) already in zmi under / ->import/export (tab)-> import file name ->ownership-> selected the radio button of Retain existing ownership information-> import (button) so it worked properly before but its not working now . Can anyone tell whats the reason for my error.

I can only make wild guesses, you probably need to debug it:
Perhaps you have created a type that has a name that clashes with something built-in.

Related

the translation for culture EN reference and object of type X with name X but that object has been deleted

after I try to delete a DAX i get the error:
even after I create a new translation, I can work on it and after a couple of times a get this message again
what can be the cause of that?
thanks
oh i cant post images.. the error is :
Failed To Save Modification To the server. 'The translations for culture EN references an object of type "X" with name of "X" but that object has been deleted.
Are you using Visual Studio to edit your Tabular Model?
Try to export the translations into a .json file, remove all translations from the model, and then import them again, using the .json file.
Alternatively, switch to Tabular Editor - it generally works better than Visual Studio when working on a model that has translations.
I had this issue when I deleted some columns.
This method worked for me:
Export the translation to JSON file
Delete translation from the object (change the string from "my_translation" to "")
Import the JSON file back into the model
Delete the object normally

Odoo: extends the import function for a specify model

I want to change the Import function of Odoo, for a specify model (in this case, it is mrp_production.
Import Function Image
For example, my csv file has 2 columns only: product_id and product_qty.
I want the Bill of Material to be loaded automatically after importing (currently it is empty). I want to customize the Import function for this model only.
Is there anyone do this before? Or please provide some solutions/links on how to do it.
Thank you very much.
For this, you simply override the create method for the mrp model and try creating one record from form view. If you have written correct logic to get the BOM automatically it will automatically work while importing.
In, import function odoo basically calls the create method for the model.
Thanks

Create Category Getting Error "cannot define category for Undefined class"

I am facing a problem when i try to create 2 category of my OWN Simple Class ( Class name is Car). I created 2 Category for this class just for testing " Car+show.h" & "Car+Protected.h". I Just write very small methods in to all like NSLog something sting. My Problem is that when i build application I am getting error into Category File " Can not define Category for Undefined Class Car". Please Suggest me where i am Wrong.
If you import the category header files into Car.h, and your category header files themselves import Car.h, then you have a circular import which is causing you your problems.
Categories are for adding functionality to a class or splitting an interface out across several headers. If you are importing your category headers into your main class header, this is defeating the point.
The category headers should only be included by files that need to use functionality defined in the category.
I have solved my problem luck by chance. I really don't know actual fact about that.
The point is that when i import that category files into Car.h file that time it's create error which i shared with you. But when i Import that same file only and only Car.m file it's work fine.
I really don't know why it's create error when i import that category files into .h file. Please explain why it's getting error?
Thanks Mukesh

Ohm: how to drop a column/attribute?

There's an attribute that I no longer need, and I would like to drop it. I can't seem to simply remove the attribute from my model code, because there is an error when I load the instance. It complains that the myattrib= method does not exist. I guess it complains because Ohm sees the key in the database, but the attribute :myattrib does not exist in the model code.
How do I delete the column/attribute through Ohm, before I change my code and remove attribute :myattrib?
I tried this and it worked for me: Model.key[:myattrib].del
found it here: http://ohm.keyvalue.org/Ohm/Model.html#delete-instance_method

LINQPad 4 doesn't know about HttpUtililty - how to resolve?

I recently started using LINQPad to test bits and pieces and its a great time saver.
However, sometimes it gives me some errors with minor things.
when I want to test this:
HttpUtility.UrlPathEncode("Make sure");
I get this error: The name 'HttpUtility' does not exist in the current context.
Is there a way to get it to recognize basic stuff like HttpUtility?
I just tried writing:
System.Web.HttpUtility.UrlPathEncode("Make sure")
and I am shown this: The type or namespace name 'HttpUtility' does not exist in the namespace 'System.Web'
You need to a reference System.Web.dll. Press F4 (References) and add a reference to that DLL.
Or, if you have an autocompletion license, just type your original query:
HttpUtility.UrlPathEncode("Make sure");
and open the smart-tag that automatically appears. It will present a menu option to add the reference to System.Web.dll and import the System.Web namespace in a one-fell-click!