← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 731624] Re: invoices - web bahaves differently from GTK - GRAVE

 

Hello,

Sorry for inconvenience! Please ignore the comments #3 as I
checked that overall process working fine for GTK client .
So, I am closing this bug for addons.

Thanks for understanding.

** Changed in: openobject-addons
   Importance: Medium => Undecided

** Changed in: openobject-addons
       Status: Confirmed => Invalid

** Changed in: openobject-addons
     Assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) => (unassigned)

-- 
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/731624

Title:
  invoices -  web bahaves differently from GTK - GRAVE

Status in OpenERP Modules (addons):
  Invalid
Status in OpenERP Web Client:
  Confirmed

Bug description:
  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



References