Similarly to the recent fixes in Purchase Analysis,
the Sales Analysis view must not group on the quantity
field. It is one of the columns that must be aggregated,
not used to fold PO lines into the same
result row.
The line count was also incorrect because of this, and
had to be corrected to actually count() the underlying
SO lines.
In addition, the JOINs were done in the wrong order,
which could cause problems (e.g. if an empty SO ever
landed in the database, all the SO line columns
would be empty in the JOIN, and cause errors)
bzr revid: odo@openerp.com-20131105103011-vkix07lsb6q3y9fd
The product quantity is one of the columns that must be
aggregated, not used to fold PO lines into the same
result row.
This, combined with missing aggregation operators
was causing multiple identical PO lines from the
same PO to be merged together and only counted once
in some aggregations.
bzr revid: odo@openerp.com-20131105101930-f2qbcp12luom08je
It is a common need to set a higher decimal precision
for `Product Price` (i.e. the product cost field) for
high volume / low value items. This may typically
require up to 4-6 decimals for e.g. EUR/USD-based
companies where the currency has 2 decimals.
In that case the product cost should be stored with
full precision without applying the currency rounding.
The appropriate currency rounding will be applied
anyway as soon as a transaction actually uses that
product cost (typically in a SO/PO)
bzr revid: odo@openerp.com-20131104173232-84g115x6ykxoc1rh
While processing a picking we must keep track of
previously processed lines as they modify the
stock on hand but are not yet included in the
`qty_available` function.
Negative stock on hand is handled as if
the stock was zero as far as the average
price computation is concerned.
bzr revid: odo@openerp.com-20131104171245-z1lgsplyu4cdz9gc
Without the right precision the default rounding is
applied and causes a possible loss of precision when
the `Product Price` precision is increased.
This can in turn lead to incorrect average price
computations.
bzr revid: odo@openerp.com-20131104170118-ls5q0yridevw0jgt
The starting table for Purchase Analysis is purchase_order_line
not purchase_order. The previous code was using a wrong JOIN
combination starting from purchase_order, which resulted in
a crash if an empty PO was created.
In order to prevent this an extra WHERE clause on product_id
being NOT NULL was added, but this was incorrect too as it
prevented PO lines with no product_id value from appearing
in the Purchase Analysis results, while being perfectly valid.
bzr revid: odo@openerp.com-20131104165826-kltuzlh4i8q89sk0
When processing a translation, the module used to replace the original term by the translated value for accounts (only object with force_write=True). Now getting real multilang feature.
Generates the accounts with no language to get the untranslated value
bzr revid: mat@openerp.com-20131104095729-hwh2cocudxnhunyz
message_update. This behavior makes sens only in message_new when
setting initial parameter of the applicant, not when somebody sends
an email on the record.
Removed priority change when there is a 'priority' key in msg; but
this key is not likely to be present in a parsed email.
Removed updated values change due to a mapping of values present in
the email. This code was a copy-and-paste from crm and did not have
any meaning in hr_recruitment.
Also removed unnecessary code in project, project_issue, crm_helpdesk
and crm_claim for the same reasons as for hr_recruitment.
bzr revid: tde@openerp.com-20131104092731-ixasweoy1dbllbb3
When processing a translation, the module used to replace the original term by the translated value for accounts (only object with force_write=True).
This lead to only having the translated version for every user, independent of user's language.
On new chart of accounts, will have different account names according to the user preference.
Keep argument force_write in API for stability reason (will be removed in trunk)
bzr revid: mat@openerp.com-20131030111303-ziusplk330oj9wf4
This error probably stems from the useless complexity of
the SQL view declaration and the double GROUP BY levels.
The patch rewrites the view query with a single GROUP BY
level and proper aggregation levels, but the core part
of the patch is to replace the outer `group by product_qty`
with a `sum(product_qty)`.
Some columns were also mentioned twice in the same GROUP
BY clause, for some reason.
bzr revid: odo@openerp.com-20131025103626-7l78kdjjr7c2wesb
Due to the relationship between fiscal position
templates and tax templates, the removal of
obsolete tax templates may crash if the corresponding
fiscal positions are not deleted before.
In a recent l10n_fr patch [1] a number of
templates disappeared, which causes an error during
subsequent updates on databases where the obsolete
templates are still present.
As a workaround, we can force a deletion of
all fiscal position templates before loading
them. This is relatively safe because the templates
are not connected to live data, and will be
re-created during the update (except for the
obsolete ones which will be gone forever).
[1] addons 7.0 rev 9515 rev-id: odo@openerp.com-20131010114424-atzr3bl9e9diir2g
lp bug: https://launchpad.net/bugs/1240265 fixed
bzr revid: odo@openerp.com-20131021124748-x4jnibwyab4gam23