Git Product home page Git Product logo

ooop's Introduction

Hi there πŸ‘‹

ooop's People

Contributors

argami avatar colmeirin avatar ecarreras avatar lasarux avatar vaab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ooop's Issues

Error Saving Data default

When we create a new model the Data class assigns a negative id

self._ref = -id(self)

On the new method all the M2O, M2M, O2M are assign with a new object of the relation type. If we never save or change the value of the attribute the object keeps the negative id.

DEBUG [create]: res.partner {'supplier': True, 'customer': False, 'property_account_position': -4506685520, 'employee': False, 'lang': 'es_ES', 'vat_subjected': False, 'credit': False, 'debit_limit': False, 'address': [(6, 0, [165])], 'company_id': 1, 'property_account_receivable': 483, 'property_account_payable': 471, 'property_stock_customer': 9, 'credit_limit': False, 'debit': False, 'property_stock_supplier': 8, 'property_payment_term': -4506762320, 'property_product_pricelist': 1, 'ref': '2', 'active': True, 'name': 'XXXX'}

As you can see

  'property_account_position': -4506685520
  'property_payment_term': -4506762320

So when i try to save i got this error

OverflowError: int exceeds XML-RPC limits

The problem is that even on 64 bits xmlrpc has a 32bit maxsize

>>> import xmlrpclib
>>> xmlrpclib.MAXINT
2147483647L

32bit python maxint is same

>>> import sys
>>> sys.maxint
2147483647 

in 64 python maxint fo python is

Python 2.7.1 (r271:86832, Jun 25 2011, 05:09:01) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxint
9223372036854775807

Solutions
1- On save() all the M2O, O2M, M2M that has not been initialized should be False (which i think is the best option)
2- Create for id a negative number based on xmlrpc.maxint to not OverFlow the value

Mean time for executing scripts theres a option that forces to use 32 bits interpreter instead of the 64 one

export VERSIONER_PYTHON_PREFER_32_BIT=yes

How to use filter by order?

I don't know how to filter and return ordened object. It's avaible this feature?

  1. Doc. don't ask about this feature.
  2. ooop.py I don't see any by order :(

ResPartner.new() problem with OpenERP 6.0rc2

This call finish with this error:

[...]
/usr/lib/python2.6/httplib.pyc in readheaders(self)
    263         firstline = 1
    264         startofline = unread = tell = None
--> 265         if hasattr(self.fp, 'unread'):
    266             unread = self.fp.unread
    267         elif self.seekable:

AttributeError: '_fileobject' object has no attribute 'unread'

URI

Change the localhost in OOOP init to URI to be able to use https or other port number

Make tests

To use a tdd methodology is a better approach for development

Error on 64 bits with saving default relations

Comes from Issue #19

xmlrpc just supports 32bit integers on a 64bit machine python id functions return a 64 number as object id when it creates a new instance of openerp object and is not automatically saved or is not manually saved it trys to send the number on to the server giving a OverFlow error.

save_all()

The save_all doesn't work.

The problem is when i make a related object internally its created in a new instance, so in the save time, the main object doesn't have access to the related object to save it.

Upload ooop to Pypi

Please can you upload the ooop package to Pypi?
I use it in other project and could be great it installs ooop by dependence downloading it from pypi.

Thanks

Search handling...

Hi there... great idea, I look forward to contributing. Looking to incorporate into Django to simplify things a touch.

Anyhow, I've got an issue when using all() with a large number of records. Actually, it's a large number of analytic accounts (1000+) and I'm attempting to do:
res_users.all()
Because of the large number of AA's, a very large select shows up in pg_stat_activity:
SELECT DISTINCT("user") FROM account_analytic_analysis_summary_user WHERE account_id in
In my test environment I've let it spin for a while but eventually had to kill the process.

I took a brief peek at the code but I'm not entirely clear on how the recursive is happening (load_models?)

Error in recuperate object with get

Hi, when you try to get a object with .get and the parameter isnΒ΄t integer, the function return a valid object but with false attributes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.