Odoo Help

0

0
16 Answers
0
Brian Campanotti
10/14/18, 8:10 AM

Cyril,

Thanks so much for the response. I did look at the Github thread and am not sure the issue has been acknowledged as a bug? In the meantime, I wanted to see if there is any way for us to 'manually' overcome the issue understanding later upgrades may cause the issue to come back? Can the invoicing group name be manually added? I tried looking at the views referenced in the error report but all of them fail to open with the same missing group error. Please let me know if you can think of a way for us to deal with this temporarily.

Merci!

Brian

15 Comments
Cyril Gaspard (GEM)
10/14/18, 8:40 AM

Hi,

yes, you can add temporarily a group with name invoicing in product.view product_template_form_view view (you can use patch command to edit sources to trace this modification), modify manually the view in menu settings/technical/user interface/views. Bye

Brian Campanotti
10/14/18, 9:28 AM

Cyril,

I was able to find the suggested view but wanted to confirm before making any changes. It is product.template.common.form under model product.template with external ID product.product_template_form_view. Please confirm and let me know where it would be best to add the new group. The views contents are:

<?xml version="1.0"?>

<form string="Product">

<header>

<button string="Variant Prices" type="action" name="163" attrs="{'invisible': [('product_variant_count', '&lt;=', 1)]}" groups="product.group_product_variant"/>

</header>

<sheet>

<field name="product_variant_count" invisible="1"/>

<field name="is_product_variant" invisible="1"/>

<field name="id" invisible="True"/>

<div class="oe_button_box" name="button_box">

<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">

<field name="active" widget="boolean_button" options="{&quot;terminology&quot;: &quot;archive&quot;}"/>

</button>

</div>

<field name="image_medium" widget="image" class="oe_avatar"/>

<div class="oe_title">

<label class="oe_edit_only" for="name" string="Product Name"/>

<h1><field name="name" placeholder="Product Name"/></h1>

<div name="options" groups="base.group_user">

<div>

<field name="sale_ok"/>

<label for="sale_ok"/>

</div>

<div>

<field name="purchase_ok"/>

<label for="purchase_ok"/>

</div>

</div>

</div>

<notebook>

<page string="General Information" name="general_information">

<group>

<group name="group_general">

<field name="type"/>

<field name="categ_id" string="Category"/>

</group>

<group name="group_standard_price">

<field name="list_price" widget="monetary" options="{'currency_field': 'currency_id', 'field_digits': True}"/>

<label for="standard_price" groups="base.group_user" attrs="{'invisible': [('product_variant_count', '&gt;', 1), ('is_product_variant', '=', False)]}"/>

<div name="standard_price_uom" groups="base.group_user" attrs="{'invisible': [('product_variant_count', '&gt;', 1), ('is_product_variant', '=', False)]}">

<field name="standard_price" widget="monetary" options="{'currency_field': 'currency_id', 'field_digits': True}"/>

</div>

<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>

<field name="uom_id" groups="product.group_uom" options="{'no_create': True}"/>

<field name="uom_po_id" groups="product.group_uom" options="{'no_create': True}"/>

<field name="currency_id" invisible="1"/>

<field name="product_variant_id" invisible="1"/>

</group>

</group>

</page>

<page string="Sales" attrs="{'invisible':[('sale_ok','=',False)]}" name="sales">

<div name="pricelist_item" groups="product.group_product_pricelist">

<separator string="Pricing"/>

<field name="item_ids" nolabel="1" context="{'default_base':'list_price', 'default_applied_on' :'1_product'}">

<tree string="Pricelist Items" editable="bottom">

<field name="pricelist_id" string="Pricelist" required="1"/>

<field name="fixed_price" string="Price" required="1"/>

<field name="min_quantity"/>

<field name="date_start"/>

<field name="date_end"/>

<field name="applied_on" invisible="1"/>

</tree>

</field>

</div>

<group name="sale">

<group name="email_template_and_project" attrs="{'invisible':[('type', '!=', 'service')]}"/>

</group>

</page>

<page string="Inventory" name="inventory" groups="stock.group_stock_user,product.group_stock_packaging" attrs="{'invisible':[('type', '=', 'service')]}">

<group name="packaging" string="Packaging" colspan="4" attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '&gt;', 1)]}" groups="product.group_stock_packaging">

<field name="packaging_ids" nolabel="1" context="{'default_product_id': product_variant_id,'tree_view_ref':'product.product_packaging_tree_view', 'form_view_ref':'product.product_packaging_form_view'}"/>

</group>

</page>

<page string="Notes" name="notes">

<group name="description">

<group string="Description for Customers" attrs="{'invisible': [('sale_ok','=',False)]}">

<field name="description_sale" nolabel="1" placeholder="This note will show up on sales orders."/>

</group>

</group>

<group name="warning">

<group name="sale_warning"/>

<group name="purchase_warning"/>

</group>

</page>

</notebook>

</sheet>

<div class="oe_chatter">

<field name="message_follower_ids" widget="mail_followers"/>

<field name="activity_ids" widget="mail_activity"/>

<field name="message_ids" widget="mail_thread"/>

</div>

</form>

Cyril Gaspard (GEM)
10/14/18, 10:41 AM

Hi,

xml_id of the view is well product.view product_template_form_view, see up to date code here:

https://github.com/odoo/odoo/blob/11.0/addons/product/views/product_views.xml

recommandations:

save the original view before to modify it, to do first on a test environment (not directly in production environment).

concerning the bug, I created an issue demand, not accepted yet ..., don't forget to follow it, if there is a correction, revert your modification, patch the code (use linux command patch), store the patch by creating a folder patch in your sources to have an history of sources modifications (do not add this folder in addons path)) and modify the view with the correction manually to not update the module (refresh browser page to load manual modification of the view)

I propose to replace (the group is invisible if sale_ok = False):

<group name="sale">

<group name="email_template_and_project" attrs="{'invisible':[('type', '!=', 'service')]}"/>

</group>

by

<group name="sale">

<group name="email_template_and_project" attrs="{'invisible':[('type', '!=', 'service')]}"/>

</group>

<group name="invoicing">

</group>

Bye

Cyril Gaspard (GEM)
10/14/18, 11:48 AM

question, does the account module is installed ?

Because this group is defined in a view in this module ...

Cyril Gaspard (GEM)
10/14/18, 11:56 AM

before to make the modification, can you update the list of modules in menu applications (active developper mode), and try to intall purchase module.

Cyril Gaspard (GEM)
10/14/18, 12:20 PM

other point, can you confirm me that sources odoo you are using actually are this which have been used to build your database ?

Brian Campanotti
10/14/18, 3:24 PM

I loaded Odoo from a V11 nightly installer packages and did not compile from source. The DB was created by the Odoo package once installed. It has been upgraded a few times over the original installation. Everything else seems to be running fine. I have the Canadian Accounting module installed, the invoicing module, sales module, project module and the CRM modules.

Brian Campanotti
10/14/18, 3:27 PM

I looked at the git source for product_views.xml and it was quite different than what was on my system. I made the suggested mod to the git version and loaded it on my system and tried to restart odoo and it started but would not present the webpage (just my logo and no menus). Then I reverted back to my original file and restarted odoo and still could not get the full interface back up. Tried restoring from a backup of my DB and same thing. I'll have to reload Odoo which is not that big of a deal but strange it seemed to have such an irreversible effect! Should I try it again once i've reloaded?

Cyril Gaspard (GEM)
10/14/18, 4:31 PM

sorry,

but what you are doing is not a good thing.if you update sources with git, you must update all modules which have been modified with this update, the risk is to lost / add data, perhaps break integrity of your database ... (remove/add fields, views, reload odoo file data, add/delete constraints ....)

for me to have your database up to date, you have to update list of modules, and update module base, and all modules installed will be automatically update too, and you will have no more problems to install purchase module, but it is not recommended because you don't know what will be add or deleted since last installation / update of your modules with old sources, but I recommand you to not execute this operation.

I recommand you to contact an odoo partner for your case, for Canada, I know and can recommand you Numigi company: https://www.odoo.com/fr_FR/partners/numigi-1567474

if you want to install / update at odoo start, add in command which run server odoo :

-i module_name to install, -u module_name to update

sorry, but I stop here my help, I don't want to be the cause of lost data, database break, because you didn' respect installation method, fix/save sources, and didn't know really what you have done by updating sources.

Good luck.

Cyril Gaspard (GEM)
10/14/18, 4:51 PM

Regards

Brian Campanotti
10/15/18, 7:53 PM

Cyril,

I should have mentioned I was NOT doing this on my production system (as you recommended) so NO problem at all!!! Thank you for information on the Canadian partner but prior to us contacting them would you mind one more question? It seems to me adding the invoicing group to our existing product_views.xml would be the least risk until we find a more permanent solution. But I am not sure where the best insertion point is. Could you please make a recommendation so we can try in our TEST environment? Here is our current product_views.xml

https://www.dropbox.com/s/k4ya714a7dmz62b/product_views.xml?dl=0

Any help would be greatly appreciated!

Brian

Brian Campanotti
10/16/18, 4:04 AM

Cyril,

Thanks for your help but I was able to resolve the issue! Merci!

Brian

Cyril Gaspard (GEM)
10/16/18, 4:19 AM

Hi,

good news, what are you doing to solve your problme, by adding the group in product view ?

Bye

Brian Campanotti
10/16/18, 8:58 AM

I actually did a fresh install on our test system with all the modules and noticed invoicing wasn't in product_views. I copied the file to my prod system running the same version but still had the issue. Then I went into dev mode on my prod system and checked for app updates but none were listed, However, I manually went into each installed module and clicked on the UPGRADE button and waited. And when I tried to install the Purchasing module...voila! It worked. I suspect something happened to my INVOICING module which caused the issue and doing the update forced its reinstallation resolving the issue.

Again, thanks for your help and i'm glad we're back up and running with this GREAT software!!!

Brian

Cyril Gaspard (GEM)
10/16/18, 9:04 AM

effectively just update the good module to update the view, the best will be to install module base to have all modules up to date ;)

Good luck for the future, with this complex software, don't update sources as a simple software ;), keep stable sources, and patch code for your problems only ;).

Regards.

Ask a Question
Keep Informed
2 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now