Merge lp:~jfb-tempo-consulting/unifield-server/US-4204 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 4879
Proposed branch: lp:~jfb-tempo-consulting/unifield-server/US-4204
Merge into: lp:unifield-server
Diff against target: 27 lines (+3/-2)
1 file modified
bin/addons/consumption_calculation/consumption_calculation.py (+3/-2)
To merge this branch: bzr merge lp:~jfb-tempo-consulting/unifield-server/US-4204
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+343393@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/addons/consumption_calculation/consumption_calculation.py'
--- bin/addons/consumption_calculation/consumption_calculation.py 2018-04-03 10:18:51 +0000
+++ bin/addons/consumption_calculation/consumption_calculation.py 2018-04-17 09:11:58 +0000
@@ -1737,12 +1737,13 @@
1737 if from_date and to_date:1737 if from_date and to_date:
1738 rac_ids = self.pool.get('real.average.consumption').search(cr, uid, [1738 rac_ids = self.pool.get('real.average.consumption').search(cr, uid, [
1739 ('cons_location_id', 'in', location_ids),1739 ('cons_location_id', 'in', location_ids),
1740 ('state', '!=', 'cancel'),
1740 # All lines with a report started out the period and finished in the period1741 # All lines with a report started out the period and finished in the period
1741 '|', '&', ('period_to', '>=', from_date), ('period_to', '<=', to_date),1742 '|', '&', ('period_to', '>=', from_date), ('period_to', '<=', to_date),
1742 #  All lines with a report started in the period and finished out the period1743 #  All lines with a report started in the period and finished out the period
1743 '|', '&', ('period_from', '<=', to_date), ('period_from', '>=', from_date),1744 '|', '&', ('period_from', '<=', to_date), ('period_from', '>=', from_date),
1744 #  All lines with a report started before the period and finished after the period1745 #  All lines with a report started before the period and finished after the period
1745 '&', ('period_from', '<=', from_date), ('period_to', '>=', to_date)1746 '&', ('period_from', '<=', from_date), ('period_to', '>=', to_date),
1746 ])1747 ])
1747 rcr_domain = [('product_id', '=', id), ('rac_id', 'in', rac_ids)]1748 rcr_domain = [('product_id', '=', id), ('rac_id', 'in', rac_ids)]
17481749
@@ -1837,7 +1838,7 @@
1837 # Search all real consumption line included in the period1838 # Search all real consumption line included in the period
1838 # If no period found, take all stock moves1839 # If no period found, take all stock moves
1839 if from_date and to_date:1840 if from_date and to_date:
1840 rcr_domain = ['&', ('product_id', 'in', ids),1841 rcr_domain = ['&', '&', ('rac_id.state', '!=', 'cancel'), ('product_id', 'in', ids),
1841 # All lines with a report started out the period and finished in the period1842 # All lines with a report started out the period and finished in the period
1842 '|', '&', ('rac_id.period_to', '>=', from_date), ('rac_id.period_to', '<=', to_date),1843 '|', '&', ('rac_id.period_to', '>=', from_date), ('rac_id.period_to', '<=', to_date),
1843 # All lines with a report started in the period and finished out the period1844 # All lines with a report started in the period and finished out the period

Subscribers

People subscribed via source and target branches