Odoo 도움말

1

0
1 응답
3
Avatar

Cyril Gaspard (GEM) France

--Cyril Gaspard (GEM)--
4364
| 6 6 10
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Rank #1 on first OpenERP forum

OpenERP award "Top Contributor" 2011, for my actions on forum

Odoo forum moderator


Cyril Gaspard (GEM) France
15. 3. 22. 오후 6:49

Hi,

odoo verify first in the product if income, expense accounts (and for stock input, output too) are defined, if not, verify in the category, if not in the 2 you have your error message.

And no, category doen't inherit of parent category, see the code :


def _choose_account_from_po_line(self, cr, uid, po_line, context=None):

     fiscal_obj = self.pool.get('account.fiscal.position')

     property_obj = self.pool.get('ir.property')

     if po_line.product_id:

         acc_id = po_line.product_id.property_account_expense.id

         if not acc_id:

             acc_id = po_line.product_id.categ_id.property_account_expense_categ.id

         if not acc_id:

             raise osv.except_osv(_('Error!'), _('Define an expense account for this product: "%s" (id:%d).') % (po_line.product_id.name, po_line.product_id.id,))

bye

2 의견
La Page PT, Pascal Tremblay 캐나다
15. 3. 22. 오후 7:00

Very nice from you to answer. Very interesting. I analyze and I come back.

Mudi Vand Sri Lanka
15. 3. 25. 오전 3:14

Thanks both of you, Cyril and Pascal, for directing me to this post. So according to Cyril's answer, if I want the product categories to inherit their parent category's settings, I will have to do a code modification. Hmm. I am not good at that. :( Hope someone will provide a solution for this.

질문하기
Writer
Keep Informed
2 팔로워
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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now