product & product category - accounts must not be views

Bug #902440 reported by Ferdinand
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

just found that for stock valuation account (anglo saxon)

Related branches

Revision history for this message
Ferdinand (office-chricar) wrote :

IMHO all fields.many2one('account.account',,
must have
domain="[('type','!=','view')]"
except
* for parent which must have
domain="[('type','=','view')]"
* for reports, queries
 no domain , has to be decided dependent on report

potential files to review (checks only if view is on the same line)
grep many2one|grep "'account.account'"|grep -v view|grep -v report| cut -f 1 -d':'|sort -u

./account/account_analytic_line.py
./account/account_bank_statement.py
./account/account_invoice.py
./account/account.py
./account_asset/account_asset.py
./account_coda/wizard/account_coda_import.py
./account_voucher/account_voucher.py
./account/wizard/account_automatic_reconcile.py
./account/wizard/account_move_line_reconcile_select.py
./account/wizard/account_move_line_unreconcile_select.py
./account/wizard/account_reconcile.py
./auction/auction.py
./auction/wizard/auction_pay_sel.py
./hr_payroll_account/hr_payroll_account.py
./stock/product.py
./stock/stock.py
./stock/wizard/stock_change_standard_price.py

similar for analytic accounts
grep many2one|grep "'account.analytic.account'"|grep -v view|grep -v report| cut -f 1 -d':'|sort -u
./account/account_bank_statement.py
./account/account_invoice.py
./account/account_move_line.py
./account/account.py
./account_analytic_analysis/account_analytic_analysis.py
./account_analytic_default/account_analytic_default.py
./account_analytic_plans/account_analytic_plans.py
./account_analytic_plans/wizard/account_crossovered_analytic.py
./account_asset/account_asset.py
./account_budget/account_budget.py
./account_voucher/account_voucher.py
./account/wizard/account_reconcile.py
./analytic/analytic.py
./auction/auction.py
./hr_expense/hr_expense.py
./hr_payroll_account/hr_payroll_account.py
./hr_timesheet_sheet/hr_timesheet_sheet.py
./hr_timesheet/wizard/hr_timesheet_sign_in_out.py
./project_issue_sheet/project_issue_sheet.py
./project_planning/project_planning.py
./project/project.py
./purchase/purchase.py
./sale/sale.py

Revision history for this message
Ferdinand (office-chricar) wrote :

account move line has a check so it will not save move lines
        (_check_no_view, 'You can not create move line on view account.', ['account_id']),

but it is missing for
account_analytic_line()

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

I am confirming this issue for the following two point.
1) Put the domain="[('type','!=','view')]", on stock valuation account in product category form.
2) Put a constraint on account_analytic_line for view type account according to comment#2.

Currently I am assigning this Addons3 team as a generalise way.

Thank you!

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Jagdish Panchal (Open ERP) (jap-openerp) wrote :

Hello Ferdinand,

I have fixed the bug as per the comment #3.
We are not sure whether we would be able to implement the remaining changes mentioned in comment #1 for 6.1, if we do we will propose a different branch for that.
Its fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-902440-jap
Revision ID: <email address hidden>
Revision no: 5990

Thanks,
jap

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
status: Fix Committed → Fix Released
Changed in openobject-addons:
milestone: none → 6.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.