Merge lp:~unifield-team/unifield-server/us-3478-3479 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 4589
Proposed branch: lp:~unifield-team/unifield-server/us-3478-3479
Merge into: lp:unifield-server
Diff against target: 1859 lines (+1497/-40)
31 files modified
bin/addons/msf_profile/i18n/fr_MF.po (+214/-0)
bin/addons/procurement_request/__openerp__.py (+1/-0)
bin/addons/procurement_request/procurement_request.py (+34/-4)
bin/addons/procurement_request/procurement_request_line_wizard.xml (+25/-0)
bin/addons/procurement_request/procurement_request_view.xml (+7/-0)
bin/addons/procurement_request/wizard/__init__.py (+1/-0)
bin/addons/procurement_request/wizard/procurement_request_line_wizard.py (+44/-0)
bin/addons/purchase/purchase_order_line.py (+8/-13)
bin/addons/purchase/purchase_workflow.py (+4/-0)
bin/addons/purchase_followup/__init__.py (+1/-0)
bin/addons/purchase_followup/__openerp__.py (+3/-1)
bin/addons/purchase_followup/report/__init__.py (+1/-0)
bin/addons/purchase_followup/report/po_track_changes_report.py (+92/-0)
bin/addons/purchase_followup/report/po_track_changes_report.xml (+18/-0)
bin/addons/purchase_followup/report/po_track_changes_report_xls.mako (+299/-0)
bin/addons/purchase_followup/wizard/__init__.py (+22/-0)
bin/addons/purchase_followup/wizard/po_track_changes_wizard.py (+130/-0)
bin/addons/purchase_followup/wizard/po_track_changes_wizard_view.xml (+39/-0)
bin/addons/sale/sale_order.py (+1/-1)
bin/addons/sale/sale_workflow.py (+1/-0)
bin/addons/sales_followup/__openerp__.py (+2/-0)
bin/addons/sales_followup/report/__init__.py (+1/-0)
bin/addons/sales_followup/report/ir_track_changes_report.py (+73/-0)
bin/addons/sales_followup/report/ir_track_changes_report.xml (+18/-0)
bin/addons/sales_followup/report/ir_track_changes_report_xls.mako (+283/-0)
bin/addons/sales_followup/wizard/__init__.py (+1/-0)
bin/addons/sales_followup/wizard/ir_track_changes_wizard.py (+130/-0)
bin/addons/sales_followup/wizard/ir_track_changes_wizard_view.xml (+39/-0)
bin/addons/sourcing/procurement_order.py (+2/-0)
bin/addons/sourcing/sale_order_line.py (+3/-0)
bin/addons/sourcing/sourcing_view.xml (+0/-21)
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-3478-3479
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+332845@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/msf_profile/i18n/fr_MF.po'
--- bin/addons/msf_profile/i18n/fr_MF.po 2017-10-09 16:01:14 +0000
+++ bin/addons/msf_profile/i18n/fr_MF.po 2017-10-26 10:06:24 +0000
@@ -99629,3 +99629,217 @@
99629#, python-format99629#, python-format
99630msgid "You can't delete this FX rate as the period \"%s\" isn't in Draft state."99630msgid "You can't delete this FX rate as the period \"%s\" isn't in Draft state."
99631msgstr "Vous ne pouvez pas supprimer ce taux de change car la période \"%s\" n'est pas en statut Brouillon."99631msgstr "Vous ne pouvez pas supprimer ce taux de change car la période \"%s\" n'est pas en statut Brouillon."
99632
99633#. modules: purchase, purchase_override, procurement_request
99634#: field:sale.order.line,original_price:0
99635#: field:purchase.order.line,original_price:0
99636#: field:purchase.order.merged.line,original_price:0
99637msgid "Original Price"
99638msgstr "Prix d'Origine"
99639
99640#. modules: purchase, purchase_override, procurement_request
99641#: field:sale.order.line,original_product:0
99642#: field:purchase.order.line,original_product:0
99643#: field:purchase.order.merged.line,original_product:0
99644msgid "Original Product"
99645msgstr "Produit d'Origine"
99646
99647#. modules: purchase, purchase_override, procurement_request
99648#: field:sale.order.line,original_uom:0
99649#: field:purchase.order.line,original_uom:0
99650#: field:purchase.order.merged.line,original_uom:0
99651msgid "Original UoM"
99652msgstr "UdM d'Origine"
99653
99654#. modules: purchase, purchase_followup, purchase_override
99655#: field:purchase.order.line,original_currency_id:0
99656#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:244
99657#: field:purchase.order.merged.line,original_currency_id:0
99658msgid "Original Currency"
99659msgstr "Devise d'Origine"
99660
99661#. modules: purchase, purchase_override, procurement_request
99662#: field:sale.order.line,original_changed:0
99663#: field:purchase.order.line,original_changed:0
99664#: field:purchase.order.merged.line,original_changed:0
99665msgid "Changed"
99666msgstr "Changé"
99667
99668#. modules: sales_followup, purchase, purchase_followup, purchase_override, procurement_request
99669#: field:sale.order.line,original_qty:0
99670#: field:purchase.order.line,original_qty:0
99671#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:239
99672#: field:purchase.order.merged.line,original_qty:0
99673#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:231
99674msgid "Original Qty"
99675msgstr "Qté d'Origine"
99676
99677#. module: sales_followup
99678#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:236
99679msgid "Original Subtotal"
99680msgstr "Sous-Total d'Origine"
99681
99682#. module: purchase_followup
99683#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:246
99684msgid "Original Price in functional currency"
99685msgstr "Prix d'Origine en devise fonctionnelle"
99686
99687#. modules: sales_followup, purchase_followup
99688#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:240
99689#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:232
99690msgid "Original UoM"
99691msgstr "UdM d'Origine"
99692
99693#. modules: sales_followup, purchase_followup
99694#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:236
99695#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:228
99696msgid "Original Code"
99697msgstr "Code d'Origine"
99698
99699#. modules: sales_followup, purchase_followup
99700#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:243
99701#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:234
99702msgid "Original Unit Price"
99703msgstr "Prix Unitaire d'Origine"
99704
99705#. module: purchase_followup
99706#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:248
99707msgid "Original Subtotal (functional currency)"
99708msgstr "Sous-Total d'Origine (devise fonctionnelle)"
99709
99710#. modules: sales_followup, purchase_followup
99711#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:241
99712#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:233
99713msgid "Unit Price"
99714msgstr "Prix Unitaire"
99715
99716#. modules: sales_followup, purchase_followup
99717#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:231
99718#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:223
99719msgid "Order ref"
99720msgstr "Ref commande"
99721
99722#. modules: sales_followup, purchase_followup
99723#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:192
99724#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:184
99725msgid "Address:"
99726msgstr "Adresse:"
99727
99728#. modules: sales_followup, purchase_followup
99729#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:181
99730#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:173
99731msgid "Name:"
99732msgstr "Nom:"
99733
99734#. modules: sales_followup, purchase_followup
99735#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:249
99736#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:237
99737msgid "Modification comment"
99738msgstr "Commentaire de modification"
99739
99740#. module: sales_followup
99741#: model:ir.actions.report.xml,name:sales_followup.report_ir_track_changes_xls
99742msgid "Internal Request Track Changes Excel Export"
99743msgstr "Export Excel du Suivi des Changements des Demandes Internes"
99744
99745#. modules: sales_followup, purchase_followup
99746#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:176
99747#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:168
99748msgid "Instance information"
99749msgstr "Informations sur l'instance"
99750
99751#. modules: sales_followup, purchase_followup
99752#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:206
99753#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:198
99754msgid "Order Ref:"
99755msgstr "Ref Commande:"
99756
99757#. modules: sales_followup, purchase_followup
99758#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:213
99759#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:205
99760msgid "Date of the request:"
99761msgstr "Date de la requête:"
99762
99763#. modules: sales_followup, purchase_followup
99764#: code:addons/purchase_followup/wizard/po_track_changes_wizard.py:94
99765#: code:addons/sales_followup/wizard/ir_track_changes_wizard.py:94
99766#, python-format
99767msgid "No data found with these parameters"
99768msgstr "Aucune donnée n'a été trouvée avec ces paramètres"
99769
99770#. module: sales_followup
99771#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:235
99772msgid "Subtotal"
99773msgstr "Sous-Total"
99774
99775#. modules: sales_followup, purchase_followup
99776#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:195
99777#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:187
99778msgid "Date end:"
99779msgstr "Date de fin:"
99780
99781#. modules: sales_followup
99782#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:229
99783#, python-format
99784msgid "Qty"
99785msgstr "Qté"
99786
99787#. modules: sales_followup, purchase_followup
99788#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:178
99789#: view:po.track.changes.wizard:0
99790#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:170
99791#: view:ir.track.changes.wizard:0
99792msgid "Request parameters"
99793msgstr "Paramètres de la requête"
99794
99795#. modules: sales_followup, purchase_followup
99796#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:184
99797#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:176
99798msgid "Date start:"
99799msgstr "Date de départ:"
99800
99801#. module: sales_followup
99802#: model:ir.actions.act_window,name:sales_followup.action_ir_track_changes_wizard
99803#: model:ir.ui.menu,name:sales_followup.menu_ir_track_changes
99804msgid "IR Track Changes"
99805msgstr "Suivi Changements Demandes Internes"
99806
99807#. modules: sales_followup, purchase_followup
99808#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:232
99809#: report:addons/sales_followup/report/ir_track_changes_report_xls.mako:224
99810#, python-format
99811msgid "Status"
99812msgstr "État"
99813
99814#. module: purchase_followup
99815#: model:ir.actions.act_window,name:purchase_followup.action_po_track_changes_wizard
99816#: model:ir.ui.menu,name:purchase_followup.menu_po_track_changes
99817msgid "PO Track Changes"
99818msgstr "Suivi Changements Bons de Commande"
99819
99820#. module: purchase_followup
99821#: model:ir.actions.report.xml,name:purchase_followup.report_po_track_changes_xls
99822msgid "Purchase Order Track Changes Excel Export"
99823msgstr "Export Excel du Suivi des Changements des Bons de Commande"
99824
99825#. module: purchase_followup
99826#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:245
99827msgid "Price in functional currency"
99828msgstr "Prix dans la devise fonctionnelle"
99829
99830#. modules: purchase_followup
99831#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:242
99832msgid "Currency"
99833msgstr "Devise"
99834
99835#. module: purchase_followup
99836#: report:addons/purchase_followup/report/po_track_changes_report_xls.mako:247
99837msgid "Subtotal (functional currency)"
99838msgstr "Sous-Total (devise fonctionnelle)"
99839
99840#. modules: purchase, purchase_override, sale
99841#: field:purchase.order.line,modification_comment:0
99842#: field:purchase.order.merged.line,modification_comment:0
99843#: field:sale.order.line,modification_comment:0
99844msgid "Modification Comment"
99845msgstr "Commentaire de Modification"
9963299846
=== modified file 'bin/addons/procurement_request/__openerp__.py'
--- bin/addons/procurement_request/__openerp__.py 2017-09-28 14:05:02 +0000
+++ bin/addons/procurement_request/__openerp__.py 2017-10-26 10:06:24 +0000
@@ -45,6 +45,7 @@
45 'procurement_request_sequence.xml',45 'procurement_request_sequence.xml',
46 'procurement_request_wizard.xml',46 'procurement_request_wizard.xml',
47 'procurement_request_report.xml',47 'procurement_request_report.xml',
48 'procurement_request_line_wizard.xml',
48 'wizard/wizard_import_list_view.xml',49 'wizard/wizard_import_list_view.xml',
49 ],50 ],
50 'demo_xml': [51 'demo_xml': [
5152
=== modified file 'bin/addons/procurement_request/procurement_request.py'
--- bin/addons/procurement_request/procurement_request.py 2017-10-03 16:01:45 +0000
+++ bin/addons/procurement_request/procurement_request.py 2017-10-26 10:06:24 +0000
@@ -694,15 +694,44 @@
694694
695 for line in self.browse(cr, uid, ids, context=context):695 for line in self.browse(cr, uid, ids, context=context):
696 changed = False696 changed = False
697 if line.modification_comment or (line.original_qty and line.original_price and line.original_uom):697 if line.modification_comment or (line.original_qty and line.product_uom_qty != line.original_qty):
698 if line.modification_comment or line.product_uom_qty != line.original_qty \698 changed = True
699 or line.price_unit != line.original_price or line.product_uom != line.original_uom:
700 changed = True
701699
702 res[line.id] = changed700 res[line.id] = changed
703701
704 return res702 return res
705703
704 def button_view_changed(self, cr, uid, ids, context=None):
705 """
706 Launch wizard to display line information
707 """
708 if not context:
709 context = {}
710 if isinstance(ids, (int, long)):
711 ids = [ids]
712
713 wiz_obj = self.pool.get('procurement.request.line.wizard')
714 cols = ['product_id', 'original_product', 'product_uom_qty', 'original_qty', 'price_unit',
715 'original_price', 'product_uom', 'original_uom', 'modification_comment']
716 sol = self.read(cr, uid, ids[0], cols, context=context)
717 wiz_id = wiz_obj.create(cr, uid, sol, context=context)
718
719 context.update({
720 'active_id': ids[0],
721 'active_ids': ids,
722 })
723
724 return {
725 'name': _('Original Data Internal Request Line'),
726 'type': 'ir.actions.act_window',
727 'res_model': 'procurement.request.line.wizard',
728 'view_type': 'form',
729 'view_mode': 'form',
730 'target': 'new',
731 'res_id': [wiz_id],
732 'context': context,
733 }
734
706 _columns = {735 _columns = {
707 'cost_price': fields.float(string='Cost price', digits_compute=dp.get_precision('Sale Price Computation')),736 'cost_price': fields.float(string='Cost price', digits_compute=dp.get_precision('Sale Price Computation')),
708 'procurement_request': fields.boolean(string='Internal Request', readonly=True),737 'procurement_request': fields.boolean(string='Internal Request', readonly=True),
@@ -715,6 +744,7 @@
715 'product_id_ok': fields.function(_get_product_id_ok, type="boolean", method=True, string='Product defined?', help='for if true the button "configurator" is hidden'),744 'product_id_ok': fields.function(_get_product_id_ok, type="boolean", method=True, string='Product defined?', help='for if true the button "configurator" is hidden'),
716 'product_ok': fields.boolean('Product selected'),745 'product_ok': fields.boolean('Product selected'),
717 'comment_ok': fields.boolean('Comment written'),746 'comment_ok': fields.boolean('Comment written'),
747 'original_product': fields.many2one('product.product', 'Original Product'),
718 'original_qty': fields.float('Original Qty'),748 'original_qty': fields.float('Original Qty'),
719 'original_price': fields.float('Original Price'),749 'original_price': fields.float('Original Price'),
720 'original_uom': fields.many2one('product.uom', 'Original UOM'),750 'original_uom': fields.many2one('product.uom', 'Original UOM'),
721751
=== added file 'bin/addons/procurement_request/procurement_request_line_wizard.xml'
--- bin/addons/procurement_request/procurement_request_line_wizard.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/procurement_request/procurement_request_line_wizard.xml 2017-10-26 10:06:24 +0000
@@ -0,0 +1,25 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4 <record model="ir.ui.view" id="procurement_request_line_wizard_form">
5 <field name="name">procurement.request.line.wizard.form"</field>
6 <field name="model">procurement.request.line.wizard</field>
7 <field name="type">form</field>
8 <field name="arch" type='xml'>
9 <form string="Original Data Internal Request Line">
10 <field name="product_id" colspan="2"/>
11 <field name="original_product" colspan="2"/>
12 <field name="product_uom_qty" colspan="2"/>
13 <field name="original_qty" colspan="2"/>
14 <field name="price_unit" colspan="2"/>
15 <field name="original_price" colspan="2"/>
16 <field name="product_uom" colspan="2"/>
17 <field name="original_uom" colspan="2"/>
18 <field name="modification_comment" colspan="4"/>
19 <newline/>
20 <button icon="gtk-cancel" special="cancel" string="Close Wizard" colspan="4"/>
21 </form>
22 </field>
23 </record>
24 </data>
25</openerp>
0\ No newline at end of file26\ No newline at end of file
127
=== modified file 'bin/addons/procurement_request/procurement_request_view.xml'
--- bin/addons/procurement_request/procurement_request_view.xml 2017-10-16 09:46:36 +0000
+++ bin/addons/procurement_request/procurement_request_view.xml 2017-10-26 10:06:24 +0000
@@ -9,6 +9,7 @@
9 <field name="priority" eval="250" />9 <field name="priority" eval="250" />
10 <field name="arch" type="xml">10 <field name="arch" type="xml">
11 <form string="Internal Request">11 <form string="Internal Request">
12 <field name="sourcing_trace_ok" invisible="1" />
12 <group colspan="6" attrs="{'invisible': [('state', 'not in', ['validated', 'validated_p'])]}">13 <group colspan="6" attrs="{'invisible': [('state', 'not in', ['validated', 'validated_p'])]}">
13 <html>14 <html>
14 <p style="text-align:center; color: red; font-weight: bold; font-size: 1.2em;">15 <p style="text-align:center; color: red; font-weight: bold; font-size: 1.2em;">
@@ -34,6 +35,7 @@
34 <field name="fo_to_resource" invisible="1" />35 <field name="fo_to_resource" invisible="1" />
35 <field name="parent_order_name" attrs="{'invisible': [('fo_to_resource', '=', False)]}" />36 <field name="parent_order_name" attrs="{'invisible': [('fo_to_resource', '=', False)]}" />
36 </group>37 </group>
38
37 <notebook colspan="5">39 <notebook colspan="5">
38 <page string="Products">40 <page string="Products">
39 <button colspan="4" string="Round Qty to SoQ" type="object" name="round_to_soq" icon="gtk-execute" attrs="{'invisible': [('state', '!=', 'draft')]}" />41 <button colspan="4" string="Round Qty to SoQ" type="object" name="round_to_soq" icon="gtk-execute" attrs="{'invisible': [('state', '!=', 'draft')]}" />
@@ -66,6 +68,8 @@
66 icon="terp-go-week" />68 icon="terp-go-week" />
67 <field name="product_uom_qty" on_change="onchange_uom(product_id, product_uom, product_uom_qty)" />69 <field name="product_uom_qty" on_change="onchange_uom(product_id, product_uom, product_uom_qty)" />
68 <field name="original_changed" readonly="1"/>70 <field name="original_changed" readonly="1"/>
71 <button name="button_view_changed" string="View Current/Original" type="object" icon="terp-stock_zoom"
72 attrs="{'invisible': [('original_changed', '=', False)]}"/>
69 <field name="price_unit"/>73 <field name="price_unit"/>
70 <field name="notes" />74 <field name="notes" />
71 <field name="display_resourced_orig_line" />75 <field name="display_resourced_orig_line" />
@@ -122,6 +126,9 @@
122 <page string="Notes">126 <page string="Notes">
123 <field name="notes" nolabel="1" />127 <field name="notes" nolabel="1" />
124 </page>128 </page>
129 <page string="Sourcing Logs" attrs="{'invisible': [('sourcing_trace_ok', '=', False)]}">
130 <field name="sourcing_trace" colspan="4" nolabel="1" />
131 </page>
125 </notebook>132 </notebook>
126 </form>133 </form>
127 </field>134 </field>
128135
=== modified file 'bin/addons/procurement_request/wizard/__init__.py'
--- bin/addons/procurement_request/wizard/__init__.py 2011-05-13 14:36:09 +0000
+++ bin/addons/procurement_request/wizard/__init__.py 2017-10-26 10:06:24 +0000
@@ -23,6 +23,7 @@
23import wizard_list_to_order23import wizard_list_to_order
24import wizard_list_to_rfq24import wizard_list_to_rfq
25import wizard_import_list25import wizard_import_list
26import procurement_request_line_wizard
2627
27# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:28# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2829
2930
=== added file 'bin/addons/procurement_request/wizard/procurement_request_line_wizard.py'
--- bin/addons/procurement_request/wizard/procurement_request_line_wizard.py 1970-01-01 00:00:00 +0000
+++ bin/addons/procurement_request/wizard/procurement_request_line_wizard.py 2017-10-26 10:06:24 +0000
@@ -0,0 +1,44 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2011 TeMPO Consulting, MSF
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from osv import osv
23from osv import fields
24
25
26class procurement_request_line_wizard(osv.osv_memory):
27 _name = 'procurement.request.line.wizard'
28 _description = 'Original Data Internal Request line'
29
30 _columns = {
31 'id': fields.integer('id'),
32 'product_id': fields.many2one('product.product', 'Current Product', readonly=True),
33 'original_product': fields.many2one('product.product', 'Original Product', readonly=True),
34 'product_uom_qty': fields.float('Current Qty', readonly=True),
35 'original_qty': fields.float('Original Qty', readonly=True),
36 'price_unit': fields.float('Current Price', readonly=True),
37 'original_price': fields.float('Original Price', readonly=True),
38 'product_uom': fields.many2one('product.uom', 'Current UOM', readonly=True),
39 'original_uom': fields.many2one('product.uom', 'Original UOM', readonly=True),
40 'modification_comment': fields.char('Modification Comment', size=1024, readonly=True),
41 }
42
43
44procurement_request_line_wizard()
045
=== modified file 'bin/addons/purchase/purchase_order_line.py'
--- bin/addons/purchase/purchase_order_line.py 2017-10-20 12:24:56 +0000
+++ bin/addons/purchase/purchase_order_line.py 2017-10-26 10:06:24 +0000
@@ -259,15 +259,8 @@
259259
260 for line in self.browse(cr, uid, ids, context=context):260 for line in self.browse(cr, uid, ids, context=context):
261 changed = False261 changed = False
262 if line.modification_comment\262 if line.modification_comment or (line.original_qty and line.product_qty != line.original_qty):
263 or (line.original_qty and line.original_price and line.original_uom and line.original_currency_id):263 changed = True
264 if line.modification_comment or line.product_qty != line.original_qty \
265 or line.price_unit != line.original_price or line.product_uom != line.original_uom\
266 or line.currency_id != line.original_currency_id:
267 changed = True
268 elif line.original_qty and line.original_uom and not line.original_price: # From IR
269 if line.original_qty != line.product_qty or line.original_uom.id != line.product_uom.id:
270 changed = True
271264
272 res[line.id] = changed265 res[line.id] = changed
273 return res266 return res
@@ -488,10 +481,10 @@
488 # not replacing the po_state from sale_followup - should ?481 # not replacing the po_state from sale_followup - should ?
489 'po_state_stored': fields.related('order_id', 'state', type='selection', selection=PURCHASE_ORDER_STATE_SELECTION, string='Po State', readonly=True,),482 'po_state_stored': fields.related('order_id', 'state', type='selection', selection=PURCHASE_ORDER_STATE_SELECTION, string='Po State', readonly=True,),
490 'po_partner_type_stored': fields.related('order_id', 'partner_type', type='selection', selection=PARTNER_TYPE, string='Po Partner Type', readonly=True,),483 'po_partner_type_stored': fields.related('order_id', 'partner_type', type='selection', selection=PARTNER_TYPE, string='Po Partner Type', readonly=True,),
491484 'original_product': fields.many2one('product.product', 'Original Product'),
492 'original_qty': fields.float('Original Qty'),485 'original_qty': fields.float('Original Qty'),
493 'original_price': fields.float('Original Price'),486 'original_price': fields.float('Original Price'),
494 'original_uom': fields.many2one('product.uom', 'Original UOM'),487 'original_uom': fields.many2one('product.uom', 'Original UoM'),
495 'original_currency_id': fields.many2one('res.currency', 'Original Currency'),488 'original_currency_id': fields.many2one('res.currency', 'Original Currency'),
496 'modification_comment': fields.char('Modification Comment', size=1024),489 'modification_comment': fields.char('Modification Comment', size=1024),
497 'original_changed': fields.function(_check_changed, method=True, string='Changed', type='boolean'),490 'original_changed': fields.function(_check_changed, method=True, string='Changed', type='boolean'),
@@ -1058,6 +1051,8 @@
1058 if vals.get('linked_sol_id'):1051 if vals.get('linked_sol_id'):
1059 sol_comment = self.pool.get('sale.order.line').read(cr, uid, vals.get('linked_sol_id'), ['comment'], context=context)['comment']1052 sol_comment = self.pool.get('sale.order.line').read(cr, uid, vals.get('linked_sol_id'), ['comment'], context=context)['comment']
1060 vals.update({'comment': sol_comment})1053 vals.update({'comment': sol_comment})
1054 if not product_id and not vals.get('name'): # US-3530
1055 vals.update({'name': 'None'})
10611056
1062 # add the database Id to the sync_order_line_db_id1057 # add the database Id to the sync_order_line_db_id
1063 po_line_id = super(purchase_order_line, self).create(cr, uid, vals, context=context)1058 po_line_id = super(purchase_order_line, self).create(cr, uid, vals, context=context)
@@ -1127,9 +1122,9 @@
11271122
1128 default.update({'state': 'draft', 'move_ids': [], 'invoiced': 0, 'invoice_lines': [], 'commitment_line_ids': []})1123 default.update({'state': 'draft', 'move_ids': [], 'invoiced': 0, 'invoice_lines': [], 'commitment_line_ids': []})
11291124
1130 for field in ['origin', 'move_dest_id', 'original_qty', 'original_price', 'original_uom', 'original_currency_id', 'modification_comment', 'sync_linked_sol']:1125 for field in ['origin', 'move_dest_id', 'original_product', 'original_qty', 'original_price', 'original_uom', 'original_currency_id', 'modification_comment', 'sync_linked_sol']:
1131 if field not in default:1126 if field not in default:
1132 default[field]= False1127 default[field] = False
11331128
1134 default.update({'sync_order_line_db_id': False, 'set_as_sourced_n': False, 'set_as_validated_n': False, 'linked_sol_id': False, 'link_so_id': False})1129 default.update({'sync_order_line_db_id': False, 'set_as_sourced_n': False, 'set_as_validated_n': False, 'linked_sol_id': False, 'link_so_id': False})
11351130
11361131
=== modified file 'bin/addons/purchase/purchase_workflow.py'
--- bin/addons/purchase/purchase_workflow.py 2017-10-18 07:20:45 +0000
+++ bin/addons/purchase/purchase_workflow.py 2017-10-26 10:06:24 +0000
@@ -333,6 +333,10 @@
333 'original_price': pol.price_unit,333 'original_price': pol.price_unit,
334 'original_currency_id': pol.currency_id.id334 'original_currency_id': pol.currency_id.id
335 }335 }
336
337 if not pol.original_product:
338 line_update['original_product'] = pol.product_id.id
339
336 if not pol.original_qty:340 if not pol.original_qty:
337 line_update['original_qty'] = pol.product_qty341 line_update['original_qty'] = pol.product_qty
338342
339343
=== modified file 'bin/addons/purchase_followup/__init__.py'
--- bin/addons/purchase_followup/__init__.py 2017-09-28 12:19:50 +0000
+++ bin/addons/purchase_followup/__init__.py 2017-10-26 10:06:24 +0000
@@ -21,5 +21,6 @@
2121
22import purchase_followup22import purchase_followup
23import report23import report
24import wizard
2425
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2627
=== modified file 'bin/addons/purchase_followup/__openerp__.py'
--- bin/addons/purchase_followup/__openerp__.py 2017-10-09 21:06:10 +0000
+++ bin/addons/purchase_followup/__openerp__.py 2017-10-26 10:06:24 +0000
@@ -35,7 +35,9 @@
35 'init_xml' : [ ],35 'init_xml' : [ ],
36 "update_xml": [36 "update_xml": [
37 "purchase_followup_view.xml",37 "purchase_followup_view.xml",
38 "report/purchase_follow_up_report.xml"38 "report/purchase_follow_up_report.xml",
39 "report/po_track_changes_report.xml",
40 "wizard/po_track_changes_wizard_view.xml",
39 ],41 ],
40 'demo_xml' : [ ],42 'demo_xml' : [ ],
41 'test': [43 'test': [
4244
=== modified file 'bin/addons/purchase_followup/report/__init__.py'
--- bin/addons/purchase_followup/report/__init__.py 2014-05-07 14:04:54 +0000
+++ bin/addons/purchase_followup/report/__init__.py 2017-10-26 10:06:24 +0000
@@ -1,1 +1,2 @@
1import purchase_follow_up_report1import purchase_follow_up_report
2import po_track_changes_report
23
=== added file 'bin/addons/purchase_followup/report/po_track_changes_report.py'
--- bin/addons/purchase_followup/report/po_track_changes_report.py 1970-01-01 00:00:00 +0000
+++ bin/addons/purchase_followup/report/po_track_changes_report.py 2017-10-26 10:06:24 +0000
@@ -0,0 +1,92 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2011 TeMPO Consulting, MSF. All Rights Reserved
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22
23import time
24from report import report_sxw
25from spreadsheet_xml.spreadsheet_xml_write import SpreadsheetReport
26
27
28class po_track_changes_report_parser(report_sxw.rml_parse):
29 def __init__(self, cr, uid, name, context=None):
30 super(po_track_changes_report_parser, self).__init__(cr, uid, name, context=context)
31 self.cr = cr
32 self.uid = uid
33 self.user_company = self._get_user_company()
34 self.localcontext.update({
35 'time': time,
36 'getLines': self._get_po_lines,
37 'userCompany': self.user_company,
38 'computeCurrency': self._compute_currency
39 })
40
41 def _get_po_lines(self, report):
42 '''
43 Return the lines for the report
44 '''
45 result = []
46 for line in report.po_line_ids:
47 result.append(self.pool.get('purchase.order.line').browse(self.cr, self.uid, line))
48
49 return sorted(result, key=lambda r: (r['order_id']['name']), reverse=True)
50
51 def _get_user_company(self):
52 '''
53 Return user's current company
54 '''
55 return self.pool.get('res.users').browse(self.cr, self.uid, self.uid).company_id
56
57 def _compute_currency(self, pol, original=False):
58 '''
59 Compute an amount of a given currency to the instance's currency
60 '''
61 currency_obj = self.pool.get('res.currency')
62
63 from_currency_id = pol.currency_id.id
64 if original and pol.original_currency_id:
65 from_currency_id = pol.original_currency_id.id
66
67 context = {'date': pol.date_planned}
68 to_currency_id = self.user_company['currency_id'].id
69
70 if from_currency_id == to_currency_id:
71 return round(pol.price_unit, 2)
72
73 return round(currency_obj.compute(self.cr, self.uid, from_currency_id, to_currency_id, pol.price_unit, round=False, context=context), 2)
74
75
76class po_track_changes_report_xls(SpreadsheetReport):
77 def __init__(self, name, table, rml=False, parser=report_sxw.rml_parse,
78 header='external', store=False):
79 super(po_track_changes_report_xls, self).__init__(name, table,
80 rml=rml, parser=parser, header=header, store=store)
81
82 def create(self, cr, uid, ids, data, context=None):
83 a = super(po_track_changes_report_xls, self).create(cr, uid, ids,
84 data, context)
85 return (a[0], 'xls')
86
87po_track_changes_report_xls(
88 'report.po.track.changes.report_xls',
89 'po.track.changes.wizard',
90 'addons/purchase_followup/report/po_track_changes_report_xls.mako',
91 parser=po_track_changes_report_parser,
92 header=False)
093
=== added file 'bin/addons/purchase_followup/report/po_track_changes_report.xml'
--- bin/addons/purchase_followup/report/po_track_changes_report.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/purchase_followup/report/po_track_changes_report.xml 2017-10-26 10:06:24 +0000
@@ -0,0 +1,18 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<openerp>
3 <data>
4
5 <report
6 id="report_po_track_changes_xls"
7 name="po.track.changes.report_xls"
8 model="po.track.changes.wizard"
9 string="Purchase Order Track Changes Excel Export"
10 file="purchase_followup/report/po_track_changes_report_xls.mako"
11 report_type="webkit"
12 header="False"
13 auto="False"
14 menu="False"
15 />
16
17 </data>
18</openerp>
019
=== added file 'bin/addons/purchase_followup/report/po_track_changes_report_xls.mako'
--- bin/addons/purchase_followup/report/po_track_changes_report_xls.mako 1970-01-01 00:00:00 +0000
+++ bin/addons/purchase_followup/report/po_track_changes_report_xls.mako 2017-10-26 10:06:24 +0000
@@ -0,0 +1,299 @@
1<?xml version="1.0"?>
2<?mso-application progid="Excel.Sheet"?>
3<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
4 xmlns:o="urn:schemas-microsoft-com:office:office"
5 xmlns:x="urn:schemas-microsoft-com:office:excel"
6 xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
7 xmlns:html="http://www.w3.org/TR/REC-html40">
8 <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
9 <Author>Unifield</Author>
10 <LastAuthor>MSFUser</LastAuthor>
11 <Created>2014-04-16T22:36:07Z</Created>
12 <Company>Medecins Sans Frontieres</Company>
13 <Version>11.9999</Version>
14 </DocumentProperties>
15 <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
16 <WindowHeight>11640</WindowHeight>
17 <WindowWidth>15480</WindowWidth>
18 <WindowTopX>120</WindowTopX>
19 <WindowTopY>75</WindowTopY>
20 <ProtectStructure>False</ProtectStructure>
21 <ProtectWindows>False</ProtectWindows>
22 </ExcelWorkbook>
23 <Styles>
24 <Style ss:ID="ssCell">
25 <Alignment ss:Vertical="Top" ss:WrapText="1"/>
26 <Font ss:Bold="1" />
27 </Style>
28 <Style ss:ID="ssCellBlue">
29 <Alignment ss:Vertical="Top" ss:WrapText="1"/>
30 <Font ss:Color="#0000FF" />
31 </Style>
32
33 <!-- File header -->
34 <Style ss:ID="big_header">
35 <Font x:Family="Swiss" ss:Size="14" ss:Bold="1"/>
36 </Style>
37 <Style ss:ID="file_header">
38 <Font ss:Size="9" />
39 <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
40 </Style>
41
42 <!-- Line header -->
43 <Style ss:ID="line_header">
44 <Borders>
45 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
46 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
47 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
48 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
49 </Borders>
50 <Font x:Family="Swiss" ss:Size="8" ss:Bold="1"/>
51 <Interior/>
52 </Style>
53 <Style ss:ID="line_header_orange">
54 <Borders>
55 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
56 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
57 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
58 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
59 </Borders>
60 <Font x:Family="Swiss" ss:Size="8" ss:Bold="1"/>
61 <Interior ss:Color="#F79646" ss:Pattern="Solid"/>
62 </Style>
63
64 <!-- Lines -->
65 <Style ss:ID="line_left">
66 <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
67 <Borders>
68 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
69 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
70 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
71 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
72 </Borders>
73 <Font ss:Size="8" ss:Color="#0000FF"/>
74 </Style>
75 <Style ss:ID="line_right">
76 <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
77 <Borders>
78 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
79 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
80 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
81 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
82 </Borders>
83 <Font ss:Size="8" ss:Color="#0000FF"/>
84 <NumberFormat ss:Format="#,##0.00"/>
85 </Style>
86 <Style ss:ID="line_center">
87 <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
88 <Borders>
89 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
90 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
91 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
92 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
93 </Borders>
94 <Font ss:Size="8" ss:Color="#0000FF"/>
95 <NumberFormat ss:Format="#,##0.00"/>
96 </Style>
97 <Style ss:ID="line_center_no_digits">
98 <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
99 <Borders>
100 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
101 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
102 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
103 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
104 </Borders>
105 <Font ss:Size="8" ss:Color="#0000FF"/>
106 </Style>
107 <Style ss:ID="line_left_date">
108 <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
109 <NumberFormat ss:Format="Short Date" />
110 <Borders>
111 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
112 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
113 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
114 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
115 </Borders>
116 <Font ss:Size="8" ss:Color="#0000FF"/>
117 </Style>
118 <Style ss:ID="short_date">
119 <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1" />
120 <NumberFormat ss:Format="Short Date" />
121 <Font ss:Color="#0000FF" />
122 </Style>
123</Styles>
124
125
126% for r in objects:
127<ss:Worksheet ss:Name="IR Follow Up per Location">
128 <Table x:FullColumns="1" x:FullRows="1">
129 ## Order ref
130 <Column ss:AutoFitWidth="1" ss:Width="145.75" />
131 ## Status
132 <Column ss:AutoFitWidth="1" ss:Width="160.75" />
133 ## Item
134 <Column ss:AutoFitWidth="1" ss:Width="30.0" />
135 ## Product code
136 <Column ss:AutoFitWidth="1" ss:Width="70.25" />
137 ## Product description
138 <Column ss:AutoFitWidth="1" ss:Width="250.25" />
139 ## Original Product code
140 <Column ss:AutoFitWidth="1" ss:Width="70.25" />
141 ## Qty
142 <Column ss:AutoFitWidth="1" ss:Width="58.75" />
143 ## UoM
144 <Column ss:AutoFitWidth="1" ss:Width="58.75" />
145 ## Original Qty
146 <Column ss:AutoFitWidth="1" ss:Width="63.75" />
147 ## Original UoM
148 <Column ss:AutoFitWidth="1" ss:Width="63.75" />
149 ## Price
150 <Column ss:AutoFitWidth="1" ss:Width="75.75" />
151 ## Currency
152 <Column ss:AutoFitWidth="1" ss:Width="58.75" />
153 ## Original Price
154 <Column ss:AutoFitWidth="1" ss:Width="85.75" />
155 ## Original Currency
156 <Column ss:AutoFitWidth="1" ss:Width="90.75" />
157 ## Price in functional currency
158 <Column ss:AutoFitWidth="1" ss:Width="130.75" />
159 ## Original Price in functional currency
160 <Column ss:AutoFitWidth="1" ss:Width="160.75" />
161 ## Subtotal (functional currency)
162 <Column ss:AutoFitWidth="1" ss:Width="140.25" />
163 ## Original Subtotal (functional currency)
164 <Column ss:AutoFitWidth="1" ss:Width="170.25" />
165 ## Modification comment
166 <Column ss:AutoFitWidth="1" ss:Width="209.25" />
167
168 <Row ss:Height="18">
169 <Cell ss:StyleID="big_header"><Data ss:Type="String">INTERNAL REQUEST Track Changes report</Data><NamedCell ss:Name="Print_Area"/></Cell>
170 </Row>
171
172 <Row ss:Height="10"></Row>
173
174 ## WORKSHEET HEADER
175 <Row>
176 <Cell ss:StyleID="file_header" ss:MergeAcross="1"><Data ss:Type="String">${_('Instance information')|x}</Data></Cell>
177 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
178 <Cell ss:StyleID="file_header" ss:MergeAcross="4"><Data ss:Type="String">${_('Request parameters')|x}</Data></Cell>
179 </Row>
180 <Row>
181 <Cell ss:StyleID="ssCell"><Data ss:Type="String">${_('Name:')|x}</Data></Cell>
182 <Cell ss:StyleID="ssCellBlue"><Data ss:Type="String">${r.company_id.instance_id.instance or '-'|x}</Data></Cell>
183 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
184 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Date start:')|x}</Data></Cell>
185 % if isDate(r.start_date):
186 <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.start_date|n}T00:00:00.000</Data></Cell>
187 % else:
188 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
189 % endif
190 </Row>
191 <Row>
192 <Cell ss:StyleID="ssCell"><Data ss:Type="String">${_('Address:')|x}</Data></Cell>
193 <Cell ss:StyleID="ssCellBlue"><Data ss:Type="String">${r.company_id.partner_id.name or '-'|x}</Data></Cell>
194 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
195 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Date end:')|x}</Data></Cell>
196 % if isDate(r.end_date):
197 <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.end_date|n}T00:00:00.000</Data></Cell>
198 % else:
199 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
200 % endif
201 </Row>
202 <Row>
203 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
204 <Cell ss:StyleID="ssCellBlue"><Data ss:Type="String">${r.company_id.partner_id.address[0].street or ''|x}</Data></Cell>
205 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
206 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Order Ref:')|x}</Data></Cell>
207 <Cell ss:StyleID="ssCellBlue" ss:MergeAcross="2"><Data ss:Type="String">${r.po_id.id and r.po_id.name or '-'|x}</Data></Cell>
208 </Row>
209 <Row>
210 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
211 <Cell ss:StyleID="ssCellBlue"><Data ss:Type="String">${r.company_id.partner_id.address[0].zip|x} ${r.company_id.partner_id.address[0].city|x}</Data></Cell>
212 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
213 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Date of the request:')|x}</Data></Cell>
214 % if r.report_date and isDateTime(r.report_date):
215 <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.report_date[0:10]|n}T${r.report_date[11:19]|n}.000</Data></Cell>
216 % else:
217 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
218 % endif
219 </Row>
220 <Row>
221 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
222 <Cell ss:StyleID="ssCellBlue"><Data ss:Type="String">${r.company_id.partner_id.address[0].country_id and r.company_id.partner_id.address[0].country_id.name or ''|x}</Data></Cell>
223 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
224 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String"></Data></Cell>
225 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
226 </Row>
227
228 <Row></Row>
229
230 <Row>
231 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Order ref')|x}</Data></Cell>
232 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Status')|x}</Data></Cell>
233 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Item')|x}</Data></Cell>
234 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Code')|x}</Data></Cell>
235 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Description')|x}</Data></Cell>
236 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Original Code')|x}</Data></Cell>
237 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Qty')|x}</Data></Cell>
238 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('UoM')|x}</Data></Cell>
239 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Original Qty')|x}</Data></Cell>
240 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Original UoM')|x}</Data></Cell>
241 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Unit Price')|x}</Data></Cell>
242 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Currency')|x}</Data></Cell>
243 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Original Unit Price')|x}</Data></Cell>
244 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Original Currency')|x}</Data></Cell>
245 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Price in functional currency')|x}</Data></Cell>
246 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Original Price in functional currency')|x}</Data></Cell>
247 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Subtotal (functional currency)')|x}</Data></Cell>
248 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Original Subtotal (functional currency)')|x}</Data></Cell>
249 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Modification comment')|x}</Data></Cell>
250 </Row>
251
252 % for line in getLines(r):
253 <Row ss:Height="11.25">
254 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.order_id.name|x}</Data></Cell>
255 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.state|x}</Data></Cell>
256 <Cell ss:StyleID="line_center_no_digits"><Data ss:Type="Number">${line.line_number|x}</Data></Cell>
257 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.product_id.default_code or ''|x}</Data></Cell>
258 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.name|x}</Data></Cell>
259 % if line.original_product and line.product_id.default_code != line.original_product.default_code:
260 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.original_product.default_code or ''|x}</Data></Cell>
261 % else:
262 <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell>
263 % endif
264 <Cell ss:StyleID="line_left"><Data ss:Type="Number">${line.product_qty|x}</Data></Cell>
265 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.product_uom.name|x}</Data></Cell>
266 <Cell ss:StyleID="line_left"><Data ss:Type="Number">${line.original_qty or 0|x}</Data></Cell>
267 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.original_uom.name or ''|x}</Data></Cell>
268 <Cell ss:StyleID="line_center"><Data ss:Type="Number">${line.price_unit|x}</Data></Cell>
269 <Cell ss:StyleID="line_center"><Data ss:Type="String">${line.currency_id.name|x}</Data></Cell>
270 <Cell ss:StyleID="line_center"><Data ss:Type="Number">${line.original_price or 0|x}</Data></Cell>
271 <Cell ss:StyleID="line_center"><Data ss:Type="String">${line.original_currency_id and line.original_currency_id.name or ''|x}</Data></Cell>
272 <Cell ss:StyleID="line_center"><Data ss:Type="Number">${computeCurrency(line, False)|x}</Data></Cell>
273 <Cell ss:StyleID="line_center"><Data ss:Type="Number">${computeCurrency(line, True)|x}</Data></Cell>
274 <Cell ss:StyleID="line_center"><Data ss:Type="Number">${computeCurrency(line, False) * line.product_qty|x}</Data></Cell>
275 <Cell ss:StyleID="line_center"><Data ss:Type="Number">${computeCurrency(line, True) * line.original_qty|x}</Data></Cell>
276 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.modification_comment or ''|x}</Data></Cell>
277 </Row>
278 % endfor
279
280 </Table>
281
282 <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
283 <PageSetup>
284 <Layout x:Orientation="Landscape"/>
285 <Footer x:Data="Page &amp;P of &amp;N"/>
286 </PageSetup>
287 <Selected/>
288 <Panes>
289 <Pane>
290 <Number>3</Number>
291 <ActiveRow>21</ActiveRow>
292 </Pane>
293 </Panes>
294 <ProtectObjects>False</ProtectObjects>
295 <ProtectScenarios>False</ProtectScenarios>
296 </WorksheetOptions>
297</ss:Worksheet>
298% endfor
299</Workbook>
0300
=== added directory 'bin/addons/purchase_followup/wizard'
=== added file 'bin/addons/purchase_followup/wizard/__init__.py'
--- bin/addons/purchase_followup/wizard/__init__.py 1970-01-01 00:00:00 +0000
+++ bin/addons/purchase_followup/wizard/__init__.py 2017-10-26 10:06:24 +0000
@@ -0,0 +1,22 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2011 TeMPO Consulting, MSF
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import po_track_changes_wizard
023
=== added file 'bin/addons/purchase_followup/wizard/po_track_changes_wizard.py'
--- bin/addons/purchase_followup/wizard/po_track_changes_wizard.py 1970-01-01 00:00:00 +0000
+++ bin/addons/purchase_followup/wizard/po_track_changes_wizard.py 2017-10-26 10:06:24 +0000
@@ -0,0 +1,130 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2011 TeMPO Consulting, MSF
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from osv import osv
23from osv import fields
24from tools.translate import _
25
26import time
27
28
29class po_track_changes_wizard(osv.osv_memory):
30 _name = 'po.track.changes.wizard'
31 _rec_name = 'report_date'
32 _order = 'report_date desc'
33
34 _columns = {
35 'report_date': fields.datetime(
36 string='Date of the demand',
37 readonly=True,
38 ),
39 'company_id': fields.many2one(
40 'res.company',
41 string='Company',
42 readonly=True,
43 ),
44 'start_date': fields.date(
45 string='Start date',
46 ),
47 'end_date': fields.date(
48 string='End date',
49 ),
50 'po_line_ids': fields.text(
51 string='Purchase Orders Lines',
52 readonly=True
53 ),
54 'po_id': fields.many2one(
55 'purchase.order',
56 string='Purchase Order Ref.',
57 ),
58 }
59
60 _defaults = {
61 'report_date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
62 'company_id': lambda self, cr, uid, ids, c={}: self.pool.get('res.users').browse(cr, uid, uid).company_id.id,
63 }
64
65 def get_values(self, cr, uid, ids, context=None):
66 '''
67 Retrieve the data according to values in wizard
68 '''
69 po_line_obj = self.pool.get('purchase.order.line')
70
71 if context is None:
72 context = {}
73
74 if isinstance(ids, (int, long)):
75 ids = [ids]
76
77 for wizard in self.browse(cr, uid, ids, context=context):
78 po_domain = []
79
80 if wizard.start_date:
81 po_domain.append(('create_date', '>=', wizard.start_date))
82
83 if wizard.end_date:
84 po_domain.append(('create_date', '<=', wizard.end_date))
85
86 if wizard.po_id:
87 po_domain.append(('order_id', '=', wizard.po_id.id))
88
89 po_line_ids = po_line_obj.search(cr, uid, po_domain, context=context)
90
91 if not po_line_ids:
92 raise osv.except_osv(
93 _('Error'),
94 _('No data found with these parameters'),
95 )
96
97 self.write(cr, uid, [wizard.id], {'po_line_ids': po_line_ids}, context=context)
98
99 return True
100
101 def print_excel(self, cr, uid, ids, context=None):
102 '''
103 Retrieve the data according to values in wizard
104 and print the report in Excel format.
105 '''
106 if context is None:
107 context = {}
108
109 if isinstance(ids, (int, long)):
110 ids = [ids]
111
112 self.get_values(cr, uid, ids, context=context)
113
114 background_id = self.pool.get('memory.background.report').create(cr, uid, {
115 'file_name': 'PURCHASE ORDER Track Changes report',
116 'report_name': 'po.track.changes.report_xls',
117 }, context=context)
118 context['background_id'] = background_id
119 context['background_time'] = 3
120
121 data = {'ids': ids, 'context': context}
122 return {
123 'type': 'ir.actions.report.xml',
124 'report_name': 'po.track.changes.report_xls',
125 'datas': data,
126 'context': context,
127 }
128
129
130po_track_changes_wizard()
0131
=== added file 'bin/addons/purchase_followup/wizard/po_track_changes_wizard_view.xml'
--- bin/addons/purchase_followup/wizard/po_track_changes_wizard_view.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/purchase_followup/wizard/po_track_changes_wizard_view.xml 2017-10-26 10:06:24 +0000
@@ -0,0 +1,39 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3
4 <data>
5
6 <record id="po_track_changes_wizard_form_view" model="ir.ui.view">
7 <field name="name">po.track.changes.wizard.form.view</field>
8 <field name="model">po.track.changes.wizard</field>
9 <field name="type">form</field>
10 <field name="arch" type="xml">
11 <form string="PURCHASE ORDER Track Changes">
12 <separator colspan="4" string="Request parameters" />
13 <field name="start_date" />
14 <field name="end_date" />
15 <field name="po_id" />
16 <separator colspan="4" string="Actions" />
17 <button name="print_excel" string="Excel report" icon="gtk-print" type="object" colspan="4" />
18 </form>
19 </field>
20 </record>
21
22 <record id="action_po_track_changes_wizard" model="ir.actions.act_window">
23 <field name="name">PO Track Changes</field>
24 <field name="res_model">po.track.changes.wizard</field>
25 <field name="view_type">form</field>
26 <field name="view_mode">form</field>
27 <field name="target">new</field>
28 </record>
29
30 <menuitem
31 id="menu_po_track_changes"
32 action="action_po_track_changes_wizard"
33 parent="purchase.menu_procurement_management"
34 sequence="2"
35 />
36
37 </data>
38
39</openerp>
040
=== modified file 'bin/addons/sale/sale_order.py'
--- bin/addons/sale/sale_order.py 2017-10-19 07:42:45 +0000
+++ bin/addons/sale/sale_order.py 2017-10-26 10:06:24 +0000
@@ -2104,7 +2104,7 @@
2104 'set_as_sourced_n': False,2104 'set_as_sourced_n': False,
2105 })2105 })
21062106
2107 for x in ['modification_comment', 'original_qty', 'original_price', 'original_uom', 'sync_linked_pol', 'resourced_original_line']:2107 for x in ['modification_comment', 'original_product', 'original_qty', 'original_price', 'original_uom', 'sync_linked_pol', 'resourced_original_line']:
2108 if x not in default:2108 if x not in default:
2109 default[x] = False2109 default[x] = False
21102110
21112111
=== modified file 'bin/addons/sale/sale_workflow.py'
--- bin/addons/sale/sale_workflow.py 2017-10-13 14:36:52 +0000
+++ bin/addons/sale/sale_workflow.py 2017-10-26 10:06:24 +0000
@@ -345,6 +345,7 @@
345 to_write['type'] = 'make_to_stock'345 to_write['type'] = 'make_to_stock'
346346
347 elif sol.procurement_request: # in case of IR347 elif sol.procurement_request: # in case of IR
348 to_write['original_product'] = sol.product_id.id
348 to_write['original_qty'] = sol.product_uom_qty349 to_write['original_qty'] = sol.product_uom_qty
349 to_write['original_price'] = sol.price_unit350 to_write['original_price'] = sol.price_unit
350 to_write['original_uom'] = sol.product_uom.id351 to_write['original_uom'] = sol.product_uom.id
351352
=== modified file 'bin/addons/sales_followup/__openerp__.py'
--- bin/addons/sales_followup/__openerp__.py 2017-09-28 14:05:02 +0000
+++ bin/addons/sales_followup/__openerp__.py 2017-10-26 10:06:24 +0000
@@ -44,8 +44,10 @@
44 "sale_followup_view.xml",44 "sale_followup_view.xml",
45 "report/sale_follow_up_report.xml",45 "report/sale_follow_up_report.xml",
46 "report/ir_follow_up_location_report.xml",46 "report/ir_follow_up_location_report.xml",
47 "report/ir_track_changes_report.xml",
47 "wizard/sale_followup_multi_wizard_view.xml",48 "wizard/sale_followup_multi_wizard_view.xml",
48 "wizard/ir_followup_location_wizard_view.xml",49 "wizard/ir_followup_location_wizard_view.xml",
50 "wizard/ir_track_changes_wizard_view.xml",
49 ],51 ],
50 "demo_xml": [52 "demo_xml": [
51 ],53 ],
5254
=== modified file 'bin/addons/sales_followup/report/__init__.py'
--- bin/addons/sales_followup/report/__init__.py 2017-08-18 14:31:17 +0000
+++ bin/addons/sales_followup/report/__init__.py 2017-10-26 10:06:24 +0000
@@ -22,3 +22,4 @@
22import sale_follow_up_report22import sale_follow_up_report
23import sale_follow_up_report_multi23import sale_follow_up_report_multi
24import ir_follow_up_location_report24import ir_follow_up_location_report
25import ir_track_changes_report
2526
=== added file 'bin/addons/sales_followup/report/ir_track_changes_report.py'
--- bin/addons/sales_followup/report/ir_track_changes_report.py 1970-01-01 00:00:00 +0000
+++ bin/addons/sales_followup/report/ir_track_changes_report.py 2017-10-26 10:06:24 +0000
@@ -0,0 +1,73 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2011 TeMPO Consulting, MSF. All Rights Reserved
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22
23import time
24from report import report_sxw
25from spreadsheet_xml.spreadsheet_xml_write import SpreadsheetReport
26
27
28class ir_track_changes_report_parser(report_sxw.rml_parse):
29 def __init__(self, cr, uid, name, context=None):
30 super(ir_track_changes_report_parser, self).__init__(cr, uid, name, context=context)
31 self.cr = cr
32 self.uid = uid
33 self.user_company = self._get_user_company()
34 self.localcontext.update({
35 'time': time,
36 'getLines': self._get_ir_lines,
37 'userCompany': self.user_company,
38 })
39
40 def _get_ir_lines(self, report):
41 '''
42 Return the lines for the report
43 '''
44 result = []
45 for line in report.order_line_ids:
46 result.append(self.pool.get('sale.order.line').browse(self.cr, self.uid, line))
47
48 return sorted(result, key=lambda r: (r['order_id']['name']), reverse=True)
49
50 def _get_user_company(self):
51 '''
52 Return user's current company
53 '''
54 return self.pool.get('res.users').browse(self.cr, self.uid, self.uid).company_id
55
56
57class ir_track_changes_report_xls(SpreadsheetReport):
58 def __init__(self, name, table, rml=False, parser=report_sxw.rml_parse,
59 header='external', store=False):
60 super(ir_track_changes_report_xls, self).__init__(name, table,
61 rml=rml, parser=parser, header=header, store=store)
62
63 def create(self, cr, uid, ids, data, context=None):
64 a = super(ir_track_changes_report_xls, self).create(cr, uid, ids,
65 data, context)
66 return (a[0], 'xls')
67
68ir_track_changes_report_xls(
69 'report.ir.track.changes.report_xls',
70 'ir.track.changes.wizard',
71 'addons/sales_followup/report/ir_track_changes_report_xls.mako',
72 parser=ir_track_changes_report_parser,
73 header=False)
074
=== added file 'bin/addons/sales_followup/report/ir_track_changes_report.xml'
--- bin/addons/sales_followup/report/ir_track_changes_report.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/sales_followup/report/ir_track_changes_report.xml 2017-10-26 10:06:24 +0000
@@ -0,0 +1,18 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<openerp>
3 <data>
4
5 <report
6 id="report_ir_track_changes_xls"
7 name="ir.track.changes.report_xls"
8 model="ir.track.changes.wizard"
9 string="Internal Request Track Changes Excel Export"
10 file="sales_followup/report/ir_track_changes_report_xls.mako"
11 report_type="webkit"
12 header="False"
13 auto="False"
14 menu="False"
15 />
16
17 </data>
18</openerp>
019
=== added file 'bin/addons/sales_followup/report/ir_track_changes_report_xls.mako'
--- bin/addons/sales_followup/report/ir_track_changes_report_xls.mako 1970-01-01 00:00:00 +0000
+++ bin/addons/sales_followup/report/ir_track_changes_report_xls.mako 2017-10-26 10:06:24 +0000
@@ -0,0 +1,283 @@
1<?xml version="1.0"?>
2<?mso-application progid="Excel.Sheet"?>
3<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
4 xmlns:o="urn:schemas-microsoft-com:office:office"
5 xmlns:x="urn:schemas-microsoft-com:office:excel"
6 xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
7 xmlns:html="http://www.w3.org/TR/REC-html40">
8 <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
9 <Author>Unifield</Author>
10 <LastAuthor>MSFUser</LastAuthor>
11 <Created>2014-04-16T22:36:07Z</Created>
12 <Company>Medecins Sans Frontieres</Company>
13 <Version>11.9999</Version>
14 </DocumentProperties>
15 <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
16 <WindowHeight>11640</WindowHeight>
17 <WindowWidth>15480</WindowWidth>
18 <WindowTopX>120</WindowTopX>
19 <WindowTopY>75</WindowTopY>
20 <ProtectStructure>False</ProtectStructure>
21 <ProtectWindows>False</ProtectWindows>
22 </ExcelWorkbook>
23 <Styles>
24 <Style ss:ID="ssCell">
25 <Alignment ss:Vertical="Top" ss:WrapText="1"/>
26 <Font ss:Bold="1" />
27 </Style>
28 <Style ss:ID="ssCellBlue">
29 <Alignment ss:Vertical="Top" ss:WrapText="1"/>
30 <Font ss:Color="#0000FF" />
31 </Style>
32
33 <!-- File header -->
34 <Style ss:ID="big_header">
35 <Font x:Family="Swiss" ss:Size="14" ss:Bold="1"/>
36 </Style>
37 <Style ss:ID="file_header">
38 <Font ss:Size="9" />
39 <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
40 </Style>
41
42 <!-- Line header -->
43 <Style ss:ID="line_header">
44 <Borders>
45 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
46 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
47 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
48 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
49 </Borders>
50 <Font x:Family="Swiss" ss:Size="8" ss:Bold="1"/>
51 <Interior/>
52 </Style>
53 <Style ss:ID="line_header_orange">
54 <Borders>
55 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
56 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
57 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
58 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
59 </Borders>
60 <Font x:Family="Swiss" ss:Size="8" ss:Bold="1"/>
61 <Interior ss:Color="#F79646" ss:Pattern="Solid"/>
62 </Style>
63
64 <!-- Lines -->
65 <Style ss:ID="line_left">
66 <Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
67 <Borders>
68 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
69 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
70 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
71 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
72 </Borders>
73 <Font ss:Size="8" ss:Color="#0000FF"/>
74 </Style>
75 <Style ss:ID="line_right">
76 <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
77 <Borders>
78 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
79 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
80 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
81 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
82 </Borders>
83 <Font ss:Size="8" ss:Color="#0000FF"/>
84 <NumberFormat ss:Format="#,##0.00"/>
85 </Style>
86 <Style ss:ID="line_center">
87 <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
88 <Borders>
89 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
90 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
91 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
92 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
93 </Borders>
94 <Font ss:Size="8" ss:Color="#0000FF"/>
95 <NumberFormat ss:Format="#,##0.00"/>
96 </Style>
97 <Style ss:ID="line_center_no_digits">
98 <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
99 <Borders>
100 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
101 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
102 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
103 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
104 </Borders>
105 <Font ss:Size="8" ss:Color="#0000FF"/>
106 </Style>
107 <Style ss:ID="line_left_date">
108 <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
109 <NumberFormat ss:Format="Short Date" />
110 <Borders>
111 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
112 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
113 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
114 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
115 </Borders>
116 <Font ss:Size="8" ss:Color="#0000FF"/>
117 </Style>
118 <Style ss:ID="short_date">
119 <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1" />
120 <NumberFormat ss:Format="Short Date" />
121 <Font ss:Color="#0000FF" />
122 </Style>
123</Styles>
124
125
126% for r in objects:
127<ss:Worksheet ss:Name="IR Follow Up per Location">
128 <Table x:FullColumns="1" x:FullRows="1">
129 ## Order ref
130 <Column ss:AutoFitWidth="1" ss:Width="80.0" />
131 ## Status
132 <Column ss:AutoFitWidth="1" ss:Width="160.75" />
133 ## Item
134 <Column ss:AutoFitWidth="1" ss:Width="30.0" />
135 ## Product code
136 <Column ss:AutoFitWidth="1" ss:Width="70.25" />
137 ## Product description
138 <Column ss:AutoFitWidth="1" ss:Width="250.25" />
139 ## Original Product code
140 <Column ss:AutoFitWidth="1" ss:Width="70.25" />
141 ## Qty
142 <Column ss:AutoFitWidth="1" ss:Width="58.75" />
143 ## UoM
144 <Column ss:AutoFitWidth="1" ss:Width="58.75" />
145 ## Original Qty
146 <Column ss:AutoFitWidth="1" ss:Width="63.75" />
147 ## Original UoM
148 <Column ss:AutoFitWidth="1" ss:Width="63.75" />
149 ## Price
150 <Column ss:AutoFitWidth="1" ss:Width="75.75" />
151 ## Original Price
152 <Column ss:AutoFitWidth="1" ss:Width="85.75" />
153 ## Subtotal
154 <Column ss:AutoFitWidth="1" ss:Width="85.75" />
155 ## Original Subtotal
156 <Column ss:AutoFitWidth="1" ss:Width="75.25" />
157 ## Modification comment
158 <Column ss:AutoFitWidth="1" ss:Width="209.25" />
159
160 <Row ss:Height="18">
161 <Cell ss:StyleID="big_header"><Data ss:Type="String">INTERNAL REQUEST Track Changes report</Data><NamedCell ss:Name="Print_Area"/></Cell>
162 </Row>
163
164 <Row ss:Height="10"></Row>
165
166 ## WORKSHEET HEADER
167 <Row>
168 <Cell ss:StyleID="file_header" ss:MergeAcross="1"><Data ss:Type="String">${_('Instance information')|x}</Data></Cell>
169 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
170 <Cell ss:StyleID="file_header" ss:MergeAcross="4"><Data ss:Type="String">${_('Request parameters')|x}</Data></Cell>
171 </Row>
172 <Row>
173 <Cell ss:StyleID="ssCell"><Data ss:Type="String">${_('Name:')|x}</Data></Cell>
174 <Cell ss:StyleID="ssCellBlue"><Data ss:Type="String">${r.company_id.instance_id.instance or '-'|x}</Data></Cell>
175 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
176 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Date start:')|x}</Data></Cell>
177 % if isDate(r.start_date):
178 <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.start_date|n}T00:00:00.000</Data></Cell>
179 % else:
180 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
181 % endif
182 </Row>
183 <Row>
184 <Cell ss:StyleID="ssCell"><Data ss:Type="String">${_('Address:')|x}</Data></Cell>
185 <Cell ss:StyleID="ssCellBlue"><Data ss:Type="String">${r.company_id.partner_id.name or '-'|x}</Data></Cell>
186 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
187 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Date end:')|x}</Data></Cell>
188 % if isDate(r.end_date):
189 <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.end_date|n}T00:00:00.000</Data></Cell>
190 % else:
191 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
192 % endif
193 </Row>
194 <Row>
195 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
196 <Cell ss:StyleID="ssCellBlue"><Data ss:Type="String">${r.company_id.partner_id.address[0].street or ''|x}</Data></Cell>
197 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
198 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Order Ref:')|x}</Data></Cell>
199 <Cell ss:StyleID="ssCellBlue" ss:MergeAcross="2"><Data ss:Type="String">${r.order_id.id and r.order_id.name or '-'|x}</Data></Cell>
200 </Row>
201 <Row>
202 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
203 <Cell ss:StyleID="ssCellBlue"><Data ss:Type="String">${r.company_id.partner_id.address[0].zip|x} ${r.company_id.partner_id.address[0].city|x}</Data></Cell>
204 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
205 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Date of the request:')|x}</Data></Cell>
206 % if r.report_date and isDateTime(r.report_date):
207 <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.report_date[0:10]|n}T${r.report_date[11:19]|n}.000</Data></Cell>
208 % else:
209 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
210 % endif
211 </Row>
212 <Row>
213 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
214 <Cell ss:StyleID="ssCellBlue"><Data ss:Type="String">${r.company_id.partner_id.address[0].country_id and r.company_id.partner_id.address[0].country_id.name or ''|x}</Data></Cell>
215 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
216 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String"></Data></Cell>
217 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
218 </Row>
219
220 <Row></Row>
221
222 <Row>
223 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Order ref')|x}</Data></Cell>
224 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Status')|x}</Data></Cell>
225 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Item')|x}</Data></Cell>
226 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Code')|x}</Data></Cell>
227 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Description')|x}</Data></Cell>
228 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Original Code')|x}</Data></Cell>
229 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Qty')|x}</Data></Cell>
230 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('UoM')|x}</Data></Cell>
231 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Original Qty')|x}</Data></Cell>
232 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Original UoM')|x}</Data></Cell>
233 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Unit Price')|x}</Data></Cell>
234 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Original Unit Price')|x}</Data></Cell>
235 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Subtotal')|x}</Data></Cell>
236 <Cell ss:StyleID="line_header_orange"><Data ss:Type="String">${_('Original Subtotal')|x}</Data></Cell>
237 <Cell ss:StyleID="line_header"><Data ss:Type="String">${_('Modification comment')|x}</Data></Cell>
238 </Row>
239
240 % for line in getLines(r):
241 <Row ss:Height="11.25">
242 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.order_id.name|x}</Data></Cell>
243 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.state|x}</Data></Cell>
244 <Cell ss:StyleID="line_center_no_digits"><Data ss:Type="Number">${line.line_number|x}</Data></Cell>
245 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.product_id.default_code or ''|x}</Data></Cell>
246 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.name|x}</Data></Cell>
247 % if line.original_product and line.product_id.default_code != line.original_product.default_code:
248 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.original_product.default_code or ''|x}</Data></Cell>
249 % else:
250 <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell>
251 % endif
252 <Cell ss:StyleID="line_left"><Data ss:Type="Number">${line.product_uom_qty|x}</Data></Cell>
253 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.product_uom.name|x}</Data></Cell>
254 <Cell ss:StyleID="line_left"><Data ss:Type="Number">${line.original_qty or 0|x}</Data></Cell>
255 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.original_uom.name or ''|x}</Data></Cell>
256 <Cell ss:StyleID="line_center"><Data ss:Type="Number">${line.price_unit|x}</Data></Cell>
257 <Cell ss:StyleID="line_center"><Data ss:Type="Number">${line.original_price or 0|x}</Data></Cell>
258 <Cell ss:StyleID="line_center"><Data ss:Type="Number">${line.price_unit * line.product_uom_qty|x}</Data></Cell>
259 <Cell ss:StyleID="line_center"><Data ss:Type="Number">${line.original_price * line.original_qty|x}</Data></Cell>
260 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.modification_comment or ''|x}</Data></Cell>
261 </Row>
262 % endfor
263
264 </Table>
265
266 <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
267 <PageSetup>
268 <Layout x:Orientation="Landscape"/>
269 <Footer x:Data="Page &amp;P of &amp;N"/>
270 </PageSetup>
271 <Selected/>
272 <Panes>
273 <Pane>
274 <Number>3</Number>
275 <ActiveRow>17</ActiveRow>
276 </Pane>
277 </Panes>
278 <ProtectObjects>False</ProtectObjects>
279 <ProtectScenarios>False</ProtectScenarios>
280 </WorksheetOptions>
281</ss:Worksheet>
282% endfor
283</Workbook>
0284
=== modified file 'bin/addons/sales_followup/wizard/__init__.py'
--- bin/addons/sales_followup/wizard/__init__.py 2017-08-18 14:31:17 +0000
+++ bin/addons/sales_followup/wizard/__init__.py 2017-10-26 10:06:24 +0000
@@ -21,3 +21,4 @@
2121
22import sale_followup_multi_wizard22import sale_followup_multi_wizard
23import ir_followup_location_wizard23import ir_followup_location_wizard
24import ir_track_changes_wizard
2425
=== added file 'bin/addons/sales_followup/wizard/ir_track_changes_wizard.py'
--- bin/addons/sales_followup/wizard/ir_track_changes_wizard.py 1970-01-01 00:00:00 +0000
+++ bin/addons/sales_followup/wizard/ir_track_changes_wizard.py 2017-10-26 10:06:24 +0000
@@ -0,0 +1,130 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2011 TeMPO Consulting, MSF
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from osv import osv
23from osv import fields
24from tools.translate import _
25
26import time
27
28
29class ir_track_changes_wizard(osv.osv_memory):
30 _name = 'ir.track.changes.wizard'
31 _rec_name = 'report_date'
32 _order = 'report_date desc'
33
34 _columns = {
35 'report_date': fields.datetime(
36 string='Date of the demand',
37 readonly=True,
38 ),
39 'company_id': fields.many2one(
40 'res.company',
41 string='Company',
42 readonly=True,
43 ),
44 'start_date': fields.date(
45 string='Start date',
46 ),
47 'end_date': fields.date(
48 string='End date',
49 ),
50 'order_line_ids': fields.text(
51 string='Orders Lines',
52 readonly=True
53 ),
54 'order_id': fields.many2one(
55 'sale.order',
56 string='Order Ref.',
57 ),
58 }
59
60 _defaults = {
61 'report_date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
62 'company_id': lambda self, cr, uid, ids, c={}: self.pool.get('res.users').browse(cr, uid, uid).company_id.id,
63 }
64
65 def get_values(self, cr, uid, ids, context=None):
66 '''
67 Retrieve the data according to values in wizard
68 '''
69 ir_line_obj = self.pool.get('sale.order.line')
70
71 if context is None:
72 context = {}
73
74 if isinstance(ids, (int, long)):
75 ids = [ids]
76
77 for wizard in self.browse(cr, uid, ids, context=context):
78 ir_domain = [('procurement_request', '=', 't')]
79
80 if wizard.start_date:
81 ir_domain.append(('create_date', '>=', wizard.start_date))
82
83 if wizard.end_date:
84 ir_domain.append(('create_date', '<=', wizard.end_date))
85
86 if wizard.order_id:
87 ir_domain.append(('order_id', '=', wizard.order_id.id))
88
89 ir_line_ids = ir_line_obj.search(cr, uid, ir_domain, context=context)
90
91 if not ir_line_ids:
92 raise osv.except_osv(
93 _('Error'),
94 _('No data found with these parameters'),
95 )
96
97 self.write(cr, uid, [wizard.id], {'order_line_ids': ir_line_ids}, context=context)
98
99 return True
100
101 def print_excel(self, cr, uid, ids, context=None):
102 '''
103 Retrieve the data according to values in wizard
104 and print the report in Excel format.
105 '''
106 if context is None:
107 context = {}
108
109 if isinstance(ids, (int, long)):
110 ids = [ids]
111
112 self.get_values(cr, uid, ids, context=context)
113
114 background_id = self.pool.get('memory.background.report').create(cr, uid, {
115 'file_name': 'INTERNAL REQUEST Track Changes report',
116 'report_name': 'ir.track.changes.report_xls',
117 }, context=context)
118 context['background_id'] = background_id
119 context['background_time'] = 3
120
121 data = {'ids': ids, 'context': context}
122 return {
123 'type': 'ir.actions.report.xml',
124 'report_name': 'ir.track.changes.report_xls',
125 'datas': data,
126 'context': context,
127 }
128
129
130ir_track_changes_wizard()
0131
=== added file 'bin/addons/sales_followup/wizard/ir_track_changes_wizard_view.xml'
--- bin/addons/sales_followup/wizard/ir_track_changes_wizard_view.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/sales_followup/wizard/ir_track_changes_wizard_view.xml 2017-10-26 10:06:24 +0000
@@ -0,0 +1,39 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3
4 <data>
5
6 <record id="ir_track_changes_wizard_form_view" model="ir.ui.view">
7 <field name="name">ir.track.changes.wizard.form.view</field>
8 <field name="model">ir.track.changes.wizard</field>
9 <field name="type">form</field>
10 <field name="arch" type="xml">
11 <form string="INTERNAL REQUEST Track Changes">
12 <separator colspan="4" string="Request parameters" />
13 <field name="start_date" />
14 <field name="end_date" />
15 <field name="order_id" domain="[('procurement_request', '=', 't')]" />
16 <separator colspan="4" string="Actions" />
17 <button name="print_excel" string="Excel report" icon="gtk-print" type="object" colspan="4" />
18 </form>
19 </field>
20 </record>
21
22 <record id="action_ir_track_changes_wizard" model="ir.actions.act_window">
23 <field name="name">IR Track Changes</field>
24 <field name="res_model">ir.track.changes.wizard</field>
25 <field name="view_type">form</field>
26 <field name="view_mode">form</field>
27 <field name="target">new</field>
28 </record>
29
30 <menuitem
31 id="menu_ir_track_changes"
32 action="action_ir_track_changes_wizard"
33 parent="base.menu_sales"
34 sequence="3"
35 />
36
37 </data>
38
39</openerp>
040
=== modified file 'bin/addons/sourcing/procurement_order.py'
--- bin/addons/sourcing/procurement_order.py 2017-10-02 14:14:09 +0000
+++ bin/addons/sourcing/procurement_order.py 2017-10-26 10:06:24 +0000
@@ -114,6 +114,8 @@
114 line.update({'origin': origin_line.order_id.name})114 line.update({'origin': origin_line.order_id.name})
115 if origin_line.stock_take_date:115 if origin_line.stock_take_date:
116 line.update({'stock_take_date': origin_line.stock_take_date})116 line.update({'stock_take_date': origin_line.stock_take_date})
117 if origin_line.original_product:
118 line.update({'original_product': origin_line.original_product.id})
117 if origin_line.original_qty:119 if origin_line.original_qty:
118 line.update({'original_qty': origin_line.original_qty})120 line.update({'original_qty': origin_line.original_qty})
119 if origin_line.original_uom:121 if origin_line.original_uom:
120122
=== modified file 'bin/addons/sourcing/sale_order_line.py'
--- bin/addons/sourcing/sale_order_line.py 2017-10-19 14:06:34 +0000
+++ bin/addons/sourcing/sale_order_line.py 2017-10-26 10:06:24 +0000
@@ -1700,6 +1700,7 @@
1700 pol_values['name'] = sourcing_line.comment1700 pol_values['name'] = sourcing_line.comment
1701 if sourcing_line.procurement_request:1701 if sourcing_line.procurement_request:
1702 pol_values.update({1702 pol_values.update({
1703 'original_product': sourcing_line.original_product.id,
1703 'original_qty': sourcing_line.original_qty,1704 'original_qty': sourcing_line.original_qty,
1704 'original_uom': sourcing_line.original_uom.id,1705 'original_uom': sourcing_line.original_uom.id,
1705 })1706 })
@@ -1734,6 +1735,7 @@
1734 }1735 }
1735 if sourcing_line.procurement_request:1736 if sourcing_line.procurement_request:
1736 rfq_line_values.update({1737 rfq_line_values.update({
1738 'original_product': sourcing_line.original_product.id,
1737 'original_qty': sourcing_line.original_qty,1739 'original_qty': sourcing_line.original_qty,
1738 'original_uom': sourcing_line.original_uom.id,1740 'original_uom': sourcing_line.original_uom.id,
1739 })1741 })
@@ -1762,6 +1764,7 @@
1762 }1764 }
1763 if sourcing_line.procurement_request:1765 if sourcing_line.procurement_request:
1764 tender_values.update({1766 tender_values.update({
1767 'original_product': sourcing_line.original_product.id,
1765 'original_qty': sourcing_line.original_qty,1768 'original_qty': sourcing_line.original_qty,
1766 'original_uom': sourcing_line.original_uom.id,1769 'original_uom': sourcing_line.original_uom.id,
1767 })1770 })
17681771
=== modified file 'bin/addons/sourcing/sourcing_view.xml'
--- bin/addons/sourcing/sourcing_view.xml 2017-10-04 06:36:54 +0000
+++ bin/addons/sourcing/sourcing_view.xml 2017-10-26 10:06:24 +0000
@@ -3,27 +3,6 @@
3 <data>3 <data>
44
55
6 <record id="view_internal_request_form" model="ir.ui.view">
7 <field name="name">view.internal.request.form</field>
8 <field name="model">sale.order</field>
9 <field name="type">form</field>
10 <field name="priority" eval="500" />
11 <field name="inherit_id" ref="procurement_request.procurement_request_form_view" />
12 <field name="arch" type="xml">
13 <data>
14 <xpath expr="/form" position="inside">
15 <field name="sourcing_trace_ok" invisible="1" />
16 </xpath>
17
18 <xpath expr="/form//notebook" position="inside">
19 <page string="Sourcing Logs" attrs="{'invisible': [('sourcing_trace_ok', '=', False)]}">
20 <field name="sourcing_trace" colspan="4" nolabel="1" />
21 </page>
22 </xpath>
23 </data>
24 </field>
25 </record>
26
27 <record id="sourcing_line_normal_form_view" model="ir.ui.view">6 <record id="sourcing_line_normal_form_view" model="ir.ui.view">
28 <field name="name">sale.order.line.sourcing.form</field>7 <field name="name">sale.order.line.sourcing.form</field>
29 <field name="model">sale.order.line</field>8 <field name="model">sale.order.line</field>

Subscribers

People subscribed via source and target branches

to all changes: