Devishree Brahmbhatt (OpenERP) (dbr-openerp) has assigned this bug to you for 
OpenERP Web Client:

to reproduce
create new db with finance and default data
create VAT 20% (not in price included)  + associate the vat with expense 
account 
create new invoice + total (example 120 =100+20 vat))
create new invoice line
* WEB copies 120 into price - user must correct to 100 (issue A)
* GTK copies nothingthing  (0?) into price - user enters 100 net
select expense account - which adds 20% vat
calculate vat which is correct.

in my application price_unit should be calculated as field_a*field_b and
works fine in GTK - in WEB the field price_unit can't be modified using
onchange triggers. (issue B)

printing the context of  account/invoice.py
def _price_unit_default(self, cr, uid, context=None):
in GTK
price_unit_default context  {'lang': u'de_DE', 'check_total': 120.0, 
'view_type': 'form', 'price_type': False, 'section_id': 1, 
'address_invoice_id': 7, 'tz': False, 'project_id': False, 'partner_id': 2, 
'invoice_line': [(2, 6, False)], 'department_id': False}
and WEB
price_unit_default context  {'lang': u'de_DE', 'bin_size': True, 'client': 
'web', 'tz': False}
price_unit_default context  {'lang': u'de_DE', 'check_total': 120.0, 
'price_type': False, 'type': 'in_invoice', 'journal_type': 'purchase', 
'bin_size': True, 'address_invoice_id': 7, 'client': 'web', 'active_model': 
'ir.ui.menu', 'tz': False, 'active_ids': [7], 'partner_id': 2, 'invoice_line': 
[], 'active_id': 7}

apparently 
* in WEB the function is called twice
* in WEB the 'invoice_line':[] in GTK 'invoice_line': [(2, 6, False)],

which is propably the reason

appart from the fact that GTK and WEB MUST behave identically the following 
finance functional aspect has to be considered
(at least in Austria)
in multi-line (suplier) invoices the amounts are usually entered net , the VAT 
associated with the account expects net and will calculate the correct total 
and VAT
only in very rare cases (small invoices) the invoice total will be entered 
together with VAT included in price (this is a special module which is not 
installed in this case)

IMHO the GTK behaviour should be implemented in the web client.
  
I can provide the (unfinished) module - providing the key functionality from 
chricar-price-unit branch for testing purpose 

I can imagine that this different behavior might cause some headache
also elsewhere, that's why I think it's GRAVE

** Affects: openobject-addons
     Importance: Undecided
         Status: New

** Affects: openobject-client-web
     Importance: Low
     Assignee: OpenERP SA's Web Client R&D (openerp-dev-web)
         Status: Confirmed

-- 
invoices -  web bahaves differently from GTK - GRAVE
https://bugs.launchpad.net/bugs/731624
You received this bug notification because you are a member of OpenERP SA's Web 
Client R&D, which is a bug assignee.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-web
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-web
More help   : https://help.launchpad.net/ListHelp

Reply via email to