← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 714444] Re: [6.0] numeric data types have no decimals

 

I know this, but I wondered why numeric values are not defined / stored
in postgres with the precision given in
digits_compute=dp.get_precision('Account')

none of the numeric columns have numeric(16,2) as it was in V5
if dp.get_precision('Account') returns 2 ( or it doesn't do in time of creation? )

                                          Table "public.account_move_line"
        Column         |            Type             |                           Modifiers                            
-----------------------+-----------------------------+----------------------------------------------------------------
 id                    | integer                     | not null default nextval('account_move_line_id_seq'::regclass)
 create_uid            | integer                     | 
 create_date           | timestamp without time zone | 
 write_date            | timestamp without time zone | 
 write_uid             | integer                     | 
 statement_id          | integer                     | 
 journal_id            | integer                     | not null
 currency_id           | integer                     | 
 date_maturity         | date                        | 
 partner_id            | integer                     | 
 reconcile_partial_id  | integer                     | 
 blocked               | boolean                     | 
 analytic_account_id   | integer                     | 
 credit                | numeric                     | 
 centralisation        | character varying(6)        | 
 company_id            | integer                     | 
 tax_code_id           | integer                     | 
 state                 | character varying(16)       | 
 debit                 | numeric                     | 
 ref                   | character varying(64)       | 
 account_id            | integer                     | not null
 period_id             | integer                     | not null
 date_created          | date                        | 
 date                  | date                        | not null
 move_id               | integer                     | not null
 name                  | character varying(64)       | not null
 reconcile_id          | integer                     | 
 tax_amount            | numeric                     | 
 product_id            | integer                     | 
 account_tax_id        | integer                     | 
 product_uom_id        | integer                     | 
 amount_currency       | numeric                     | 
 quantity              | numeric                     | 
 followup_date         | date                        | 
 followup_line_id      | integer                     | 
 account_period_sum_id | integer                     | 
 partner_bank_id       | integer                     | 
 received_check        | boolean                     | 
 asset_id              | integer                     | 
I

** Changed in: openobject-server
       Status: Incomplete => New

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

Title:
  [6.0] numeric data types have no decimals

Status in OpenERP Server:
  New

Bug description:
  ** in V5 "numeric(16,2)"
  ** in V6 everything is "numeric"
  (checked account_move_line, invoice_line as it is vital for accounting)
  this means values with any precision can be stored. (especially when bypassing the OpenERP engine) 

  debit|credit in a demo installation
  shows 2 lines with only one decimal digit - although IMHO it should have 2
  select debit,credit,tax_amount from account_move_line;

   2000.00 |    0.00 |           
      0.00 |    0.00 |           
    5000.0 |    0.00 |           
      0.00 | 11000.0 |           
   9000.00 |    0.00 | 

  I am not saying this is necessarily an error, but developers should be
  aware of this change.





References