Just a question, But what would happen if you changed the category to type view. Well I tested here is the answer - now we have a bug. The default still displays as All Products despite domain filtering and there is no checking on product save that the category is indeed not of type view and accepts it.
Personally I think it would be more elegant to say If the user does not use product categories (i.e. only All Products exists) default it and save the effort, but if they use categories default it to empty and force a choice or make the user decide their own default. The reason being is that it is less effort to get right up front than going and correcting incorrect accounting entries. btw - in our own implementation initially I have had to take on 100% of the product management function, as it is too difficult for our current users to set things up right. On Fri, Aug 19, 2011 at 3:28 AM, Leigh Willard <[email protected]>wrote: > Hi Olivier, > > Thanks for your reply! > > Makes sense what you say about being able to quickly import data by > giving a product category. > > Unfortunately, if you delete ALL PRODUCTS, then OpenERP crashes :) You > cannot get around setting up a default category, which makes it too easy > for the user to forget to change the category and then critically mess > up their GL. Because the implications of this are pretty heavy for any > business, the best is to have no default category and force the user to > choose one (or let them set a default by doing the right-click > method). In our office, we have written a patch to remove the default > because we don't want to take the risk that our clients mess up their GL > and then blame the product for it. > > Thanks, > Leigh > > > On 11-08-18 10:55 AM, Olivier Dony (OpenERP) wrote: > > Leigh, > > > > This was done in v6 to minimize the number of steps needed to initialize > a new database. Creating/Importing the list of products is one of these > steps, and it used to be quite cumbersome. Imagine you're a small business > with a tiny list of products. > > Providing a default umbrella product category means that you can > immediately import a list of products via CSV and start using OpenERP right > away, without even needing any existing product categories (say your product > catalog was previously an excel sheet, common enough). > > > > Now, I understand that this could be a source of errors later in the > > process, when new products are introduced in an already configured > > system. But if you want to get rid of this default, you should be able > > to simply delete the "All Products" category and be done with it (it > > will not be reinstalled during a later OpenERP update as it is > > specifically written to be created only for new databases). If that does > > not work, then I agree we have an annoying bug. > > > > Perhaps we could also improve the implementation by making the default > "umbrella category" work like a user-defined default value (same effect as > in right-click> "set as default" on the field), instead of hardcoding it in > the default_category() function. > > But the effect would be quite similar, and you would still need to delete > the category in your case (or override it with another default one) > > > > What do you think? > > > > -- > You received this bug notification because you are subscribed to OpenERP > Addons. > https://bugs.launchpad.net/bugs/816097 > > Title: > product do not want default category > > Status in OpenERP Modules (addons): > Opinion > > Bug description: > OpenERP REQUIRES that there is a DEFAULT product category. I do NOT > want a default product category, I want the field to remain empty (and > blue, because it is required) to force my users to select their > product category. > > This is the only place that we have found where a default is required > (the default is hard-coded to be the ALL PRODUCTS category), and this > behavior is not consistent with the rest of OpenERP. > > The fix requires a re-write of the following function. The code > containing 'cat0' should not exist at all - it sets the default > category to be (the reference to) cat0 if no default exists - it > should return nothing if no default exists. > > _default_category(self, cr, uid, context=None): > if context is None: > context = {} > if 'categ_id' in context and context['categ_id']: > return context['categ_id'] > md = self.pool.get('ir.model.data') > res = False > try: > res = md.get_object_reference(cr, uid, 'product', 'cat0')[1] > except ValueError: > res = False > return res > > To manage notifications about this bug go to: > https://bugs.launchpad.net/openobject-addons/+bug/816097/+subscriptions > -- You received this bug notification because you are a member of C2C OERPScenario, which is subscribed to the OpenERP Project Group. https://bugs.launchpad.net/bugs/816097 Title: product do not want default category Status in OpenERP Modules (addons): Opinion Bug description: OpenERP REQUIRES that there is a DEFAULT product category. I do NOT want a default product category, I want the field to remain empty (and blue, because it is required) to force my users to select their product category. This is the only place that we have found where a default is required (the default is hard-coded to be the ALL PRODUCTS category), and this behavior is not consistent with the rest of OpenERP. The fix requires a re-write of the following function. The code containing 'cat0' should not exist at all - it sets the default category to be (the reference to) cat0 if no default exists - it should return nothing if no default exists. _default_category(self, cr, uid, context=None): if context is None: context = {} if 'categ_id' in context and context['categ_id']: return context['categ_id'] md = self.pool.get('ir.model.data') res = False try: res = md.get_object_reference(cr, uid, 'product', 'cat0')[1] except ValueError: res = False return res To manage notifications about this bug go to: https://bugs.launchpad.net/openobject-addons/+bug/816097/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~c2c-oerpscenario Post to : [email protected] Unsubscribe : https://launchpad.net/~c2c-oerpscenario More help : https://help.launchpad.net/ListHelp

