This question has been flagged
3 Replies
3574 Views

Hi,
is there a way to copy a whole floor name and all its tables?
I found the menu item "Actions > Duplicate" but when I try to duplicate the floor, all table names are lost. I have 11 floors with around 75 tables.... after editing the 5th floor manually i lost my desire for today.

Hope anyone have found a workaround/solution for that.

Thank you very much + Best regards
schtebo

Avatar
Discard
Author Best Answer

Hi Ermin, thank you for your answer.
I tried that, but maybe I'm doing something wrong. Hope you could find my fault.
Here are my steps:
- select a floor then "actions > export"
Fields to export:
-Floor Name
-Tables
Then I open the exported file with an editor and modify the floor-name.
Then I try to import the file again, Odoo show me, that it is valid, but when the import finish, only the already existing floor is replaced by the new name I set manually via editor. I assumed it will create a clone of the existing floor and not to rename my existing floor.
Thx + BR schtebo





EDIT 2018-06-02 10:44


thank you very much to all of you. :)
when you import the floor plan, you just have to set the table "external id" to "don't import" but keep all other fields/tables/data.
this clone your floor plan.

thank you!!!!


case solved :)

Avatar
Discard
Best Answer

If you can get dirty with the code you can add the attribute copy to table_ids:

table_ids = fields.One2many('restaurant.table', 'floor_id', string='Tables', copy=True, help='The list of tables in this floor')
Avatar
Discard
Best Answer

I would use csv-export and reimport. You can adapt the csv-file accordingly.

Avatar
Discard