Wednesday, May 18, 2016
2 changes · master
Enhancements to existing features
This update standardizes how database query values are handled in the point of_sale reporting area and related tests. It helps keep Odoo aligned with database driver requirements, reducing the risk of avoidable technical errors without changing business workflows.
Original PR description
**Description of the issue/feature this PR addresses:** This commit had been submitted previously, #11846, but was closed due to some house keeping I had performed on my branch. It addresses the use…
**Description of the issue/feature this PR addresses:** This commit had been submitted previously, #11846, but was closed due to some house keeping I had performed on my branch. It addresses the use of %d as a placeholder within the point_of_sale module's "pos_order_report" report and openerp/tests' common.py. Per psycopg's documentation[1], "the variables placeholder must always be a %s, even if a different placeholder (such as a %d for integers or %f for floats) may look more appropriate." [1] http://initd.org/psycopg/docs/usage.html#passing-parameters-to-sql-queries See commit ed7567d, as well, which reads as follows: [REM] sql_db: legacy useless tests and duplicate exception block The test for %f/%d is useless, eveybody has been using %s for ages, and the psycopg2 error is pretty explicit if you don't. **Current behavior before PR:** The use of %d should lead to an error, according to both psycopg's documentation and @odony, but isn't. This behavior, however, has nothing to do with the sql_db test being removed in ed7567d as that test was still present on 9.0 when I checked. **Desired behavior after PR is merged:** Compliant type. I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Cody Kitterman
Code cleanup and technical improvements
This pull request reorganizes and modernizes the Manufacturing app’s internal structure to prepare for upcoming production planning improvements. Most changes are behind the scenes, helping make future manufacturing, repair, byproduct, and operations updates cleaner and easier to maintain.