Merge lp:~savoirfairelinux-openerp/purchase-wkfl/pallet-delivery into lp:~purchase-core-editors/purchase-wkfl/7.0
- pallet-delivery
- Merge into 7.0
Status: | Needs review |
---|---|
Proposed branch: | lp:~savoirfairelinux-openerp/purchase-wkfl/pallet-delivery |
Merge into: | lp:~purchase-core-editors/purchase-wkfl/7.0 |
Diff against target: |
9311 lines (+8583/-0) 133 files modified
delivery_editable_dates/__openerp__.py (+39/-0) delivery_editable_dates/editable_delivery_dates_view.xml (+37/-0) delivery_editable_dates/i18n/delivery_editable_dates.pot (+16/-0) landed_cost_per_pallet/__init__.py (+22/-0) landed_cost_per_pallet/__openerp__.py (+52/-0) landed_cost_per_pallet/i18n/fr.po (+46/-0) landed_cost_per_pallet/i18n/landed_cost_per_pallet.pot (+47/-0) landed_cost_per_pallet/landed_cost_per_pallet_view.xml (+27/-0) landed_cost_per_pallet/purchase.py (+125/-0) pallet_delivery/__init__.py (+22/-0) pallet_delivery/__openerp__.py (+58/-0) pallet_delivery/i18n/fr.po (+186/-0) pallet_delivery/i18n/pallet_delivery.pot (+225/-0) pallet_delivery/pallet_delivery_data.xml (+35/-0) pallet_delivery/pallet_delivery_view.xml (+160/-0) pallet_delivery/security/ir.model.access.csv (+5/-0) pallet_delivery/stock.py (+310/-0) pallet_delivery/stock_workflow.xml (+30/-0) partner_discount/__init__.py (+25/-0) partner_discount/__openerp__.py (+41/-0) partner_discount/i18n/fr.po (+36/-0) partner_discount/i18n/partner_discount.pot (+36/-0) partner_discount/res_partner.py (+36/-0) partner_discount/res_partner_view.xml (+19/-0) produce_details/__init__.py (+22/-0) produce_details/__openerp__.py (+49/-0) produce_details/i18n/fr.po (+41/-0) produce_details/i18n/produce_details.pot (+42/-0) produce_details/produce_details_view.xml (+34/-0) produce_details/product.py (+36/-0) product_reserve_forecast/__init__.py (+23/-0) product_reserve_forecast/__openerp__.py (+44/-0) product_reserve_forecast/i18n/fr.po (+67/-0) product_reserve_forecast/i18n/product_reserve_forecast.pot (+66/-0) product_reserve_forecast/product.py (+70/-0) product_reserve_forecast/product_reserve_forecast_view.xml (+28/-0) product_reserve_forecast/sale_stock.py (+94/-0) product_reserve_forecast/security/ir.model.access.csv (+1/-0) product_reserve_forecast/security/product_reserve_forecast_security.xml (+11/-0) purchase_gains/__init__.py (+23/-0) purchase_gains/__openerp__.py (+45/-0) purchase_gains/purchase.py (+106/-0) purchase_gains/purchase_report.xml (+9/-0) purchase_gains/purchase_view.xml (+14/-0) purchase_gains/report/__init__.py (+24/-0) purchase_gains/report/order.py (+35/-0) purchase_gains/report/order.rml (+172/-0) purchase_lot_tracking/__init__.py (+28/-0) purchase_lot_tracking/__openerp__.py (+52/-0) purchase_lot_tracking/account.py (+88/-0) purchase_lot_tracking/account_view.xml (+28/-0) purchase_lot_tracking/i18n/fr.po (+109/-0) purchase_lot_tracking/i18n/purchase_lot_tracking.pot (+110/-0) purchase_lot_tracking/product.py (+44/-0) purchase_lot_tracking/purchase.py (+265/-0) purchase_lot_tracking/purchase_lot_tracking.py (+72/-0) purchase_lot_tracking/purchase_lot_tracking_view.xml (+69/-0) purchase_lot_tracking/purchase_workflow.xml (+12/-0) purchase_lot_tracking/sale.py (+95/-0) purchase_lot_tracking/stock.py (+141/-0) purchase_lot_tracking/wizard/__init__.py (+1/-0) purchase_lot_tracking/wizard/stock_partial_picking.py (+53/-0) purchase_order_pick_up_date/__init__.py (+22/-0) purchase_order_pick_up_date/__openerp__.py (+44/-0) purchase_order_pick_up_date/i18n/fr.po (+31/-0) purchase_order_pick_up_date/i18n/purchase_order_pick_up_date.pot (+32/-0) purchase_order_pick_up_date/purchase.py (+33/-0) purchase_order_pick_up_date/purchase_order_pick_up_date_report.xml (+21/-0) purchase_order_pick_up_date/purchase_order_pick_up_date_view.xml (+26/-0) purchase_order_pick_up_date/report/order.rml (+335/-0) purchase_order_pick_up_date/report/request_quotation.rml (+156/-0) sale_improved_slip/__init__.py (+23/-0) sale_improved_slip/__openerp__.py (+47/-0) sale_improved_slip/i18n/fr.po (+266/-0) sale_improved_slip/i18n/sale_improved_slip.pot (+192/-0) sale_improved_slip/report/__init__.py (+1/-0) sale_improved_slip/report/picking.py (+72/-0) sale_improved_slip/report/picking.rml (+427/-0) sale_improved_slip/sale.py (+30/-0) sale_improved_slip/sale_improved_slip_report.xml (+11/-0) sale_improved_slip/sale_improved_slip_view.xml (+15/-0) sale_landed_cost_per_pallet/__init__.py (+23/-0) sale_landed_cost_per_pallet/__openerp__.py (+50/-0) sale_landed_cost_per_pallet/sale.py (+96/-0) sale_landed_cost_per_pallet/sale_cost_per_pallet_view.xml (+27/-0) sale_lot_available/__init__.py (+22/-0) sale_lot_available/__openerp__.py (+43/-0) sale_lot_available/wizard/__init__.py (+1/-0) sale_lot_available/wizard/stock_move.py (+80/-0) sale_lot_available/wizard/stock_move_view.xml (+15/-0) sale_warn_under/__init__.py (+23/-0) sale_warn_under/__openerp__.py (+44/-0) sale_warn_under/i18n/fr.po (+86/-0) sale_warn_under/i18n/sale_warn_under.pot (+87/-0) sale_warn_under/sale.py (+92/-0) sale_warn_under/sale_warn_under_view.xml (+15/-0) sale_warn_under/security/ir.model.access.csv (+2/-0) sale_warn_under/static/src/css/wizard.css (+11/-0) sale_warn_under/wizard/__init__.py (+1/-0) sale_warn_under/wizard/sale_wizard.py (+41/-0) sale_warn_under/wizard/sale_wizard.xml (+44/-0) stock_delivery_split/__init__.py (+25/-0) stock_delivery_split/__openerp__.py (+42/-0) stock_delivery_split/wizard/__init__.py (+25/-0) stock_delivery_split/wizard/stock_move.py (+75/-0) stock_delivery_split/wizard/stock_move.xml (+42/-0) stock_forecast/__init__.py (+21/-0) stock_forecast/__openerp__.py (+39/-0) stock_forecast/report/__init__.py (+21/-0) stock_forecast/report/stock.rml (+244/-0) stock_forecast/report/stock_forecast.py (+656/-0) stock_forecast/report/stock_forecast_view.xml (+69/-0) stock_forecast/security/ir.model.access.csv (+2/-0) stock_move_autolot/__init__.py (+26/-0) stock_move_autolot/__openerp__.py (+41/-0) stock_move_autolot/account.py (+71/-0) stock_move_autolot/stock.py (+86/-0) stock_picking_create_lot_button/__init__.py (+22/-0) stock_picking_create_lot_button/__openerp__.py (+53/-0) stock_picking_create_lot_button/stock.py (+70/-0) stock_picking_create_lot_button/stock_view.xml (+22/-0) supplier_register_identification_number/__init__.py (+22/-0) supplier_register_identification_number/__openerp__.py (+48/-0) supplier_register_identification_number/i18n/fr.po (+36/-0) supplier_register_identification_number/i18n/supplier_register_identification_number.pot (+37/-0) supplier_register_identification_number/res_partner.py (+33/-0) supplier_register_identification_number/supplier_register_identification_number_view.xml (+15/-0) whole_quantity/__init__.py (+22/-0) whole_quantity/__openerp__.py (+40/-0) whole_quantity/whole_quantity_data.xml (+8/-0) writeoff_lot_tracking/__init__.py (+1/-0) writeoff_lot_tracking/__openerp__.py (+47/-0) writeoff_lot_tracking/account.py (+177/-0) |
To merge this branch: | bzr merge lp:~savoirfairelinux-openerp/purchase-wkfl/pallet-delivery |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Pedro Manuel Baeza | Needs Resubmitting | ||
Yannick Vaucher @ Camptocamp | Needs Fixing | ||
Review via email: mp+216325@code.launchpad.net |
Commit message
Description of the change
- 131. By Vincent Vinet
-
Remove context from a call -- that breaks views
- 132. By Mathieu Benoit
-
[FIX] purchase_
lot_tracking: show error when missing serial number or when no analytic account in line. - 133. By Mathieu Benoit
-
[ADD] sale_warn_under: access_
sale_order_ warn to group base.group_ sale_salesman with read/write/create - 134. By Mathieu Benoit
-
[IMP] stock_forecast: add default security access
- 135. By Mathieu Benoit
-
[DEL] product_
reserve_ forecast: remove unsued access security. - 136. By Mathieu Benoit
-
[FIX] product_
reserve_ forecast: revert last commit - 137. By Mathieu Benoit
-
Merge pallet-delivery
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote : | # |
- 138. By Mathieu Benoit
-
[FIX] writeoff_
lot_tracking: missing var move_lines in function writeoff_ move_line_ get - 139. By Mathieu Benoit
-
[IMP] pallet: change int nb_pallet to float
- 140. By Mathieu Benoit
-
[IMP] stock_forecast: add in green po_line in draft. Change 0 to empy in some columns.
- 141. By Mathieu Benoit
-
[IMP] sale_improved_slip: add more line of table CPC/CHEP in picking.rml
- 142. By Mathieu Benoit
-
[FIX] purchase_
lot_tracking: don't write prodlot when not matching between order_line and product. - 143. By Mathieu Benoit
-
[FIX] purchase_
lot_tracking: ignore service when match analytic account with stock.move - 144. By Mathieu Benoit
-
[FIX] stock_move_
autolot/ account. py, don't calcul if don't find account_analytic_id associated. - 145. By Mathieu Benoit
-
[FIX] writeoff_
lot_tracking/ account. py, ignore writeoff move line when it's supplier, bug when it's more than 2 currency. - 146. By Mathieu Benoit
-
[IMP] clean purchase_
lot_tracking/ purchase. py and adapt function to be utilize in another module. - 147. By Mathieu Benoit
-
[ADD] add module stock_picking_
create_ lot_button in tree view of Incoming Shipment. - 148. By Mathieu Benoit
-
[FIX] delivery stock when the stock_move is not associated with a po, but only with stock.picking.in. clean stock_move of sale_lot_available.
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
This project is now hosted on https:/
- 149. By Mathieu Benoit
-
[FIX] stock_move_
autolot/ account. py, fix list out of index. - 150. By Mathieu Benoit
-
[IMP] sale_lot_available: show only positive prodlot. Add limit of 10 in selection.
- 151. By Mathieu Benoit
-
FIX: generate error when create new lot on tree view if not in stock.move.in
- 152. By Mathieu Benoit
-
[IMP] sale_lot_available: reduice available lot in other stock.picking.line where stock.picking is not done.
- 153. By Mathieu Benoit
-
[FIX] Revert commit 150,cause another bug in Delivery Orders, we need to show all prodlot_id to associate it with an empty prodlot.
- 154. By Mathieu Benoit
-
[FIX] sale_lot_available: ignore compute lot when cancel.
Unmerged revisions
- 154. By Mathieu Benoit
-
[FIX] sale_lot_available: ignore compute lot when cancel.
- 153. By Mathieu Benoit
-
[FIX] Revert commit 150,cause another bug in Delivery Orders, we need to show all prodlot_id to associate it with an empty prodlot.
- 152. By Mathieu Benoit
-
[IMP] sale_lot_available: reduice available lot in other stock.picking.line where stock.picking is not done.
- 151. By Mathieu Benoit
-
FIX: generate error when create new lot on tree view if not in stock.move.in
- 150. By Mathieu Benoit
-
[IMP] sale_lot_available: show only positive prodlot. Add limit of 10 in selection.
- 149. By Mathieu Benoit
-
[FIX] stock_move_
autolot/ account. py, fix list out of index. - 148. By Mathieu Benoit
-
[FIX] delivery stock when the stock_move is not associated with a po, but only with stock.picking.in. clean stock_move of sale_lot_available.
- 147. By Mathieu Benoit
-
[ADD] add module stock_picking_
create_ lot_button in tree view of Incoming Shipment. - 146. By Mathieu Benoit
-
[IMP] clean purchase_
lot_tracking/ purchase. py and adapt function to be utilize in another module. - 145. By Mathieu Benoit
-
[FIX] writeoff_
lot_tracking/ account. py, ignore writeoff move line when it's supplier, bug when it's more than 2 currency.
Preview Diff
1 | === added directory 'delivery_editable_dates' | |||
2 | === added file 'delivery_editable_dates/__init__.py' | |||
3 | === added file 'delivery_editable_dates/__openerp__.py' | |||
4 | --- delivery_editable_dates/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
5 | +++ delivery_editable_dates/__openerp__.py 2014-08-27 19:22:25 +0000 | |||
6 | @@ -0,0 +1,39 @@ | |||
7 | 1 | # -*- coding: utf-8 -*- | ||
8 | 2 | ############################################################################## | ||
9 | 3 | # | ||
10 | 4 | # OpenERP, Open Source Management Solution | ||
11 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
12 | 6 | # | ||
13 | 7 | # This program is free software: you can redistribute it and/or modify | ||
14 | 8 | # it under the terms of the GNU Affero General Public License as | ||
15 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
16 | 10 | # License, or (at your option) any later version. | ||
17 | 11 | # | ||
18 | 12 | # This program is distributed in the hope that it will be useful, | ||
19 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
21 | 15 | # GNU Affero General Public License for more details. | ||
22 | 16 | # | ||
23 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
24 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
25 | 19 | # | ||
26 | 20 | ############################################################################## | ||
27 | 21 | |||
28 | 22 | { | ||
29 | 23 | 'name': 'Editable Delivery Dates', | ||
30 | 24 | 'version': '0.1', | ||
31 | 25 | 'author': 'Savoir-faire Linux', | ||
32 | 26 | 'maintainer': 'Savoir-faire Linux', | ||
33 | 27 | 'website': 'http://www.savoirfairelinux.com', | ||
34 | 28 | 'caterogy': 'sales', | ||
35 | 29 | 'description': """ | ||
36 | 30 | """, | ||
37 | 31 | 'depends': ['base', 'sale'], | ||
38 | 32 | 'data': [ | ||
39 | 33 | 'editable_delivery_dates_view.xml', | ||
40 | 34 | ], | ||
41 | 35 | 'demo': [], | ||
42 | 36 | 'test': [], | ||
43 | 37 | 'installable': True, | ||
44 | 38 | 'active': False, | ||
45 | 39 | } | ||
46 | 0 | 40 | ||
47 | === added file 'delivery_editable_dates/editable_delivery_dates_view.xml' | |||
48 | --- delivery_editable_dates/editable_delivery_dates_view.xml 1970-01-01 00:00:00 +0000 | |||
49 | +++ delivery_editable_dates/editable_delivery_dates_view.xml 2014-08-27 19:22:25 +0000 | |||
50 | @@ -0,0 +1,37 @@ | |||
51 | 1 | <?xml version="1.0" encoding="utf-8" ?> | ||
52 | 2 | <openerp> | ||
53 | 3 | <data> | ||
54 | 4 | <record id="editable_so_form" model="ir.ui.view"> | ||
55 | 5 | <field name="name">sale.order.editable.form</field> | ||
56 | 6 | <field name="model">sale.order</field> | ||
57 | 7 | <field name="inherit_id" ref="sale.view_order_form" /> | ||
58 | 8 | <field name="arch" type="xml"> | ||
59 | 9 | <field name="date_order" position="replace"> | ||
60 | 10 | <field name="date_order" attrs="{'readonly': False}" /> | ||
61 | 11 | </field> | ||
62 | 12 | </field> | ||
63 | 13 | </record> | ||
64 | 14 | |||
65 | 15 | <record id="editable_do_form" model="ir.ui.view"> | ||
66 | 16 | <field name="name">stock.picking.out.editable.form</field> | ||
67 | 17 | <field name="model">stock.picking.out</field> | ||
68 | 18 | <field name="inherit_id" ref="stock.view_picking_out_form" /> | ||
69 | 19 | <field name="arch" type="xml"> | ||
70 | 20 | <field name="min_date" position="replace"> | ||
71 | 21 | <field name="min_date" attrs="{'readonly': False, 'invisible': [('min_date', '=', False)]}" /> | ||
72 | 22 | </field> | ||
73 | 23 | </field> | ||
74 | 24 | </record> | ||
75 | 25 | |||
76 | 26 | <record id="editable_in_form" model="ir.ui.view"> | ||
77 | 27 | <field name="name">stock.picking.in.editable.form</field> | ||
78 | 28 | <field name="model">stock.picking.in</field> | ||
79 | 29 | <field name="inherit_id" ref="stock.view_picking_in_form" /> | ||
80 | 30 | <field name="arch" type="xml"> | ||
81 | 31 | <field name="min_date" position="replace"> | ||
82 | 32 | <field name="min_date" attrs="{'readonly': False, 'invisible': [('min_date', '=', False)]}" /> | ||
83 | 33 | </field> | ||
84 | 34 | </field> | ||
85 | 35 | </record> | ||
86 | 36 | </data> | ||
87 | 37 | </openerp> | ||
88 | 0 | 38 | ||
89 | === added directory 'delivery_editable_dates/i18n' | |||
90 | === added file 'delivery_editable_dates/i18n/delivery_editable_dates.pot' | |||
91 | --- delivery_editable_dates/i18n/delivery_editable_dates.pot 1970-01-01 00:00:00 +0000 | |||
92 | +++ delivery_editable_dates/i18n/delivery_editable_dates.pot 2014-08-27 19:22:25 +0000 | |||
93 | @@ -0,0 +1,16 @@ | |||
94 | 1 | # Translation of OpenERP Server. | ||
95 | 2 | # This file contains the translation of the following modules: | ||
96 | 3 | # | ||
97 | 4 | msgid "" | ||
98 | 5 | msgstr "" | ||
99 | 6 | "Project-Id-Version: OpenERP Server 7.0-20130811-231021\n" | ||
100 | 7 | "Report-Msgid-Bugs-To: \n" | ||
101 | 8 | "POT-Creation-Date: 2013-09-18 14:19+0000\n" | ||
102 | 9 | "PO-Revision-Date: 2013-09-18 14:19+0000\n" | ||
103 | 10 | "Last-Translator: <>\n" | ||
104 | 11 | "Language-Team: \n" | ||
105 | 12 | "MIME-Version: 1.0\n" | ||
106 | 13 | "Content-Type: text/plain; charset=UTF-8\n" | ||
107 | 14 | "Content-Transfer-Encoding: \n" | ||
108 | 15 | "Plural-Forms: \n" | ||
109 | 16 | |||
110 | 0 | 17 | ||
111 | === added directory 'landed_cost_per_pallet' | |||
112 | === added file 'landed_cost_per_pallet/README' | |||
113 | === added file 'landed_cost_per_pallet/__init__.py' | |||
114 | --- landed_cost_per_pallet/__init__.py 1970-01-01 00:00:00 +0000 | |||
115 | +++ landed_cost_per_pallet/__init__.py 2014-08-27 19:22:25 +0000 | |||
116 | @@ -0,0 +1,22 @@ | |||
117 | 1 | # -*- coding: utf-8 -*- | ||
118 | 2 | ############################################################################## | ||
119 | 3 | # | ||
120 | 4 | # OpenERP, Open Source Management Solution | ||
121 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
122 | 6 | # | ||
123 | 7 | # This program is free software: you can redistribute it and/or modify | ||
124 | 8 | # it under the terms of the GNU Affero General Public License as | ||
125 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
126 | 10 | # License, or (at your option) any later version. | ||
127 | 11 | # | ||
128 | 12 | # This program is distributed in the hope that it will be useful, | ||
129 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
130 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
131 | 15 | # GNU Affero General Public License for more details. | ||
132 | 16 | # | ||
133 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
134 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
135 | 19 | # | ||
136 | 20 | ############################################################################## | ||
137 | 21 | |||
138 | 22 | import purchase | ||
139 | 0 | 23 | ||
140 | === added file 'landed_cost_per_pallet/__openerp__.py' | |||
141 | --- landed_cost_per_pallet/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
142 | +++ landed_cost_per_pallet/__openerp__.py 2014-08-27 19:22:25 +0000 | |||
143 | @@ -0,0 +1,52 @@ | |||
144 | 1 | # -*- coding: utf-8 -*- | ||
145 | 2 | ############################################################################## | ||
146 | 3 | # | ||
147 | 4 | # OpenERP, Open Source Management Solution | ||
148 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
149 | 6 | # | ||
150 | 7 | # This program is free software: you can redistribute it and/or modify | ||
151 | 8 | # it under the terms of the GNU Affero General Public License as | ||
152 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
153 | 10 | # License, or (at your option) any later version. | ||
154 | 11 | # | ||
155 | 12 | # This program is distributed in the hope that it will be useful, | ||
156 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
157 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
158 | 15 | # GNU Affero General Public License for more details. | ||
159 | 16 | # | ||
160 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
161 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
162 | 19 | # | ||
163 | 20 | ############################################################################## | ||
164 | 21 | |||
165 | 22 | # NOTE: The name of the supplied field was initially "display_name", but it seems that OpenERP, | ||
166 | 23 | # whenever it seems "name" in the field, returns the value for "name". Well... | ||
167 | 24 | |||
168 | 25 | { | ||
169 | 26 | 'name': 'Landed Cost per Pallet', | ||
170 | 27 | 'version': '1.1', | ||
171 | 28 | 'author': 'Savoir-faire Linux', | ||
172 | 29 | 'maintainer': 'Savoir-faire Linux', | ||
173 | 30 | 'website': 'http://www.savoirfairelinux.com', | ||
174 | 31 | 'category': 'Generic Modules/Purchases', | ||
175 | 32 | 'description': """ | ||
176 | 33 | |||
177 | 34 | Lets you manage product quantities using crates and pallets | ||
178 | 35 | =========================================================== | ||
179 | 36 | |||
180 | 37 | This module modifies the purchase module to let you manage product | ||
181 | 38 | quantities by specifying a number of pallets and a number of crates | ||
182 | 39 | per pallet. | ||
183 | 40 | |||
184 | 41 | This also adds a 'Per Pallet' option to landed costs, in order to compute the | ||
185 | 42 | landed costs per pallet. | ||
186 | 43 | """, | ||
187 | 44 | 'depends': ['base', 'purchase', 'purchase_landed_costs'], | ||
188 | 45 | 'data': [ | ||
189 | 46 | 'landed_cost_per_pallet_view.xml', | ||
190 | 47 | ], | ||
191 | 48 | 'demo': [], | ||
192 | 49 | 'test': [], | ||
193 | 50 | 'installable': True, | ||
194 | 51 | 'active': False, | ||
195 | 52 | } | ||
196 | 0 | 53 | ||
197 | === added directory 'landed_cost_per_pallet/i18n' | |||
198 | === added file 'landed_cost_per_pallet/i18n/fr.po' | |||
199 | --- landed_cost_per_pallet/i18n/fr.po 1970-01-01 00:00:00 +0000 | |||
200 | +++ landed_cost_per_pallet/i18n/fr.po 2014-08-27 19:22:25 +0000 | |||
201 | @@ -0,0 +1,46 @@ | |||
202 | 1 | # Translation of OpenERP Server. | ||
203 | 2 | # This file contains the translation of the following modules: | ||
204 | 3 | # * landed_cost_per_pallet | ||
205 | 4 | # | ||
206 | 5 | msgid "" | ||
207 | 6 | msgstr "" | ||
208 | 7 | "Project-Id-Version: OpenERP Server 7.0-20130811-231021\n" | ||
209 | 8 | "Report-Msgid-Bugs-To: \n" | ||
210 | 9 | "POT-Creation-Date: 2013-09-18 14:21+0000\n" | ||
211 | 10 | "PO-Revision-Date: 2013-09-18 14:21+0000\n" | ||
212 | 11 | "Last-Translator: Alexandre Boily <alexandre.boily@savoirfairelinux.com>\n" | ||
213 | 12 | "Language-Team: Savoir-faire Linux\n" | ||
214 | 13 | "MIME-Version: 1.0\n" | ||
215 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
216 | 15 | "Content-Transfer-Encoding: \n" | ||
217 | 16 | "Plural-Forms: \n" | ||
218 | 17 | |||
219 | 18 | #. module: landed_cost_per_pallet | ||
220 | 19 | #: field:purchase.order,landed_cost_base_pallet:0 | ||
221 | 20 | msgid "Landed Costs Base Pallet" | ||
222 | 21 | msgstr "Coûts d'aterissage par palette" | ||
223 | 22 | |||
224 | 23 | #. module: landed_cost_per_pallet | ||
225 | 24 | #: model:ir.model,name:landed_cost_per_pallet.model_purchase_order_line | ||
226 | 25 | msgid "Purchase Order Line" | ||
227 | 26 | msgstr "Ligne de bon de commande" | ||
228 | 27 | |||
229 | 28 | #. module: landed_cost_per_pallet | ||
230 | 29 | #: model:ir.model,name:landed_cost_per_pallet.model_purchase_order | ||
231 | 30 | msgid "Purchase Order" | ||
232 | 31 | msgstr "Bon de commande" | ||
233 | 32 | |||
234 | 33 | #. module: landed_cost_per_pallet | ||
235 | 34 | #: field:purchase.order.line,nb_crates_per_pallet:0 | ||
236 | 35 | msgid "Crates per pallet" | ||
237 | 36 | msgstr "Caisses par palette" | ||
238 | 37 | |||
239 | 38 | #. module: landed_cost_per_pallet | ||
240 | 39 | #: field:purchase.order.line,nb_pallets:0 | ||
241 | 40 | msgid "Pallets" | ||
242 | 41 | msgstr "Palettes" | ||
243 | 42 | |||
244 | 43 | #. module: landed_cost_per_pallet | ||
245 | 44 | #: model:ir.model,name:landed_cost_per_pallet.model_landed_cost_position | ||
246 | 45 | msgid "landed.cost.position" | ||
247 | 46 | msgstr "landed.cost.position" | ||
248 | 0 | 47 | ||
249 | === added file 'landed_cost_per_pallet/i18n/landed_cost_per_pallet.pot' | |||
250 | --- landed_cost_per_pallet/i18n/landed_cost_per_pallet.pot 1970-01-01 00:00:00 +0000 | |||
251 | +++ landed_cost_per_pallet/i18n/landed_cost_per_pallet.pot 2014-08-27 19:22:25 +0000 | |||
252 | @@ -0,0 +1,47 @@ | |||
253 | 1 | # Translation of OpenERP Server. | ||
254 | 2 | # This file contains the translation of the following modules: | ||
255 | 3 | # * landed_cost_per_pallet | ||
256 | 4 | # | ||
257 | 5 | msgid "" | ||
258 | 6 | msgstr "" | ||
259 | 7 | "Project-Id-Version: OpenERP Server 7.0-20130811-231021\n" | ||
260 | 8 | "Report-Msgid-Bugs-To: \n" | ||
261 | 9 | "POT-Creation-Date: 2013-09-18 14:21+0000\n" | ||
262 | 10 | "PO-Revision-Date: 2013-09-18 14:21+0000\n" | ||
263 | 11 | "Last-Translator: <>\n" | ||
264 | 12 | "Language-Team: \n" | ||
265 | 13 | "MIME-Version: 1.0\n" | ||
266 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
267 | 15 | "Content-Transfer-Encoding: \n" | ||
268 | 16 | "Plural-Forms: \n" | ||
269 | 17 | |||
270 | 18 | #. module: landed_cost_per_pallet | ||
271 | 19 | #: field:purchase.order,landed_cost_base_pallet:0 | ||
272 | 20 | msgid "Landed Costs Base Pallet" | ||
273 | 21 | msgstr "" | ||
274 | 22 | |||
275 | 23 | #. module: landed_cost_per_pallet | ||
276 | 24 | #: model:ir.model,name:landed_cost_per_pallet.model_purchase_order_line | ||
277 | 25 | msgid "Purchase Order Line" | ||
278 | 26 | msgstr "" | ||
279 | 27 | |||
280 | 28 | #. module: landed_cost_per_pallet | ||
281 | 29 | #: model:ir.model,name:landed_cost_per_pallet.model_purchase_order | ||
282 | 30 | msgid "Purchase Order" | ||
283 | 31 | msgstr "" | ||
284 | 32 | |||
285 | 33 | #. module: landed_cost_per_pallet | ||
286 | 34 | #: field:purchase.order.line,nb_crates_per_pallet:0 | ||
287 | 35 | msgid "Crates per pallet" | ||
288 | 36 | msgstr "" | ||
289 | 37 | |||
290 | 38 | #. module: landed_cost_per_pallet | ||
291 | 39 | #: field:purchase.order.line,nb_pallets:0 | ||
292 | 40 | msgid "Pallets" | ||
293 | 41 | msgstr "" | ||
294 | 42 | |||
295 | 43 | #. module: landed_cost_per_pallet | ||
296 | 44 | #: model:ir.model,name:landed_cost_per_pallet.model_landed_cost_position | ||
297 | 45 | msgid "landed.cost.position" | ||
298 | 46 | msgstr "" | ||
299 | 47 | |||
300 | 0 | 48 | ||
301 | === added file 'landed_cost_per_pallet/landed_cost_per_pallet_view.xml' | |||
302 | --- landed_cost_per_pallet/landed_cost_per_pallet_view.xml 1970-01-01 00:00:00 +0000 | |||
303 | +++ landed_cost_per_pallet/landed_cost_per_pallet_view.xml 2014-08-27 19:22:25 +0000 | |||
304 | @@ -0,0 +1,27 @@ | |||
305 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
306 | 2 | <openerp> | ||
307 | 3 | <data> | ||
308 | 4 | <record id="view_purchase_pallet_crate_order_line" model="ir.ui.view"> | ||
309 | 5 | <field name="name">purchase.order.form</field> | ||
310 | 6 | <field name="model">purchase.order</field> | ||
311 | 7 | <field name="inherit_id" ref="purchase.purchase_order_form"/> | ||
312 | 8 | <field name="arch" type="xml"> | ||
313 | 9 | <field name="product_qty" position="before"> | ||
314 | 10 | <field name="nb_pallets"/> | ||
315 | 11 | <field name="nb_crates_per_pallet"/> | ||
316 | 12 | </field> | ||
317 | 13 | </field> | ||
318 | 14 | </record> | ||
319 | 15 | |||
320 | 16 | <record id="view_purchase_pallet_crate_thing" model="ir.ui.view"> | ||
321 | 17 | <field name="name">purchase.order.landing.form</field> | ||
322 | 18 | <field name="model">purchase.order</field> | ||
323 | 19 | <field name="inherit_id" ref="purchase_landed_costs.c2c_purchase_order_landed_cost_view" /> | ||
324 | 20 | <field name="arch" type="xml"> | ||
325 | 21 | <field name="landed_cost_base_value" position="after"> | ||
326 | 22 | <field name="landed_cost_base_pallet" /> | ||
327 | 23 | </field> | ||
328 | 24 | </field> | ||
329 | 25 | </record> | ||
330 | 26 | </data> | ||
331 | 27 | </openerp> | ||
332 | 0 | 28 | ||
333 | === added file 'landed_cost_per_pallet/purchase.py' | |||
334 | --- landed_cost_per_pallet/purchase.py 1970-01-01 00:00:00 +0000 | |||
335 | +++ landed_cost_per_pallet/purchase.py 2014-08-27 19:22:25 +0000 | |||
336 | @@ -0,0 +1,125 @@ | |||
337 | 1 | # -*- coding: utf-8 -*- | ||
338 | 2 | ############################################################################## | ||
339 | 3 | # | ||
340 | 4 | # OpenERP, Open Source Management Solution | ||
341 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
342 | 6 | # | ||
343 | 7 | # This program is free software: you can redistribute it and/or modify | ||
344 | 8 | # it under the terms of the GNU Affero General Public License as | ||
345 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
346 | 10 | # License, or (at your option) any later version. | ||
347 | 11 | # | ||
348 | 12 | # This program is distributed in the hope that it will be useful, | ||
349 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
350 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
351 | 15 | # GNU Affero General Public License for more details. | ||
352 | 16 | # | ||
353 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
354 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
355 | 19 | # | ||
356 | 20 | ############################################################################## | ||
357 | 21 | |||
358 | 22 | from openerp.osv import orm, fields | ||
359 | 23 | import openerp.addons.decimal_precision as dp | ||
360 | 24 | |||
361 | 25 | class purchase_order(orm.Model): | ||
362 | 26 | |||
363 | 27 | _inherit = 'purchase.order' | ||
364 | 28 | |||
365 | 29 | def _landed_cost_base_pallet(self, cr, uid, ids, name, args, context): | ||
366 | 30 | if not ids: | ||
367 | 31 | return {} | ||
368 | 32 | |||
369 | 33 | result = {} | ||
370 | 34 | landed_costs_base_pallet = 0.0 | ||
371 | 35 | |||
372 | 36 | for line in self.browse(cr, uid, ids): | ||
373 | 37 | if line.landed_cost_line_ids: | ||
374 | 38 | for costs in line.landed_cost_line_ids: | ||
375 | 39 | if costs.price_type == 'per_pallet': | ||
376 | 40 | landed_costs_base_pallet += costs.amount | ||
377 | 41 | result[line.id] = landed_costs_base_pallet | ||
378 | 42 | |||
379 | 43 | return result | ||
380 | 44 | |||
381 | 45 | _columns = { | ||
382 | 46 | 'landed_cost_base_pallet': fields.function( | ||
383 | 47 | _landed_cost_base_pallet, | ||
384 | 48 | digits_compute=dp.get_precision('Account'), | ||
385 | 49 | string='Landed Costs Base Pallet'), | ||
386 | 50 | } | ||
387 | 51 | |||
388 | 52 | |||
389 | 53 | class purchase_order_line(orm.Model): | ||
390 | 54 | |||
391 | 55 | _inherit = 'purchase.order.line' | ||
392 | 56 | |||
393 | 57 | def _product_quantity(self, cursor, user, ids, name, arg, context=None): | ||
394 | 58 | res = {} | ||
395 | 59 | for line in self.browse(cursor, user, ids, context=context): | ||
396 | 60 | if not line.nb_crates_per_pallet or not line.nb_pallets: | ||
397 | 61 | res[line.id] = 0 | ||
398 | 62 | else: | ||
399 | 63 | res[line.id] = line.nb_crates_per_pallet * line.nb_pallets | ||
400 | 64 | return res | ||
401 | 65 | |||
402 | 66 | def _landing_cost_order(self, cr, uid, ids, name, args, context): | ||
403 | 67 | if not ids: | ||
404 | 68 | return {} | ||
405 | 69 | |||
406 | 70 | result = {} | ||
407 | 71 | |||
408 | 72 | lines = self.browse(cr, uid, ids) | ||
409 | 73 | |||
410 | 74 | # Pre-compute total number of pallets | ||
411 | 75 | pallets_total = 0.0 | ||
412 | 76 | for line in lines: | ||
413 | 77 | for po_line in line.order_id.order_line: | ||
414 | 78 | if po_line.order_id.landed_cost_line_ids: | ||
415 | 79 | pallets_total += po_line.nb_pallets | ||
416 | 80 | |||
417 | 81 | # Landed costs line by line | ||
418 | 82 | for line in lines: | ||
419 | 83 | landed_costs = 0.0 | ||
420 | 84 | # distribution of landed costs of PO | ||
421 | 85 | if line.order_id.landed_cost_line_ids: | ||
422 | 86 | # Base value (Absolute Value) | ||
423 | 87 | landed_costs += line.order_id.landed_cost_base_value / line.order_id.amount_total * line.price_subtotal | ||
424 | 88 | |||
425 | 89 | # Base quantity (Per Quantity) | ||
426 | 90 | landed_costs += line.order_id.landed_cost_base_quantity / line.order_id.quantity_total * line.product_qty | ||
427 | 91 | |||
428 | 92 | # Base pallet (Per Pallet) | ||
429 | 93 | landed_costs += line.order_id.landed_cost_base_pallet / pallets_total * line.nb_pallets | ||
430 | 94 | result[line.id] = landed_costs | ||
431 | 95 | |||
432 | 96 | return result | ||
433 | 97 | |||
434 | 98 | _columns = { | ||
435 | 99 | 'nb_pallets': fields.float('Pallets', required=True), | ||
436 | 100 | 'nb_crates_per_pallet': fields.integer('Crates per pallet', required=True), | ||
437 | 101 | 'product_qty': fields.function(_product_quantity, | ||
438 | 102 | digits_compute=dp.get_precision('Product Unit of Measure'), | ||
439 | 103 | string="Quantity", | ||
440 | 104 | type='float'), | ||
441 | 105 | 'landing_costs_order': fields.function(_landing_cost_order, | ||
442 | 106 | digits_compute=dp.get_precision('Account'), | ||
443 | 107 | string='Landing Costs from Order'), | ||
444 | 108 | } | ||
445 | 109 | |||
446 | 110 | |||
447 | 111 | class landed_cost_position(orm.Model): | ||
448 | 112 | |||
449 | 113 | _inherit = 'landed.cost.position' | ||
450 | 114 | |||
451 | 115 | _columns = { | ||
452 | 116 | 'price_type': fields.selection( | ||
453 | 117 | [('per_pallet', 'Per Pallet'), ('per_unit','Per Quantity'), ('value','Absolute Value')], | ||
454 | 118 | 'Amount Type', | ||
455 | 119 | required=True, | ||
456 | 120 | help="Defines if the amount is to be calculated for each quantity or an absolute value"), | ||
457 | 121 | } | ||
458 | 122 | |||
459 | 123 | _defaults = { | ||
460 | 124 | 'price_type': 'per_pallet', | ||
461 | 125 | } | ||
462 | 0 | 126 | ||
463 | === added directory 'pallet_delivery' | |||
464 | === added file 'pallet_delivery/README' | |||
465 | === added file 'pallet_delivery/__init__.py' | |||
466 | --- pallet_delivery/__init__.py 1970-01-01 00:00:00 +0000 | |||
467 | +++ pallet_delivery/__init__.py 2014-08-27 19:22:25 +0000 | |||
468 | @@ -0,0 +1,22 @@ | |||
469 | 1 | # -*- coding: utf-8 -*- | ||
470 | 2 | ############################################################################## | ||
471 | 3 | # | ||
472 | 4 | # OpenERP, Open Source Management Solution | ||
473 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
474 | 6 | # | ||
475 | 7 | # This program is free software: you can redistribute it and/or modify | ||
476 | 8 | # it under the terms of the GNU Affero General Public License as | ||
477 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
478 | 10 | # License, or (at your option) any later version. | ||
479 | 11 | # | ||
480 | 12 | # This program is distributed in the hope that it will be useful, | ||
481 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
482 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
483 | 15 | # GNU Affero General Public License for more details. | ||
484 | 16 | # | ||
485 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
486 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
487 | 19 | # | ||
488 | 20 | ############################################################################## | ||
489 | 21 | |||
490 | 22 | import stock | ||
491 | 0 | 23 | ||
492 | === added file 'pallet_delivery/__openerp__.py' | |||
493 | --- pallet_delivery/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
494 | +++ pallet_delivery/__openerp__.py 2014-08-27 19:22:25 +0000 | |||
495 | @@ -0,0 +1,58 @@ | |||
496 | 1 | # -*- coding: utf-8 -*- | ||
497 | 2 | ############################################################################## | ||
498 | 3 | # | ||
499 | 4 | # OpenERP, Open Source Management Solution | ||
500 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
501 | 6 | # | ||
502 | 7 | # This program is free software: you can redistribute it and/or modify | ||
503 | 8 | # it under the terms of the GNU Affero General Public License as | ||
504 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
505 | 10 | # License, or (at your option) any later version. | ||
506 | 11 | # | ||
507 | 12 | # This program is distributed in the hope that it will be useful, | ||
508 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
509 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
510 | 15 | # GNU Affero General Public License for more details. | ||
511 | 16 | # | ||
512 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
513 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
514 | 19 | # | ||
515 | 20 | ############################################################################## | ||
516 | 21 | |||
517 | 22 | # NOTE: The name of the supplied field was initially "display_name", but it seems that OpenERP, | ||
518 | 23 | # whenever it seems "name" in the field, returns the value for "name". Well... | ||
519 | 24 | |||
520 | 25 | { | ||
521 | 26 | 'name': 'Pallet delivery', | ||
522 | 27 | 'version': '1.1', | ||
523 | 28 | 'author': 'Savoir-faire Linux', | ||
524 | 29 | 'maintainer': 'Savoir-faire Linux', | ||
525 | 30 | 'website': 'http://www.savoirfairelinux.com', | ||
526 | 31 | 'category': 'warehouse', | ||
527 | 32 | 'description': """ | ||
528 | 33 | |||
529 | 34 | Lets you manage truck deliveries | ||
530 | 35 | =========================================================== | ||
531 | 36 | |||
532 | 37 | This module lets you specify where exactly in the delivery truck | ||
533 | 38 | was the merchandise. | ||
534 | 39 | |||
535 | 40 | Also lets you give more specific information like the temperature | ||
536 | 41 | at various points. | ||
537 | 42 | |||
538 | 43 | """, | ||
539 | 44 | 'depends': [ | ||
540 | 45 | 'base', 'purchase', 'stock', | ||
541 | 46 | 'landed_cost_per_pallet', 'purchase_lot_tracking', | ||
542 | 47 | ], | ||
543 | 48 | 'data': [ | ||
544 | 49 | 'security/ir.model.access.csv', | ||
545 | 50 | 'stock_workflow.xml', | ||
546 | 51 | 'pallet_delivery_data.xml', | ||
547 | 52 | 'pallet_delivery_view.xml', | ||
548 | 53 | ], | ||
549 | 54 | 'demo': [], | ||
550 | 55 | 'test': [], | ||
551 | 56 | 'installable': True, | ||
552 | 57 | 'active': False, | ||
553 | 58 | } | ||
554 | 0 | 59 | ||
555 | === added directory 'pallet_delivery/i18n' | |||
556 | === added file 'pallet_delivery/i18n/fr.po' | |||
557 | --- pallet_delivery/i18n/fr.po 1970-01-01 00:00:00 +0000 | |||
558 | +++ pallet_delivery/i18n/fr.po 2014-08-27 19:22:25 +0000 | |||
559 | @@ -0,0 +1,186 @@ | |||
560 | 1 | # Translation of OpenERP Server. | ||
561 | 2 | # This file contains the translation of the following modules: | ||
562 | 3 | # * pallet_delivery | ||
563 | 4 | # | ||
564 | 5 | msgid "" | ||
565 | 6 | msgstr "" | ||
566 | 7 | "Project-Id-Version: OpenERP Server 7.0-20130811-231021\n" | ||
567 | 8 | "Report-Msgid-Bugs-To: \n" | ||
568 | 9 | "POT-Creation-Date: 2013-09-05 14:56+0000\n" | ||
569 | 10 | "PO-Revision-Date: 2013-09-05 14:56+0000\n" | ||
570 | 11 | "Last-Translator: <>\n" | ||
571 | 12 | "Language-Team: \n" | ||
572 | 13 | "MIME-Version: 1.0\n" | ||
573 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
574 | 15 | "Content-Transfer-Encoding: \n" | ||
575 | 16 | "Plural-Forms: \n" | ||
576 | 17 | |||
577 | 18 | #. module: pallet_delivery | ||
578 | 19 | #: model:ir.actions.act_window,help:pallet_delivery.action_truck_pending | ||
579 | 20 | msgid "<p class=\"oe_view_nocontent_create\">Click to create a draft truck</p>\n" | ||
580 | 21 | "\n" | ||
581 | 22 | " <p>The truck contains an incoming, physical shipment. With it you can\n" | ||
582 | 23 | " register the truck's details, such as its serial number, sampled\n" | ||
583 | 24 | " temperatures, and other information. Also, the truck serves you as a\n" | ||
584 | 25 | " map of what your company received.</p>\n" | ||
585 | 26 | "\n" | ||
586 | 27 | " <p>When you confirm the truck, it will act as an “Incoming Shipment”\n" | ||
587 | 28 | " confirmation, and the products will be moved from your Suppliers (as\n" | ||
588 | 29 | " listed in Purchase Orders) to your Stock.</p>\n" | ||
589 | 30 | " " | ||
590 | 31 | msgstr "<p class=\"oe_view_nocontent_create\">Cliquez pour créer un camion brouillon</p>\n | ||
591 | 32 | <p>Le camion contient une livraison physique entrante. Avec celui-ci, vous | ||
592 | 33 | pouvez enregistrer les détails du camion, comme son numéro de série, les | ||
593 | 34 | températures échantillonnées, et d'autre informations. De même, le camion est | ||
594 | 35 | utile comme carte des produits reçus.</p> | ||
595 | 36 | <p>Lorsque vous confirmez la réception du camion, ce dernier agira comme une | ||
596 | 37 | \"Livraison entrante\" confirmée, et le produits seront déplacés de vos | ||
597 | 38 | fournisseurs (tels que listés dans vos bons de commandes) vers votre | ||
598 | 39 | entrepôt.</p>" | ||
599 | 40 | |||
600 | 41 | #. module: pallet_delivery | ||
601 | 42 | #: model:ir.model,name:pallet_delivery.model_purchase_order_line | ||
602 | 43 | msgid "Purchase Order Line" | ||
603 | 44 | msgstr "Ligne de bon d'achat" | ||
604 | 45 | |||
605 | 46 | #. module: pallet_delivery | ||
606 | 47 | #: view:stock.truck:0 | ||
607 | 48 | msgid "Confirm" | ||
608 | 49 | msgstr "Confirmer" | ||
609 | 50 | |||
610 | 51 | #. module: pallet_delivery | ||
611 | 52 | #: model:ir.model,name:pallet_delivery.model_stock_truck_line | ||
612 | 53 | msgid "A single pallet shipped in an incoming truck" | ||
613 | 54 | msgstr "Une seule palette livrée dans un camion entrant" | ||
614 | 55 | |||
615 | 56 | #. module: pallet_delivery | ||
616 | 57 | #: view:stock.truck:0 | ||
617 | 58 | #: field:stock.truck.line,crates:0 | ||
618 | 59 | msgid "Crates" | ||
619 | 60 | msgstr "Caisses" | ||
620 | 61 | |||
621 | 62 | #. module: pallet_delivery | ||
622 | 63 | #: field:stock.truck.line,pallet:0 | ||
623 | 64 | msgid "Pallet" | ||
624 | 65 | msgstr "Palette" | ||
625 | 66 | |||
626 | 67 | #. module: pallet_delivery | ||
627 | 68 | #: field:stock.truck,state:0 | ||
628 | 69 | msgid "State" | ||
629 | 70 | msgstr "État" | ||
630 | 71 | |||
631 | 72 | #. module: pallet_delivery | ||
632 | 73 | #: model:ir.model,name:pallet_delivery.model_stock_truck | ||
633 | 74 | msgid "Incoming truck" | ||
634 | 75 | msgstr "Camion entrant" | ||
635 | 76 | |||
636 | 77 | #. module: pallet_delivery | ||
637 | 78 | #: selection:stock.truck,state:0 | ||
638 | 79 | msgid "Draft" | ||
639 | 80 | msgstr "Ébauche" | ||
640 | 81 | |||
641 | 82 | #. module: pallet_delivery | ||
642 | 83 | #: view:stock.truck:0 | ||
643 | 84 | msgid "Details" | ||
644 | 85 | msgstr "Détails" | ||
645 | 86 | |||
646 | 87 | #. module: pallet_delivery | ||
647 | 88 | #: field:stock.truck,front_temperature:0 | ||
648 | 89 | msgid "Front Temperature" | ||
649 | 90 | msgstr "Température avant" | ||
650 | 91 | |||
651 | 92 | #. module: pallet_delivery | ||
652 | 93 | #: field:stock.truck,supplier:0 | ||
653 | 94 | msgid "Supplier" | ||
654 | 95 | msgstr "Fournisseur" | ||
655 | 96 | |||
656 | 97 | #. module: pallet_delivery | ||
657 | 98 | #: view:stock.truck:0 | ||
658 | 99 | msgid "Truck Composition" | ||
659 | 100 | msgstr "Composition du camion" | ||
660 | 101 | |||
661 | 102 | #. module: pallet_delivery | ||
662 | 103 | #: field:stock.truck,back_temperature:0 | ||
663 | 104 | msgid "Back Temperature" | ||
664 | 105 | msgstr "Température arrière" | ||
665 | 106 | |||
666 | 107 | #. module: pallet_delivery | ||
667 | 108 | #: view:stock.truck:0 | ||
668 | 109 | msgid "Serial Number" | ||
669 | 110 | msgstr "Numéro de série" | ||
670 | 111 | |||
671 | 112 | #. module: pallet_delivery | ||
672 | 113 | #: view:stock.truck:0 | ||
673 | 114 | msgid "Left Pallets" | ||
674 | 115 | msgstr "Palettes gauche" | ||
675 | 116 | |||
676 | 117 | #. module: pallet_delivery | ||
677 | 118 | #: field:stock.truck,left_pallet_ids:0 | ||
678 | 119 | #: field:stock.truck,right_pallet_ids:0 | ||
679 | 120 | msgid "Pallets" | ||
680 | 121 | msgstr "Palettes" | ||
681 | 122 | |||
682 | 123 | #. module: pallet_delivery | ||
683 | 124 | #: field:stock.truck,truck_sn:0 | ||
684 | 125 | msgid "Truck S/N" | ||
685 | 126 | msgstr "Numéro de série" | ||
686 | 127 | |||
687 | 128 | #. module: pallet_delivery | ||
688 | 129 | #: field:stock.truck,name:0 | ||
689 | 130 | #: field:stock.truck.line,name:0 | ||
690 | 131 | msgid "Name" | ||
691 | 132 | msgstr "Nom" | ||
692 | 133 | |||
693 | 134 | #. module: pallet_delivery | ||
694 | 135 | #: field:purchase.order,stock_truck_ids:0 | ||
695 | 136 | msgid "Trucks" | ||
696 | 137 | msgstr "Camions" | ||
697 | 138 | |||
698 | 139 | #. module: pallet_delivery | ||
699 | 140 | #: view:stock.truck:0 | ||
700 | 141 | msgid "Search Truck" | ||
701 | 142 | msgstr "Rechercher un camion" | ||
702 | 143 | |||
703 | 144 | #. module: pallet_delivery | ||
704 | 145 | #: model:ir.model,name:pallet_delivery.model_purchase_order | ||
705 | 146 | msgid "Purchase Order" | ||
706 | 147 | msgstr "Bon d'achat" | ||
707 | 148 | |||
708 | 149 | #. module: pallet_delivery | ||
709 | 150 | #: field:stock.truck,arrival:0 | ||
710 | 151 | msgid "Date of Arrival" | ||
711 | 152 | msgstr "Date d'arrivée" | ||
712 | 153 | |||
713 | 154 | #. module: pallet_delivery | ||
714 | 155 | #: view:stock.truck:0 | ||
715 | 156 | #: field:stock.truck.line,left_id:0 | ||
716 | 157 | #: field:stock.truck.line,right_id:0 | ||
717 | 158 | msgid "Truck" | ||
718 | 159 | msgstr "Camion" | ||
719 | 160 | |||
720 | 161 | #. module: pallet_delivery | ||
721 | 162 | #: view:stock.truck:0 | ||
722 | 163 | msgid "Right Pallets" | ||
723 | 164 | msgstr "Palettes droite" | ||
724 | 165 | |||
725 | 166 | #. module: pallet_delivery | ||
726 | 167 | #: model:ir.actions.act_window,name:pallet_delivery.action_truck_pending | ||
727 | 168 | msgid "On Draft Truck" | ||
728 | 169 | msgstr "Camion en ébauche" | ||
729 | 170 | |||
730 | 171 | #. module: pallet_delivery | ||
731 | 172 | #: model:ir.ui.menu,name:pallet_delivery.menu_truck | ||
732 | 173 | msgid "Incoming Truck" | ||
733 | 174 | msgstr "Camion entrant" | ||
734 | 175 | |||
735 | 176 | #. module: pallet_delivery | ||
736 | 177 | #: selection:stock.truck,state:0 | ||
737 | 178 | msgid "Done" | ||
738 | 179 | msgstr "Complété" | ||
739 | 180 | |||
740 | 181 | #. module: pallet_delivery | ||
741 | 182 | #: view:stock.truck:0 | ||
742 | 183 | #: field:stock.truck,purchase_order_ids:0 | ||
743 | 184 | msgid "Purchase Orders" | ||
744 | 185 | msgstr "Bons d'achats" | ||
745 | 186 | |||
746 | 0 | 187 | ||
747 | === added file 'pallet_delivery/i18n/pallet_delivery.pot' | |||
748 | --- pallet_delivery/i18n/pallet_delivery.pot 1970-01-01 00:00:00 +0000 | |||
749 | +++ pallet_delivery/i18n/pallet_delivery.pot 2014-08-27 19:22:25 +0000 | |||
750 | @@ -0,0 +1,225 @@ | |||
751 | 1 | # Translation of OpenERP Server. | ||
752 | 2 | # This file contains the translation of the following modules: | ||
753 | 3 | # * pallet_delivery | ||
754 | 4 | # | ||
755 | 5 | msgid "" | ||
756 | 6 | msgstr "" | ||
757 | 7 | "Project-Id-Version: OpenERP Server 7.0\n" | ||
758 | 8 | "Report-Msgid-Bugs-To: \n" | ||
759 | 9 | "POT-Creation-Date: 2014-05-04 15:54+0000\n" | ||
760 | 10 | "PO-Revision-Date: 2014-05-04 15:54+0000\n" | ||
761 | 11 | "Last-Translator: <>\n" | ||
762 | 12 | "Language-Team: \n" | ||
763 | 13 | "MIME-Version: 1.0\n" | ||
764 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
765 | 15 | "Content-Transfer-Encoding: \n" | ||
766 | 16 | "Plural-Forms: \n" | ||
767 | 17 | |||
768 | 18 | #. module: pallet_delivery | ||
769 | 19 | #: model:ir.actions.act_window,help:pallet_delivery.action_truck_pending | ||
770 | 20 | msgid "<p class=\"oe_view_nocontent_create\">Click to create a draft truck</p>\n" | ||
771 | 21 | "\n" | ||
772 | 22 | " <p>The truck contains an incoming, physical shipment. With it you can\n" | ||
773 | 23 | " register the truck's details, such as its serial number, sampled\n" | ||
774 | 24 | " temperatures, and other information. Also, the truck serves you as a\n" | ||
775 | 25 | " map of what your company received.</p>\n" | ||
776 | 26 | "\n" | ||
777 | 27 | " <p>When you confirm the truck, it will act as an “Incoming Shipment”\n" | ||
778 | 28 | " confirmation, and the products will be moved from your Suppliers (as\n" | ||
779 | 29 | " listed in Purchase Orders) to your Stock.</p>\n" | ||
780 | 30 | " " | ||
781 | 31 | msgstr "" | ||
782 | 32 | |||
783 | 33 | #. module: pallet_delivery | ||
784 | 34 | #: model:ir.model,name:pallet_delivery.model_purchase_order_line | ||
785 | 35 | msgid "Purchase Order Line" | ||
786 | 36 | msgstr "" | ||
787 | 37 | |||
788 | 38 | #. module: pallet_delivery | ||
789 | 39 | #: field:stock.truck,back_temperature:0 | ||
790 | 40 | msgid "Back Temperature" | ||
791 | 41 | msgstr "" | ||
792 | 42 | |||
793 | 43 | #. module: pallet_delivery | ||
794 | 44 | #: model:ir.model,name:pallet_delivery.model_stock_picking_in | ||
795 | 45 | msgid "Incoming Shipments" | ||
796 | 46 | msgstr "" | ||
797 | 47 | |||
798 | 48 | #. module: pallet_delivery | ||
799 | 49 | #: model:ir.model,name:pallet_delivery.model_stock_truck_line | ||
800 | 50 | msgid "A single pallet shipped in an incoming truck" | ||
801 | 51 | msgstr "" | ||
802 | 52 | |||
803 | 53 | #. module: pallet_delivery | ||
804 | 54 | #: view:stock.truck:0 | ||
805 | 55 | #: field:stock.truck.line,crates:0 | ||
806 | 56 | msgid "Crates" | ||
807 | 57 | msgstr "" | ||
808 | 58 | |||
809 | 59 | #. module: pallet_delivery | ||
810 | 60 | #: field:stock.truck.line,pallet:0 | ||
811 | 61 | msgid "Pallet" | ||
812 | 62 | msgstr "" | ||
813 | 63 | |||
814 | 64 | #. module: pallet_delivery | ||
815 | 65 | #: field:stock.truck,state:0 | ||
816 | 66 | msgid "State" | ||
817 | 67 | msgstr "" | ||
818 | 68 | |||
819 | 69 | #. module: pallet_delivery | ||
820 | 70 | #: model:ir.model,name:pallet_delivery.model_stock_truck | ||
821 | 71 | msgid "Incoming truck" | ||
822 | 72 | msgstr "" | ||
823 | 73 | |||
824 | 74 | #. module: pallet_delivery | ||
825 | 75 | #: selection:stock.truck,state:0 | ||
826 | 76 | msgid "Draft" | ||
827 | 77 | msgstr "" | ||
828 | 78 | |||
829 | 79 | #. module: pallet_delivery | ||
830 | 80 | #: view:stock.truck:0 | ||
831 | 81 | msgid "Details" | ||
832 | 82 | msgstr "" | ||
833 | 83 | |||
834 | 84 | #. module: pallet_delivery | ||
835 | 85 | #: field:stock.truck,front_temperature:0 | ||
836 | 86 | msgid "Front Temperature" | ||
837 | 87 | msgstr "" | ||
838 | 88 | |||
839 | 89 | #. module: pallet_delivery | ||
840 | 90 | #: field:stock.truck,supplier:0 | ||
841 | 91 | msgid "Supplier" | ||
842 | 92 | msgstr "" | ||
843 | 93 | |||
844 | 94 | #. module: pallet_delivery | ||
845 | 95 | #: field:purchase.order,hidden:0 | ||
846 | 96 | msgid "Hidden" | ||
847 | 97 | msgstr "" | ||
848 | 98 | |||
849 | 99 | #. module: pallet_delivery | ||
850 | 100 | #: view:stock.truck:0 | ||
851 | 101 | msgid "Truck Composition" | ||
852 | 102 | msgstr "" | ||
853 | 103 | |||
854 | 104 | #. module: pallet_delivery | ||
855 | 105 | #: field:purchase.order,assigned:0 | ||
856 | 106 | msgid "unknown" | ||
857 | 107 | msgstr "" | ||
858 | 108 | |||
859 | 109 | #. module: pallet_delivery | ||
860 | 110 | #: view:stock.truck:0 | ||
861 | 111 | msgid "Confirm" | ||
862 | 112 | msgstr "" | ||
863 | 113 | |||
864 | 114 | #. module: pallet_delivery | ||
865 | 115 | #: view:stock.truck:0 | ||
866 | 116 | msgid "Serial Number" | ||
867 | 117 | msgstr "" | ||
868 | 118 | |||
869 | 119 | #. module: pallet_delivery | ||
870 | 120 | #: view:stock.truck:0 | ||
871 | 121 | msgid "Right Pallets" | ||
872 | 122 | msgstr "" | ||
873 | 123 | |||
874 | 124 | #. module: pallet_delivery | ||
875 | 125 | #: field:stock.truck,left_pallet_ids:0 | ||
876 | 126 | #: field:stock.truck,right_pallet_ids:0 | ||
877 | 127 | msgid "Pallets" | ||
878 | 128 | msgstr "" | ||
879 | 129 | |||
880 | 130 | #. module: pallet_delivery | ||
881 | 131 | #: field:stock.truck,truck_sn:0 | ||
882 | 132 | msgid "Truck S/N" | ||
883 | 133 | msgstr "" | ||
884 | 134 | |||
885 | 135 | #. module: pallet_delivery | ||
886 | 136 | #: code:addons/pallet_delivery/stock.py:293 | ||
887 | 137 | #, python-format | ||
888 | 138 | msgid "Input Error !" | ||
889 | 139 | msgstr "" | ||
890 | 140 | |||
891 | 141 | #. module: pallet_delivery | ||
892 | 142 | #: field:stock.truck,name:0 | ||
893 | 143 | #: field:stock.truck.line,name:0 | ||
894 | 144 | msgid "Name" | ||
895 | 145 | msgstr "" | ||
896 | 146 | |||
897 | 147 | #. module: pallet_delivery | ||
898 | 148 | #: field:purchase.order,stock_truck_ids:0 | ||
899 | 149 | msgid "Trucks" | ||
900 | 150 | msgstr "" | ||
901 | 151 | |||
902 | 152 | #. module: pallet_delivery | ||
903 | 153 | #: view:stock.truck:0 | ||
904 | 154 | msgid "Search Truck" | ||
905 | 155 | msgstr "" | ||
906 | 156 | |||
907 | 157 | #. module: pallet_delivery | ||
908 | 158 | #: model:ir.model,name:pallet_delivery.model_purchase_order | ||
909 | 159 | msgid "Purchase Order" | ||
910 | 160 | msgstr "" | ||
911 | 161 | |||
912 | 162 | #. module: pallet_delivery | ||
913 | 163 | #: field:stock.truck,arrival:0 | ||
914 | 164 | msgid "Date of Arrival" | ||
915 | 165 | msgstr "" | ||
916 | 166 | |||
917 | 167 | #. module: pallet_delivery | ||
918 | 168 | #: view:stock.truck:0 | ||
919 | 169 | #: field:stock.truck.line,left_id:0 | ||
920 | 170 | #: field:stock.truck.line,right_id:0 | ||
921 | 171 | msgid "Truck" | ||
922 | 172 | msgstr "" | ||
923 | 173 | |||
924 | 174 | #. module: pallet_delivery | ||
925 | 175 | #: view:stock.truck:0 | ||
926 | 176 | msgid "Left Pallets" | ||
927 | 177 | msgstr "" | ||
928 | 178 | |||
929 | 179 | #. module: pallet_delivery | ||
930 | 180 | #: model:ir.actions.act_window,help:pallet_delivery.purchase_order_hidden | ||
931 | 181 | msgid "<p class=\"oe_view_nocontent_create\">\n" | ||
932 | 182 | " Click to create a quotation that will be converted into a purchase order. \n" | ||
933 | 183 | " </p><p>\n" | ||
934 | 184 | " Use this menu to search within your purchase orders by\n" | ||
935 | 185 | " references, supplier, products, etc. For each purchase order,\n" | ||
936 | 186 | " you can track the related discussion with the supplier, control\n" | ||
937 | 187 | " the products received and control the supplier invoices.\n" | ||
938 | 188 | " </p>\n" | ||
939 | 189 | " " | ||
940 | 190 | msgstr "" | ||
941 | 191 | |||
942 | 192 | #. module: pallet_delivery | ||
943 | 193 | #: model:ir.actions.act_window,name:pallet_delivery.action_truck_pending | ||
944 | 194 | msgid "On Draft Truck" | ||
945 | 195 | msgstr "" | ||
946 | 196 | |||
947 | 197 | #. module: pallet_delivery | ||
948 | 198 | #: code:addons/pallet_delivery/stock.py:294 | ||
949 | 199 | #, python-format | ||
950 | 200 | msgid "Please enter real numbers." | ||
951 | 201 | msgstr "" | ||
952 | 202 | |||
953 | 203 | #. module: pallet_delivery | ||
954 | 204 | #: model:ir.model,name:pallet_delivery.model_stock_move | ||
955 | 205 | msgid "Stock Move" | ||
956 | 206 | msgstr "" | ||
957 | 207 | |||
958 | 208 | #. module: pallet_delivery | ||
959 | 209 | #: model:ir.ui.menu,name:pallet_delivery.menu_truck_purchase | ||
960 | 210 | #: model:ir.ui.menu,name:pallet_delivery.menu_truck_stock | ||
961 | 211 | msgid "Incoming Truck" | ||
962 | 212 | msgstr "" | ||
963 | 213 | |||
964 | 214 | #. module: pallet_delivery | ||
965 | 215 | #: selection:stock.truck,state:0 | ||
966 | 216 | msgid "Done" | ||
967 | 217 | msgstr "" | ||
968 | 218 | |||
969 | 219 | #. module: pallet_delivery | ||
970 | 220 | #: model:ir.actions.act_window,name:pallet_delivery.purchase_order_hidden | ||
971 | 221 | #: view:stock.truck:0 | ||
972 | 222 | #: field:stock.truck,purchase_order_ids:0 | ||
973 | 223 | msgid "Purchase Orders" | ||
974 | 224 | msgstr "" | ||
975 | 225 | |||
976 | 0 | 226 | ||
977 | === added file 'pallet_delivery/pallet_delivery_data.xml' | |||
978 | --- pallet_delivery/pallet_delivery_data.xml 1970-01-01 00:00:00 +0000 | |||
979 | +++ pallet_delivery/pallet_delivery_data.xml 2014-08-27 19:22:25 +0000 | |||
980 | @@ -0,0 +1,35 @@ | |||
981 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
982 | 2 | <openerp> | ||
983 | 3 | <data noupdate="1"> | ||
984 | 4 | <record id="pallet_delivery_external_po" model="purchase.order"> | ||
985 | 5 | <field name="partner_id">1</field> | ||
986 | 6 | <field name="location_id">8</field> | ||
987 | 7 | <field name="state">cancel</field> | ||
988 | 8 | <field name="pricelist_id" ref="purchase.list0"/> | ||
989 | 9 | <field name="hidden">1</field> | ||
990 | 10 | </record> | ||
991 | 11 | |||
992 | 12 | <record id="pallet_delivery_external_line" model="purchase.order.line"> | ||
993 | 13 | <field name="product_uom">1</field> | ||
994 | 14 | <field name="order_id" ref="pallet_delivery_external_po" /> | ||
995 | 15 | <field name="price_unit">1</field> | ||
996 | 16 | <field name="name">Not ours</field> | ||
997 | 17 | <field name="date_planned">2013-01-01</field> | ||
998 | 18 | <field name="state">confirmed</field> | ||
999 | 19 | <field name="nb_pallets">1</field> | ||
1000 | 20 | <field name="nb_crates_per_pallet">1</field> | ||
1001 | 21 | </record> | ||
1002 | 22 | |||
1003 | 23 | <record id="seq_type_stock_truck" model="ir.sequence.type"> | ||
1004 | 24 | <field name="name">Truck</field> | ||
1005 | 25 | <field name="code">stock.truck</field> | ||
1006 | 26 | </record> | ||
1007 | 27 | |||
1008 | 28 | <record id="seq_stock_truck" model="ir.sequence"> | ||
1009 | 29 | <field name="name">Truck</field> | ||
1010 | 30 | <field name="code">stock.truck</field> | ||
1011 | 31 | <field name="prefix">TRK</field> | ||
1012 | 32 | <field name="padding">5</field> | ||
1013 | 33 | </record> | ||
1014 | 34 | </data> | ||
1015 | 35 | </openerp> | ||
1016 | 0 | 36 | ||
1017 | === added file 'pallet_delivery/pallet_delivery_view.xml' | |||
1018 | --- pallet_delivery/pallet_delivery_view.xml 1970-01-01 00:00:00 +0000 | |||
1019 | +++ pallet_delivery/pallet_delivery_view.xml 2014-08-27 19:22:25 +0000 | |||
1020 | @@ -0,0 +1,160 @@ | |||
1021 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
1022 | 2 | <openerp> | ||
1023 | 3 | <data> | ||
1024 | 4 | <!-- Purchase Order --> | ||
1025 | 5 | <record id="purchase_order_hidden" model="ir.actions.act_window"> | ||
1026 | 6 | <field name="name">Purchase Orders</field> | ||
1027 | 7 | <field name="type">ir.actions.act_window</field> | ||
1028 | 8 | <field name="res_model">purchase.order</field> | ||
1029 | 9 | <field name="view_mode">tree,form,graph,calendar</field> | ||
1030 | 10 | <field name="context">{}</field> | ||
1031 | 11 | <field name="domain">['&', ('state','not in',('draft','sent','confirmed')), ('hidden', '!=', True)]</field> | ||
1032 | 12 | <field name="search_view_id" ref="purchase.view_purchase_order_filter"/> | ||
1033 | 13 | <field name="help" type="html"> | ||
1034 | 14 | <p class="oe_view_nocontent_create"> | ||
1035 | 15 | Click to create a quotation that will be converted into a purchase order. | ||
1036 | 16 | </p><p> | ||
1037 | 17 | Use this menu to search within your purchase orders by | ||
1038 | 18 | references, supplier, products, etc. For each purchase order, | ||
1039 | 19 | you can track the related discussion with the supplier, control | ||
1040 | 20 | the products received and control the supplier invoices. | ||
1041 | 21 | </p> | ||
1042 | 22 | </field> | ||
1043 | 23 | </record> | ||
1044 | 24 | |||
1045 | 25 | <menuitem | ||
1046 | 26 | id="purchase.menu_purchase_form_action" | ||
1047 | 27 | action="purchase_order_hidden" | ||
1048 | 28 | parent="purchase.menu_procurement_management" | ||
1049 | 29 | sequence="6" /> | ||
1050 | 30 | |||
1051 | 31 | <!-- Truck --> | ||
1052 | 32 | <record id="truck_tree" model="ir.ui.view"> | ||
1053 | 33 | <field name="name">stock.truck.tree</field> | ||
1054 | 34 | <field name="model">stock.truck</field> | ||
1055 | 35 | <field name="arch" type="xml"> | ||
1056 | 36 | <tree string="Truck"> | ||
1057 | 37 | <field name="name" /> | ||
1058 | 38 | <field name="truck_sn" /> | ||
1059 | 39 | <field name="supplier" /> | ||
1060 | 40 | <field name="arrival" /> | ||
1061 | 41 | </tree> | ||
1062 | 42 | </field> | ||
1063 | 43 | </record> | ||
1064 | 44 | |||
1065 | 45 | <record id="truck_form" model="ir.ui.view"> | ||
1066 | 46 | <field name="name">stock.truck.form</field> | ||
1067 | 47 | <field name="model">stock.truck</field> | ||
1068 | 48 | <field eval="1" name="priority" /> | ||
1069 | 49 | <field name="arch" type="xml"> | ||
1070 | 50 | <form string="Truck" version="7.0"> | ||
1071 | 51 | <header> | ||
1072 | 52 | <button | ||
1073 | 53 | name="action_done" | ||
1074 | 54 | type="object" | ||
1075 | 55 | states="draft" | ||
1076 | 56 | string="Confirm" | ||
1077 | 57 | class="oe_highlight" /> | ||
1078 | 58 | |||
1079 | 59 | <field | ||
1080 | 60 | name="state" | ||
1081 | 61 | widget="statusbar" | ||
1082 | 62 | statusbar_visible="draft,done" | ||
1083 | 63 | statusbar_colors='{"draft":"blue","done":"blue"}' /> | ||
1084 | 64 | </header> | ||
1085 | 65 | |||
1086 | 66 | <sheet> | ||
1087 | 67 | <group> | ||
1088 | 68 | <group name="pedigree" string="Details" colspan="4" col="4"> | ||
1089 | 69 | <group> | ||
1090 | 70 | <field name="truck_sn" /> | ||
1091 | 71 | <field name="supplier" /> | ||
1092 | 72 | <field name="arrival" on_change="onchange_arrival(arrival)" /> | ||
1093 | 73 | </group> | ||
1094 | 74 | |||
1095 | 75 | <group> | ||
1096 | 76 | <field name="front_temperature" on_change="validate_temperature(front_temperature, 'front_temperature')" /> | ||
1097 | 77 | <field name="back_temperature" on_change="validate_temperature(back_temperature, 'back_temperature')" /> | ||
1098 | 78 | </group> | ||
1099 | 79 | </group> | ||
1100 | 80 | |||
1101 | 81 | <group name="purchase_orders" string="Purchase Orders" colspan="4"> | ||
1102 | 82 | <field name="purchase_order_ids" nolabel="1" domain="[('state', 'not in', ['draft', 'done']), ('assigned', '=', True)]"> | ||
1103 | 83 | <tree> | ||
1104 | 84 | <field name="name" /> | ||
1105 | 85 | </tree> | ||
1106 | 86 | </field> | ||
1107 | 87 | </group> | ||
1108 | 88 | |||
1109 | 89 | <group name="pallets" string="Truck Composition" colspan="4"> | ||
1110 | 90 | <group> | ||
1111 | 91 | <field name="left_pallet_ids" nolabel="1"> | ||
1112 | 92 | <tree editable="bottom"> | ||
1113 | 93 | <field name="pallet" string="Left Pallets" context="{'nice':'nice','parent':parent}" /> | ||
1114 | 94 | <field name="crates" string="Crates" /> | ||
1115 | 95 | </tree> | ||
1116 | 96 | </field> | ||
1117 | 97 | </group> | ||
1118 | 98 | |||
1119 | 99 | <group> | ||
1120 | 100 | <field name="right_pallet_ids" nolabel="1"> | ||
1121 | 101 | <tree editable="bottom"> | ||
1122 | 102 | <field name="pallet" string="Right Pallets" context="{'nice':'nice','parent':parent}" /> | ||
1123 | 103 | <field name="crates" string="Crates" /> | ||
1124 | 104 | </tree> | ||
1125 | 105 | </field> | ||
1126 | 106 | </group> | ||
1127 | 107 | </group> | ||
1128 | 108 | </group> | ||
1129 | 109 | </sheet> | ||
1130 | 110 | </form> | ||
1131 | 111 | </field> | ||
1132 | 112 | </record> | ||
1133 | 113 | |||
1134 | 114 | <record id="view_truck_filter" model="ir.ui.view"> | ||
1135 | 115 | <field name="name">stock.truck.select</field> | ||
1136 | 116 | <field name="model">stock.truck</field> | ||
1137 | 117 | <field name="arch" type="xml"> | ||
1138 | 118 | <search string="Search Truck"> | ||
1139 | 119 | <field name="truck_sn" string="Serial Number" filter_domain="[('truck_sn', '=', self)]" /> | ||
1140 | 120 | </search> | ||
1141 | 121 | </field> | ||
1142 | 122 | </record> | ||
1143 | 123 | |||
1144 | 124 | <!-- Menu --> | ||
1145 | 125 | <record id="action_truck_pending" model="ir.actions.act_window"> | ||
1146 | 126 | <field name="name">On Draft Truck</field> | ||
1147 | 127 | <field name="res_model">stock.truck</field> | ||
1148 | 128 | <field name="view_type">form</field> | ||
1149 | 129 | <field name="view_mode">tree,form</field> | ||
1150 | 130 | <field eval="False" name="view_id" /> | ||
1151 | 131 | <field name="search_view_id" ref="pallet_delivery.view_truck_filter" /> | ||
1152 | 132 | <field name="help" type="html"> | ||
1153 | 133 | <p class="oe_view_nocontent_create">Click to create a draft truck</p> | ||
1154 | 134 | |||
1155 | 135 | <p>The truck contains an incoming, physical shipment. With it you can | ||
1156 | 136 | register the truck's details, such as its serial number, sampled | ||
1157 | 137 | temperatures, and other information. Also, the truck serves you as a | ||
1158 | 138 | map of what your company received.</p> | ||
1159 | 139 | |||
1160 | 140 | <p>When you confirm the truck, it will act as an “Incoming Shipment” | ||
1161 | 141 | confirmation, and the products will be moved from your Suppliers (as | ||
1162 | 142 | listed in Purchase Orders) to your Stock.</p> | ||
1163 | 143 | </field> | ||
1164 | 144 | </record> | ||
1165 | 145 | |||
1166 | 146 | <menuitem | ||
1167 | 147 | name="Incoming Truck" | ||
1168 | 148 | id="menu_truck_purchase" | ||
1169 | 149 | action="action_truck_pending" | ||
1170 | 150 | parent="purchase.menu_procurement_management_inventory" | ||
1171 | 151 | sequence="8" /> | ||
1172 | 152 | |||
1173 | 153 | <menuitem | ||
1174 | 154 | name="Incoming Truck" | ||
1175 | 155 | id="menu_truck_stock" | ||
1176 | 156 | action="action_truck_pending" | ||
1177 | 157 | parent="stock.menu_stock_warehouse_mgmt" | ||
1178 | 158 | sequence="0" /> | ||
1179 | 159 | </data> | ||
1180 | 160 | </openerp> | ||
1181 | 0 | 161 | ||
1182 | === added directory 'pallet_delivery/security' | |||
1183 | === added file 'pallet_delivery/security/ir.model.access.csv' | |||
1184 | --- pallet_delivery/security/ir.model.access.csv 1970-01-01 00:00:00 +0000 | |||
1185 | +++ pallet_delivery/security/ir.model.access.csv 2014-08-27 19:22:25 +0000 | |||
1186 | @@ -0,0 +1,5 @@ | |||
1187 | 1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
1188 | 2 | access_stock_truck_stock,stock.truck all,model_stock_truck,stock.group_stock_user,1,1,1,1 | ||
1189 | 3 | access_stock_truck_purchase,stock.truck all,model_stock_truck,purchase.group_purchase_user,1,1,1,1 | ||
1190 | 4 | access_stock_truck_line_stock,stock.truck.line all,model_stock_truck_line,stock.group_stock_user,1,1,1,1 | ||
1191 | 5 | access_stock_truck_line_purchase,stock.truck.line all,model_stock_truck_line,purchase.group_purchase_user,1,1,1,1 | ||
1192 | 0 | 6 | ||
1193 | === added file 'pallet_delivery/stock.py' | |||
1194 | --- pallet_delivery/stock.py 1970-01-01 00:00:00 +0000 | |||
1195 | +++ pallet_delivery/stock.py 2014-08-27 19:22:25 +0000 | |||
1196 | @@ -0,0 +1,310 @@ | |||
1197 | 1 | # -*- coding: utf-8 -*- | ||
1198 | 2 | ############################################################################## | ||
1199 | 3 | # | ||
1200 | 4 | # OpenERP, Open Source Management Solution | ||
1201 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
1202 | 6 | # | ||
1203 | 7 | # This program is free software: you can redistribute it and/or modify | ||
1204 | 8 | # it under the terms of the GNU Affero General Public License as | ||
1205 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
1206 | 10 | # License, or (at your option) any later version. | ||
1207 | 11 | # | ||
1208 | 12 | # This program is distributed in the hope that it will be useful, | ||
1209 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1210 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1211 | 15 | # GNU Affero General Public License for more details. | ||
1212 | 16 | # | ||
1213 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
1214 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1215 | 19 | # | ||
1216 | 20 | ############################################################################## | ||
1217 | 21 | |||
1218 | 22 | from collections import defaultdict | ||
1219 | 23 | from openerp.tools.translate import _ | ||
1220 | 24 | from openerp.osv import orm, fields | ||
1221 | 25 | |||
1222 | 26 | def group(lst): | ||
1223 | 27 | """Saner group function than the one found in itertools | ||
1224 | 28 | |||
1225 | 29 | This one mimics Haskell's group from Data.List: | ||
1226 | 30 | group :: Eq a => [a] -> [[a]] | ||
1227 | 31 | """ | ||
1228 | 32 | |||
1229 | 33 | if not lst: | ||
1230 | 34 | return [] | ||
1231 | 35 | |||
1232 | 36 | res = [] | ||
1233 | 37 | current = lst[0] | ||
1234 | 38 | |||
1235 | 39 | grp = [] | ||
1236 | 40 | for x in lst: | ||
1237 | 41 | if x != current: | ||
1238 | 42 | res.append(grp) | ||
1239 | 43 | grp = [] | ||
1240 | 44 | grp.append(x) | ||
1241 | 45 | current = x | ||
1242 | 46 | |||
1243 | 47 | if grp: | ||
1244 | 48 | res.append(grp) | ||
1245 | 49 | |||
1246 | 50 | return res | ||
1247 | 51 | |||
1248 | 52 | |||
1249 | 53 | class stock_move(orm.Model): | ||
1250 | 54 | |||
1251 | 55 | _inherit = 'stock.move' | ||
1252 | 56 | |||
1253 | 57 | def _find_hidden(self, cr, uid, ids, context=None): | ||
1254 | 58 | po_pool = self.pool.get("purchase.order") | ||
1255 | 59 | hidden_id = po_pool.search(cr, uid, [('hidden', '=', True)], context=context)[0] | ||
1256 | 60 | return po_pool.browse(cr, uid, hidden_id, context) | ||
1257 | 61 | |||
1258 | 62 | @staticmethod | ||
1259 | 63 | def _unique_line(seq): | ||
1260 | 64 | seen = set() | ||
1261 | 65 | seen_add = seen.add | ||
1262 | 66 | return [ x for x in seq if x not in seen and not seen_add(x)] | ||
1263 | 67 | |||
1264 | 68 | @staticmethod | ||
1265 | 69 | def _get_line_name(line, crates=None, force_total_qty=False): | ||
1266 | 70 | available = None | ||
1267 | 71 | nice = '%s' % line.product_id.name | ||
1268 | 72 | incoming_crates = line.product_qty | ||
1269 | 73 | if crates: | ||
1270 | 74 | # Incoming crates | ||
1271 | 75 | available = max(0, incoming_crates - crates[line.id]) | ||
1272 | 76 | elif force_total_qty: | ||
1273 | 77 | available = incoming_crates | ||
1274 | 78 | |||
1275 | 79 | nice += " / %s" % line.prodlot_id.name | ||
1276 | 80 | |||
1277 | 81 | if available is not None: | ||
1278 | 82 | nice += " (%d)" % available | ||
1279 | 83 | |||
1280 | 84 | return nice, available | ||
1281 | 85 | |||
1282 | 86 | def name_get(self, cr, uid, ids, context=None): | ||
1283 | 87 | if context is None: | ||
1284 | 88 | context = {} | ||
1285 | 89 | |||
1286 | 90 | if isinstance(ids, (int, long)): | ||
1287 | 91 | ids = [ids] | ||
1288 | 92 | |||
1289 | 93 | stl_pool = self.pool.get('stock.truck.line') | ||
1290 | 94 | spi_pool = self.pool.get('stock.picking.in') | ||
1291 | 95 | # Out from selection; display name | ||
1292 | 96 | |||
1293 | 97 | #hidden = self._find_hidden(cr, uid, ids, context=context) | ||
1294 | 98 | res = [] | ||
1295 | 99 | if not context.has_key('nice'): | ||
1296 | 100 | for line in self.browse(cr, uid, ids, context=context): | ||
1297 | 101 | name, available = self._get_line_name(line) | ||
1298 | 102 | res.append((line.id, name)) | ||
1299 | 103 | |||
1300 | 104 | # Add special 'not ours' line | ||
1301 | 105 | #res.append((hidden.id, hidden.name)) | ||
1302 | 106 | return res | ||
1303 | 107 | |||
1304 | 108 | # Doing a selection | ||
1305 | 109 | # Add special 'not ours' line | ||
1306 | 110 | #res.append((hidden.id, hidden.name)) | ||
1307 | 111 | |||
1308 | 112 | # Retrieve entered form data | ||
1309 | 113 | parent = context['parent'] | ||
1310 | 114 | all_pallets = parent['left_pallet_ids'] + parent['right_pallet_ids'] | ||
1311 | 115 | po_ids = parent['purchase_order_ids'][0][2] | ||
1312 | 116 | |||
1313 | 117 | # find list of stock picking in | ||
1314 | 118 | spi_ids = spi_pool.search(cr, uid, [('purchase_id', '=', po_ids)], | ||
1315 | 119 | context=context) | ||
1316 | 120 | |||
1317 | 121 | # Build crate structure | ||
1318 | 122 | crates = defaultdict(lambda: 0) | ||
1319 | 123 | for pallet_struct in all_pallets: | ||
1320 | 124 | if pallet_struct[0] == 4: | ||
1321 | 125 | st_line = stl_pool.browse(cr, uid, pallet_struct[1], | ||
1322 | 126 | context=context) | ||
1323 | 127 | crates[st_line.pallet.id] += st_line.crates | ||
1324 | 128 | else: | ||
1325 | 129 | fields = pallet_struct[2] | ||
1326 | 130 | if fields and 'pallet' in fields: | ||
1327 | 131 | crates[fields['pallet']] += fields['crates'] | ||
1328 | 132 | |||
1329 | 133 | spi_lines = spi_pool.browse(cr, uid, spi_ids, context=context) | ||
1330 | 134 | all_lines = [line for lines in spi_lines for line in lines.move_lines | ||
1331 | 135 | if line.state == "assigned"] | ||
1332 | 136 | move_line = self._unique_line(all_lines) | ||
1333 | 137 | |||
1334 | 138 | # Prettify data to be displayed | ||
1335 | 139 | for line in move_line: | ||
1336 | 140 | force_total_qty = not crates | ||
1337 | 141 | name, available = self._get_line_name(line, crates=crates, | ||
1338 | 142 | force_total_qty=force_total_qty) | ||
1339 | 143 | if available: | ||
1340 | 144 | res.append((line.id, name)) | ||
1341 | 145 | |||
1342 | 146 | return res | ||
1343 | 147 | |||
1344 | 148 | |||
1345 | 149 | class purchase_order(orm.Model): | ||
1346 | 150 | |||
1347 | 151 | _inherit = 'purchase.order' | ||
1348 | 152 | |||
1349 | 153 | def _assigned(self, cr, uid, obj, name, args, context=None): | ||
1350 | 154 | '''Domain filter on corresponding entries in stock.picking where state is assigned''' | ||
1351 | 155 | |||
1352 | 156 | if context is None: | ||
1353 | 157 | context = {} | ||
1354 | 158 | |||
1355 | 159 | picking_pool = self.pool.get('stock.picking') | ||
1356 | 160 | ids = picking_pool.search(cr, uid, [('state', '=', 'assigned')], context=context) | ||
1357 | 161 | po_ids = [po.purchase_id.id for po in picking_pool.browse(cr, uid, ids, context=context)] | ||
1358 | 162 | |||
1359 | 163 | return [('id', 'in', po_ids)] | ||
1360 | 164 | |||
1361 | 165 | _columns = { | ||
1362 | 166 | 'hidden': fields.boolean('Hidden'), | ||
1363 | 167 | 'stock_truck_ids': fields.many2many( | ||
1364 | 168 | 'stock.truck', 'truck_order_rel', 'order_id', 'truck_id', 'Trucks'), | ||
1365 | 169 | 'assigned': fields.function(lambda **x: True, fnct_search=_assigned, type='boolean', method=True), | ||
1366 | 170 | } | ||
1367 | 171 | |||
1368 | 172 | |||
1369 | 173 | class stock_truck_line(orm.Model): | ||
1370 | 174 | |||
1371 | 175 | _name = 'stock.truck.line' | ||
1372 | 176 | _description = 'A single pallet shipped in an incoming truck' | ||
1373 | 177 | |||
1374 | 178 | _columns = { | ||
1375 | 179 | 'name': fields.char('Name', size=64), | ||
1376 | 180 | 'left_id': fields.many2one('stock.truck', 'Truck'), | ||
1377 | 181 | 'right_id': fields.many2one('stock.truck', 'Truck'), | ||
1378 | 182 | 'pallet': fields.many2one('stock.move', 'Pallet', required=True), | ||
1379 | 183 | 'crates': fields.integer('Crates', required=True), | ||
1380 | 184 | } | ||
1381 | 185 | |||
1382 | 186 | |||
1383 | 187 | class stock_truck(orm.Model): | ||
1384 | 188 | |||
1385 | 189 | _name = 'stock.truck' | ||
1386 | 190 | _description = 'Incoming truck' | ||
1387 | 191 | |||
1388 | 192 | def onchange_arrival(self, cr, uid, ids, arrival, context=None): | ||
1389 | 193 | '''Force seconds to zero''' | ||
1390 | 194 | |||
1391 | 195 | arrival = arrival[:-2] + '00' | ||
1392 | 196 | |||
1393 | 197 | return {'value': {'arrival': arrival}} | ||
1394 | 198 | |||
1395 | 199 | def action_done(self, cr, uid, ids, context=None): | ||
1396 | 200 | if context is None: | ||
1397 | 201 | context = {} | ||
1398 | 202 | |||
1399 | 203 | truck = self.browse(cr, uid, ids, context=context)[0] | ||
1400 | 204 | |||
1401 | 205 | # Build a dictionary of: | ||
1402 | 206 | # - key: Purchase Order | ||
1403 | 207 | # - value: a dictionary of: | ||
1404 | 208 | # - key: Lot Number | ||
1405 | 209 | # - value: tuple of | ||
1406 | 210 | # - Purchase Order Line | ||
1407 | 211 | # - Crate count | ||
1408 | 212 | products = defaultdict(dict) | ||
1409 | 213 | |||
1410 | 214 | def _process_pallets(column): | ||
1411 | 215 | for line in column: | ||
1412 | 216 | pallet = line.pallet | ||
1413 | 217 | pi = pallet.picking_id | ||
1414 | 218 | po = pallet.purchase_line_id.order_id | ||
1415 | 219 | lot = pallet.prodlot_id if pallet.prodlot_id else None | ||
1416 | 220 | # Skip over fake 'not ours' line | ||
1417 | 221 | if po and po.hidden: | ||
1418 | 222 | continue | ||
1419 | 223 | |||
1420 | 224 | if not products[pi.id].has_key(lot): | ||
1421 | 225 | products[pi.id][lot] = (pallet, 0) | ||
1422 | 226 | |||
1423 | 227 | lot_product = products[pi.id][lot] | ||
1424 | 228 | count = lot_product[1] | ||
1425 | 229 | products[pi.id][lot] = (lot_product[0], count + line.crates) | ||
1426 | 230 | |||
1427 | 231 | _process_pallets(truck.left_pallet_ids) | ||
1428 | 232 | _process_pallets(truck.right_pallet_ids) | ||
1429 | 233 | |||
1430 | 234 | # Make the calls to the Pickings stock moves | ||
1431 | 235 | |||
1432 | 236 | picking_pool = self.pool.get('stock.picking') | ||
1433 | 237 | |||
1434 | 238 | for po in truck.purchase_order_ids: | ||
1435 | 239 | pi = None | ||
1436 | 240 | pi_ids = picking_pool.search( | ||
1437 | 241 | cr, uid, | ||
1438 | 242 | ['&', ('purchase_id', '=', po.id), ('state', '=', 'assigned')], | ||
1439 | 243 | context=context) | ||
1440 | 244 | if pi_ids: | ||
1441 | 245 | # take the last one | ||
1442 | 246 | pi = pi_ids[-1] | ||
1443 | 247 | |||
1444 | 248 | if not pi or not products.has_key(pi): | ||
1445 | 249 | # Purchase Order was added to the list, but there are not | ||
1446 | 250 | # pallets pertaining to that PO. | ||
1447 | 251 | continue | ||
1448 | 252 | |||
1449 | 253 | partial_data = {'delivery_date': truck.arrival} | ||
1450 | 254 | |||
1451 | 255 | |||
1452 | 256 | for move_line, count in products[pi].values(): | ||
1453 | 257 | # Skip over the fake 'not ours' line | ||
1454 | 258 | po_line = move_line.purchase_line_id | ||
1455 | 259 | if po_line and po_line.order_id.hidden: | ||
1456 | 260 | continue | ||
1457 | 261 | |||
1458 | 262 | partial_data['move%s' % (move_line.id, )] = { | ||
1459 | 263 | 'product_id': move_line.product_id.id, | ||
1460 | 264 | 'product_qty': count, | ||
1461 | 265 | 'product_uom': 1, | ||
1462 | 266 | 'prodlot_id': move_line.prodlot_id.id, | ||
1463 | 267 | } | ||
1464 | 268 | |||
1465 | 269 | picking_pool.do_partial(cr, uid, [pi], partial_data, context=context) | ||
1466 | 270 | |||
1467 | 271 | self.write(cr, uid, ids, {'state': 'done'}) | ||
1468 | 272 | |||
1469 | 273 | return True | ||
1470 | 274 | |||
1471 | 275 | @staticmethod | ||
1472 | 276 | def validate_temperature(cr, uid, ids, temperature, field_name, | ||
1473 | 277 | context=None): | ||
1474 | 278 | try: | ||
1475 | 279 | float(temperature) | ||
1476 | 280 | except ValueError: | ||
1477 | 281 | warning = {'title': _('Input Error !'), | ||
1478 | 282 | 'message': _('Please enter real numbers.')} | ||
1479 | 283 | return {'value': {field_name: ""}, 'warning': warning} | ||
1480 | 284 | return True | ||
1481 | 285 | |||
1482 | 286 | _columns = { | ||
1483 | 287 | # Overhead | ||
1484 | 288 | 'name': fields.char('Name', size=64), | ||
1485 | 289 | 'state': fields.selection([ | ||
1486 | 290 | ('draft', 'Draft'), | ||
1487 | 291 | ('done', 'Done'), | ||
1488 | 292 | ], 'State', readonly=True, select=True, track_visibility='onchange'), | ||
1489 | 293 | |||
1490 | 294 | # Display | ||
1491 | 295 | 'front_temperature': fields.char('Front Temperature', required=True), | ||
1492 | 296 | 'back_temperature': fields.char('Back Temperature', required=True), | ||
1493 | 297 | 'truck_sn': fields.char('Truck S/N', size=64), | ||
1494 | 298 | 'supplier': fields.many2one('res.partner', 'Supplier', required=True), | ||
1495 | 299 | 'arrival': fields.datetime('Date of Arrival', required=True), | ||
1496 | 300 | 'purchase_order_ids': fields.many2many( | ||
1497 | 301 | 'purchase.order', 'truck_order_rel', 'truck_id', 'order_id', 'Purchase Orders'), | ||
1498 | 302 | 'left_pallet_ids': fields.one2many('stock.truck.line', 'left_id', 'Pallets'), | ||
1499 | 303 | 'right_pallet_ids': fields.one2many('stock.truck.line', 'right_id', 'Pallets'), | ||
1500 | 304 | } | ||
1501 | 305 | |||
1502 | 306 | _defaults = { | ||
1503 | 307 | 'name': lambda self, cr, uid, ctx={}: self.pool.get('ir.sequence').get(cr, uid, 'stock.truck'), | ||
1504 | 308 | 'state': 'draft', | ||
1505 | 309 | 'front_temperature': None, | ||
1506 | 310 | } | ||
1507 | 0 | 311 | ||
1508 | === added file 'pallet_delivery/stock_workflow.xml' | |||
1509 | --- pallet_delivery/stock_workflow.xml 1970-01-01 00:00:00 +0000 | |||
1510 | +++ pallet_delivery/stock_workflow.xml 2014-08-27 19:22:25 +0000 | |||
1511 | @@ -0,0 +1,30 @@ | |||
1512 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
1513 | 2 | <openerp> | ||
1514 | 3 | <data> | ||
1515 | 4 | <record id="wkf_stock_truck" model="workflow"> | ||
1516 | 5 | <field name="name">stock.truck</field> | ||
1517 | 6 | <field name="osv">stock.truck</field> | ||
1518 | 7 | <field name="on_create">True</field> | ||
1519 | 8 | </record> | ||
1520 | 9 | |||
1521 | 10 | <record id="act_draft" model="workflow.activity"> | ||
1522 | 11 | <field name="wkf_id" ref="wkf_stock_truck" /> | ||
1523 | 12 | <field name="name">draft</field> | ||
1524 | 13 | <field name="flow_start">True</field> | ||
1525 | 14 | </record> | ||
1526 | 15 | |||
1527 | 16 | <record id="act_done" model="workflow.activity"> | ||
1528 | 17 | <field name="wkf_id" ref="wkf_stock_truck" /> | ||
1529 | 18 | <field name="name">done</field> | ||
1530 | 19 | <field name="flow_stop">True</field> | ||
1531 | 20 | <field name="kind">function</field> | ||
1532 | 21 | <field name="action">action_done()</field> | ||
1533 | 22 | </record> | ||
1534 | 23 | |||
1535 | 24 | <record id="trans_draft_done" model="workflow.transition"> | ||
1536 | 25 | <field name="act_from" ref="act_draft" /> | ||
1537 | 26 | <field name="act_to" ref="act_done" /> | ||
1538 | 27 | <field name="signal">button_done</field> | ||
1539 | 28 | </record> | ||
1540 | 29 | </data> | ||
1541 | 30 | </openerp> | ||
1542 | 0 | 31 | ||
1543 | === added directory 'partner_discount' | |||
1544 | === added file 'partner_discount/__init__.py' | |||
1545 | --- partner_discount/__init__.py 1970-01-01 00:00:00 +0000 | |||
1546 | +++ partner_discount/__init__.py 2014-08-27 19:22:25 +0000 | |||
1547 | @@ -0,0 +1,25 @@ | |||
1548 | 1 | # -*- encoding: utf-8 -*- | ||
1549 | 2 | ############################################################################### | ||
1550 | 3 | # | ||
1551 | 4 | # OpenERP, Open Source Management Solution | ||
1552 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
1553 | 6 | # (<http://www.savoirfairelinux.com>). | ||
1554 | 7 | # | ||
1555 | 8 | # This program is free software: you can redistribute it and/or modify | ||
1556 | 9 | # it under the terms of the GNU Affero General Public License as | ||
1557 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
1558 | 11 | # License, or (at your option) any later version. | ||
1559 | 12 | # | ||
1560 | 13 | # This program is distributed in the hope that it will be useful, | ||
1561 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1562 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1563 | 16 | # GNU Affero General Public License for more details. | ||
1564 | 17 | # | ||
1565 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
1566 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1567 | 20 | # | ||
1568 | 21 | ############################################################################### | ||
1569 | 22 | |||
1570 | 23 | import res_partner | ||
1571 | 24 | |||
1572 | 25 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1573 | 0 | 26 | ||
1574 | === added file 'partner_discount/__openerp__.py' | |||
1575 | --- partner_discount/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
1576 | +++ partner_discount/__openerp__.py 2014-08-27 19:22:25 +0000 | |||
1577 | @@ -0,0 +1,41 @@ | |||
1578 | 1 | # -*- encoding: utf-8 -*- | ||
1579 | 2 | ############################################################################### | ||
1580 | 3 | # | ||
1581 | 4 | # OpenERP, Open Source Management Solution | ||
1582 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
1583 | 6 | # (<http://www.savoirfairelinux.com>). | ||
1584 | 7 | # | ||
1585 | 8 | # This program is free software: you can redistribute it and/or modify | ||
1586 | 9 | # it under the terms of the GNU Affero General Public License as | ||
1587 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
1588 | 11 | # License, or (at your option) any later version. | ||
1589 | 12 | # | ||
1590 | 13 | # This program is distributed in the hope that it will be useful, | ||
1591 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1592 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1593 | 16 | # GNU Affero General Public License for more details. | ||
1594 | 17 | # | ||
1595 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
1596 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1597 | 20 | # | ||
1598 | 21 | ############################################################################### | ||
1599 | 22 | |||
1600 | 23 | { | ||
1601 | 24 | 'name': 'Partner Discount', | ||
1602 | 25 | 'version': '1.0', | ||
1603 | 26 | 'author': 'Savoir-faire Linux', | ||
1604 | 27 | 'maintainer': 'Savoir-faire Linux', | ||
1605 | 28 | 'website': 'http://www.savoirfairelinux.com', | ||
1606 | 29 | 'category': 'sale', | ||
1607 | 30 | 'description': """\ | ||
1608 | 31 | Adds a discount percentage to the partner form. | ||
1609 | 32 | """, | ||
1610 | 33 | 'depends': [], | ||
1611 | 34 | 'data': ['res_partner_view.xml'], | ||
1612 | 35 | 'demo': [], | ||
1613 | 36 | 'test': [], | ||
1614 | 37 | 'installable': True, | ||
1615 | 38 | 'active': False, | ||
1616 | 39 | } | ||
1617 | 40 | |||
1618 | 41 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1619 | 0 | 42 | ||
1620 | === added directory 'partner_discount/i18n' | |||
1621 | === added file 'partner_discount/i18n/fr.po' | |||
1622 | --- partner_discount/i18n/fr.po 1970-01-01 00:00:00 +0000 | |||
1623 | +++ partner_discount/i18n/fr.po 2014-08-27 19:22:25 +0000 | |||
1624 | @@ -0,0 +1,36 @@ | |||
1625 | 1 | # Translation of OpenERP Server. | ||
1626 | 2 | # This file contains the translation of the following modules: | ||
1627 | 3 | # * partner_discount | ||
1628 | 4 | # | ||
1629 | 5 | msgid "" | ||
1630 | 6 | msgstr "" | ||
1631 | 7 | "Project-Id-Version: OpenERP Server 7.0\n" | ||
1632 | 8 | "Report-Msgid-Bugs-To: \n" | ||
1633 | 9 | "POT-Creation-Date: 2013-11-01 15:41+0000\n" | ||
1634 | 10 | "PO-Revision-Date: 2013-11-01 15:41+0000\n" | ||
1635 | 11 | "Last-Translator: <>\n" | ||
1636 | 12 | "Language-Team: \n" | ||
1637 | 13 | "MIME-Version: 1.0\n" | ||
1638 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
1639 | 15 | "Content-Transfer-Encoding: \n" | ||
1640 | 16 | "Plural-Forms: \n" | ||
1641 | 17 | |||
1642 | 18 | #. module: partner_discount | ||
1643 | 19 | #: field:res.partner,discount:0 | ||
1644 | 20 | msgid "Discount" | ||
1645 | 21 | msgstr "Ristourne" | ||
1646 | 22 | |||
1647 | 23 | #. module: partner_discount | ||
1648 | 24 | #: help:res.partner,discount:0 | ||
1649 | 25 | msgid "For percent enter a ratio between 0-1." | ||
1650 | 26 | msgstr "Pour être en pourcentage, saisir une valeur entre 0 et 1." | ||
1651 | 27 | |||
1652 | 28 | #. module: partner_discount | ||
1653 | 29 | #: view:res.partner:0 | ||
1654 | 30 | msgid "Sales & Purchases" | ||
1655 | 31 | msgstr "Achats-Ventes" | ||
1656 | 32 | |||
1657 | 33 | #. module: partner_discount | ||
1658 | 34 | #: model:ir.model,name:partner_discount.model_res_partner | ||
1659 | 35 | msgid "Partner" | ||
1660 | 36 | msgstr "Partenaire" | ||
1661 | 0 | 37 | ||
1662 | === added file 'partner_discount/i18n/partner_discount.pot' | |||
1663 | --- partner_discount/i18n/partner_discount.pot 1970-01-01 00:00:00 +0000 | |||
1664 | +++ partner_discount/i18n/partner_discount.pot 2014-08-27 19:22:25 +0000 | |||
1665 | @@ -0,0 +1,36 @@ | |||
1666 | 1 | # Translation of OpenERP Server. | ||
1667 | 2 | # This file contains the translation of the following modules: | ||
1668 | 3 | # * partner_discount | ||
1669 | 4 | # | ||
1670 | 5 | msgid "" | ||
1671 | 6 | msgstr "" | ||
1672 | 7 | "Project-Id-Version: OpenERP Server 7.0\n" | ||
1673 | 8 | "Report-Msgid-Bugs-To: \n" | ||
1674 | 9 | "POT-Creation-Date: 2013-11-01 15:41+0000\n" | ||
1675 | 10 | "PO-Revision-Date: 2013-11-01 15:41+0000\n" | ||
1676 | 11 | "Last-Translator: <>\n" | ||
1677 | 12 | "Language-Team: \n" | ||
1678 | 13 | "MIME-Version: 1.0\n" | ||
1679 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
1680 | 15 | "Content-Transfer-Encoding: \n" | ||
1681 | 16 | "Plural-Forms: \n" | ||
1682 | 17 | |||
1683 | 18 | #. module: partner_discount | ||
1684 | 19 | #: field:res.partner,discount:0 | ||
1685 | 20 | msgid "Discount" | ||
1686 | 21 | msgstr "" | ||
1687 | 22 | |||
1688 | 23 | #. module: partner_discount | ||
1689 | 24 | #: help:res.partner,discount:0 | ||
1690 | 25 | msgid "For percent enter a ratio between 0-1." | ||
1691 | 26 | msgstr "" | ||
1692 | 27 | |||
1693 | 28 | #. module: partner_discount | ||
1694 | 29 | #: view:res.partner:0 | ||
1695 | 30 | msgid "Sales & Purchases" | ||
1696 | 31 | msgstr "" | ||
1697 | 32 | |||
1698 | 33 | #. module: partner_discount | ||
1699 | 34 | #: model:ir.model,name:partner_discount.model_res_partner | ||
1700 | 35 | msgid "Partner" | ||
1701 | 36 | msgstr "" | ||
1702 | 0 | 37 | ||
1703 | === added file 'partner_discount/res_partner.py' | |||
1704 | --- partner_discount/res_partner.py 1970-01-01 00:00:00 +0000 | |||
1705 | +++ partner_discount/res_partner.py 2014-08-27 19:22:25 +0000 | |||
1706 | @@ -0,0 +1,36 @@ | |||
1707 | 1 | # -*- encoding: utf-8 -*- | ||
1708 | 2 | ############################################################################### | ||
1709 | 3 | # | ||
1710 | 4 | # OpenERP, Open Source Management Solution | ||
1711 | 5 | # This module copyright (C) 2013 Savoir-faire Linux | ||
1712 | 6 | # (<http://www.savoirfairelinux.com>). | ||
1713 | 7 | # | ||
1714 | 8 | # This program is free software: you can redistribute it and/or modify | ||
1715 | 9 | # it under the terms of the GNU Affero General Public License as | ||
1716 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
1717 | 11 | # License, or (at your option) any later version. | ||
1718 | 12 | # | ||
1719 | 13 | # This program is distributed in the hope that it will be useful, | ||
1720 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1721 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1722 | 16 | # GNU Affero General Public License for more details. | ||
1723 | 17 | # | ||
1724 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
1725 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1726 | 20 | # | ||
1727 | 21 | ############################################################################### | ||
1728 | 22 | |||
1729 | 23 | from openerp.osv import orm, fields | ||
1730 | 24 | |||
1731 | 25 | |||
1732 | 26 | class res_partner(orm.Model): | ||
1733 | 27 | """ Inherits partner and adds discount percentage """ | ||
1734 | 28 | _inherit = 'res.partner' | ||
1735 | 29 | _columns = { | ||
1736 | 30 | 'discount': fields.float('Discount', digits=(1, 4), | ||
1737 | 31 | help="For percent enter a ratio between 0-1."), | ||
1738 | 32 | } | ||
1739 | 33 | _defaults = {'discount': 0.0} | ||
1740 | 34 | |||
1741 | 35 | |||
1742 | 36 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1743 | 0 | 37 | ||
1744 | === added file 'partner_discount/res_partner_view.xml' | |||
1745 | --- partner_discount/res_partner_view.xml 1970-01-01 00:00:00 +0000 | |||
1746 | +++ partner_discount/res_partner_view.xml 2014-08-27 19:22:25 +0000 | |||
1747 | @@ -0,0 +1,19 @@ | |||
1748 | 1 | <?xml version = "1.0" encoding="utf-8"?> | ||
1749 | 2 | <openerp> | ||
1750 | 3 | <data> | ||
1751 | 4 | <record id="view_partner_discount_form" model="ir.ui.view"> | ||
1752 | 5 | <field name="name">res.partner.discount.form.inherit</field> | ||
1753 | 6 | <field name="model">res.partner</field> | ||
1754 | 7 | <field name="inherit_id" ref="base.view_partner_form"/> | ||
1755 | 8 | <field name="arch" type="xml"> | ||
1756 | 9 | <page string="Sales & Purchases"> | ||
1757 | 10 | <group> | ||
1758 | 11 | <group> | ||
1759 | 12 | <field name="discount"/> | ||
1760 | 13 | </group> | ||
1761 | 14 | </group> | ||
1762 | 15 | </page> | ||
1763 | 16 | </field> | ||
1764 | 17 | </record> | ||
1765 | 18 | </data> | ||
1766 | 19 | </openerp> | ||
1767 | 0 | 20 | ||
1768 | === added directory 'produce_details' | |||
1769 | === added file 'produce_details/__init__.py' | |||
1770 | --- produce_details/__init__.py 1970-01-01 00:00:00 +0000 | |||
1771 | +++ produce_details/__init__.py 2014-08-27 19:22:25 +0000 | |||
1772 | @@ -0,0 +1,22 @@ | |||
1773 | 1 | # -*- coding: utf-8 -*- | ||
1774 | 2 | ############################################################################## | ||
1775 | 3 | # | ||
1776 | 4 | # OpenERP, Open Source Management Solution | ||
1777 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
1778 | 6 | # | ||
1779 | 7 | # This program is free software: you can redistribute it and/or modify | ||
1780 | 8 | # it under the terms of the GNU Affero General Public License as | ||
1781 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
1782 | 10 | # License, or (at your option) any later version. | ||
1783 | 11 | # | ||
1784 | 12 | # This program is distributed in the hope that it will be useful, | ||
1785 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1786 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1787 | 15 | # GNU Affero General Public License for more details. | ||
1788 | 16 | # | ||
1789 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
1790 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1791 | 19 | # | ||
1792 | 20 | ############################################################################## | ||
1793 | 21 | |||
1794 | 22 | import product | ||
1795 | 0 | 23 | ||
1796 | === added file 'produce_details/__openerp__.py' | |||
1797 | --- produce_details/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
1798 | +++ produce_details/__openerp__.py 2014-08-27 19:22:25 +0000 | |||
1799 | @@ -0,0 +1,49 @@ | |||
1800 | 1 | # -*- coding: utf-8 -*- | ||
1801 | 2 | ############################################################################## | ||
1802 | 3 | # | ||
1803 | 4 | # OpenERP, Open Source Management Solution | ||
1804 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
1805 | 6 | # | ||
1806 | 7 | # This program is free software: you can redistribute it and/or modify | ||
1807 | 8 | # it under the terms of the GNU Affero General Public License as | ||
1808 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
1809 | 10 | # License, or (at your option) any later version. | ||
1810 | 11 | # | ||
1811 | 12 | # This program is distributed in the hope that it will be useful, | ||
1812 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1813 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1814 | 15 | # GNU Affero General Public License for more details. | ||
1815 | 16 | # | ||
1816 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
1817 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1818 | 19 | # | ||
1819 | 20 | ############################################################################## | ||
1820 | 21 | |||
1821 | 22 | { | ||
1822 | 23 | 'name': 'Produce Details', | ||
1823 | 24 | 'version': '0.1', | ||
1824 | 25 | 'author': 'Savoir-faire Linux', | ||
1825 | 26 | 'maintainer': 'Savoir-faire Linux', | ||
1826 | 27 | 'website': 'http://www.savoirfairelinux.com', | ||
1827 | 28 | 'category': 'product', | ||
1828 | 29 | 'description': """ | ||
1829 | 30 | Agricultural produce details | ||
1830 | 31 | ============================ | ||
1831 | 32 | |||
1832 | 33 | This module adds four descriptive fields for produce-related products, namely: | ||
1833 | 34 | |||
1834 | 35 | * A variety (e.g. Haden) | ||
1835 | 36 | * An origin (Brazil) | ||
1836 | 37 | * Conditioning weight (10 kg) | ||
1837 | 38 | * A size category (#12) | ||
1838 | 39 | * PLU code (4216) | ||
1839 | 40 | """, | ||
1840 | 41 | 'depends': ['base', 'purchase'], | ||
1841 | 42 | 'data': [ | ||
1842 | 43 | 'produce_details_view.xml', | ||
1843 | 44 | ], | ||
1844 | 45 | 'demo': [], | ||
1845 | 46 | 'test': [], | ||
1846 | 47 | 'installable': True, | ||
1847 | 48 | 'active': False, | ||
1848 | 49 | } | ||
1849 | 0 | 50 | ||
1850 | === added directory 'produce_details/i18n' | |||
1851 | === added file 'produce_details/i18n/fr.po' | |||
1852 | --- produce_details/i18n/fr.po 1970-01-01 00:00:00 +0000 | |||
1853 | +++ produce_details/i18n/fr.po 2014-08-27 19:22:25 +0000 | |||
1854 | @@ -0,0 +1,41 @@ | |||
1855 | 1 | # Translation of OpenERP Server. | ||
1856 | 2 | # This file contains the translation of the following modules: | ||
1857 | 3 | # * produce_details | ||
1858 | 4 | # | ||
1859 | 5 | msgid "" | ||
1860 | 6 | msgstr "" | ||
1861 | 7 | "Project-Id-Version: OpenERP Server 7.0-20130811-231021\n" | ||
1862 | 8 | "Report-Msgid-Bugs-To: \n" | ||
1863 | 9 | "POT-Creation-Date: 2013-09-18 14:22+0000\n" | ||
1864 | 10 | "PO-Revision-Date: 2013-09-18 14:22+0000\n" | ||
1865 | 11 | "Last-Translator: Alexandre Boily <alexandre.boily@savoirfairelinux.com>\n" | ||
1866 | 12 | "Language-Team: Savoir-faire Linux\n" | ||
1867 | 13 | "MIME-Version: 1.0\n" | ||
1868 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
1869 | 15 | "Content-Transfer-Encoding: \n" | ||
1870 | 16 | "Plural-Forms: \n" | ||
1871 | 17 | |||
1872 | 18 | #. module: produce_details | ||
1873 | 19 | #: field:product.product,origin:0 | ||
1874 | 20 | msgid "Origin" | ||
1875 | 21 | msgstr "Origine" | ||
1876 | 22 | |||
1877 | 23 | #. module: produce_details | ||
1878 | 24 | #: model:ir.model,name:produce_details.model_product_product | ||
1879 | 25 | msgid "Product" | ||
1880 | 26 | msgstr "Produit" | ||
1881 | 27 | |||
1882 | 28 | #. module: produce_details | ||
1883 | 29 | #: field:product.product,variety:0 | ||
1884 | 30 | msgid "Variety" | ||
1885 | 31 | msgstr "Variété" | ||
1886 | 32 | |||
1887 | 33 | #. module: produce_details | ||
1888 | 34 | #: field:product.product,cond_weight:0 | ||
1889 | 35 | msgid "Conditioning weight" | ||
1890 | 36 | msgstr "Poids de conditionnement" | ||
1891 | 37 | |||
1892 | 38 | #. module: produce_details | ||
1893 | 39 | #: field:product.product,size_category:0 | ||
1894 | 40 | msgid "Size" | ||
1895 | 41 | msgstr "Taille" | ||
1896 | 0 | 42 | ||
1897 | === added file 'produce_details/i18n/produce_details.pot' | |||
1898 | --- produce_details/i18n/produce_details.pot 1970-01-01 00:00:00 +0000 | |||
1899 | +++ produce_details/i18n/produce_details.pot 2014-08-27 19:22:25 +0000 | |||
1900 | @@ -0,0 +1,42 @@ | |||
1901 | 1 | # Translation of OpenERP Server. | ||
1902 | 2 | # This file contains the translation of the following modules: | ||
1903 | 3 | # * produce_details | ||
1904 | 4 | # | ||
1905 | 5 | msgid "" | ||
1906 | 6 | msgstr "" | ||
1907 | 7 | "Project-Id-Version: OpenERP Server 7.0-20130811-231021\n" | ||
1908 | 8 | "Report-Msgid-Bugs-To: \n" | ||
1909 | 9 | "POT-Creation-Date: 2013-09-18 14:22+0000\n" | ||
1910 | 10 | "PO-Revision-Date: 2013-09-18 14:22+0000\n" | ||
1911 | 11 | "Last-Translator: <>\n" | ||
1912 | 12 | "Language-Team: \n" | ||
1913 | 13 | "MIME-Version: 1.0\n" | ||
1914 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
1915 | 15 | "Content-Transfer-Encoding: \n" | ||
1916 | 16 | "Plural-Forms: \n" | ||
1917 | 17 | |||
1918 | 18 | #. module: produce_details | ||
1919 | 19 | #: field:product.product,origin:0 | ||
1920 | 20 | msgid "Origin" | ||
1921 | 21 | msgstr "" | ||
1922 | 22 | |||
1923 | 23 | #. module: produce_details | ||
1924 | 24 | #: model:ir.model,name:produce_details.model_product_product | ||
1925 | 25 | msgid "Product" | ||
1926 | 26 | msgstr "" | ||
1927 | 27 | |||
1928 | 28 | #. module: produce_details | ||
1929 | 29 | #: field:product.product,variety:0 | ||
1930 | 30 | msgid "Variety" | ||
1931 | 31 | msgstr "" | ||
1932 | 32 | |||
1933 | 33 | #. module: produce_details | ||
1934 | 34 | #: field:product.product,cond_weight:0 | ||
1935 | 35 | msgid "Conditioning weight" | ||
1936 | 36 | msgstr "" | ||
1937 | 37 | |||
1938 | 38 | #. module: produce_details | ||
1939 | 39 | #: field:product.product,size_category:0 | ||
1940 | 40 | msgid "Size" | ||
1941 | 41 | msgstr "" | ||
1942 | 42 | |||
1943 | 0 | 43 | ||
1944 | === added file 'produce_details/produce_details_view.xml' | |||
1945 | --- produce_details/produce_details_view.xml 1970-01-01 00:00:00 +0000 | |||
1946 | +++ produce_details/produce_details_view.xml 2014-08-27 19:22:25 +0000 | |||
1947 | @@ -0,0 +1,34 @@ | |||
1948 | 1 | <?xml version="1.0" encoding="utf-8" ?> | ||
1949 | 2 | <openerp> | ||
1950 | 3 | <data> | ||
1951 | 4 | <record id="produce_details_form" model="ir.ui.view"> | ||
1952 | 5 | <field name="name">product.product.produce.details.form</field> | ||
1953 | 6 | <field name="model">product.product</field> | ||
1954 | 7 | <field name="inherit_id" ref="product.product_normal_form_view" /> | ||
1955 | 8 | <field name="arch" type="xml"> | ||
1956 | 9 | <field name="description" position="before"> | ||
1957 | 10 | <group> | ||
1958 | 11 | <group> | ||
1959 | 12 | <field name="variety" /> | ||
1960 | 13 | <field name="origin" /> | ||
1961 | 14 | </group> | ||
1962 | 15 | |||
1963 | 16 | <group> | ||
1964 | 17 | <field name="cond_weight" /> | ||
1965 | 18 | <field name="size_category" /> | ||
1966 | 19 | </group> | ||
1967 | 20 | </group> | ||
1968 | 21 | <group> | ||
1969 | 22 | <group> | ||
1970 | 23 | <label for="plu1"/> | ||
1971 | 24 | <field name="plu1" nolabel="1" /> | ||
1972 | 25 | <div /> | ||
1973 | 26 | <field name="plu2" nolabel="1" /> | ||
1974 | 27 | </group> | ||
1975 | 28 | <group/> | ||
1976 | 29 | </group> | ||
1977 | 30 | </field> | ||
1978 | 31 | </field> | ||
1979 | 32 | </record> | ||
1980 | 33 | </data> | ||
1981 | 34 | </openerp> | ||
1982 | 0 | 35 | ||
1983 | === added file 'produce_details/product.py' | |||
1984 | --- produce_details/product.py 1970-01-01 00:00:00 +0000 | |||
1985 | +++ produce_details/product.py 2014-08-27 19:22:25 +0000 | |||
1986 | @@ -0,0 +1,36 @@ | |||
1987 | 1 | # -*- coding: utf-8 -*- | ||
1988 | 2 | ############################################################################## | ||
1989 | 3 | # | ||
1990 | 4 | # OpenERP, Open Source Management Solution | ||
1991 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
1992 | 6 | # | ||
1993 | 7 | # This program is free software: you can redistribute it and/or modify | ||
1994 | 8 | # it under the terms of the GNU Affero General Public License as | ||
1995 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
1996 | 10 | # License, or (at your option) any later version. | ||
1997 | 11 | # | ||
1998 | 12 | # This program is distributed in the hope that it will be useful, | ||
1999 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2000 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2001 | 15 | # GNU Affero General Public License for more details. | ||
2002 | 16 | # | ||
2003 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
2004 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2005 | 19 | # | ||
2006 | 20 | ############################################################################## | ||
2007 | 21 | |||
2008 | 22 | import openerp.addons.decimal_precision as dp | ||
2009 | 23 | from openerp.osv import orm, fields | ||
2010 | 24 | |||
2011 | 25 | class product_product(orm.Model): | ||
2012 | 26 | |||
2013 | 27 | _inherit = 'product.product' | ||
2014 | 28 | |||
2015 | 29 | _columns = { | ||
2016 | 30 | 'variety': fields.char('Variety', size=64), | ||
2017 | 31 | 'origin': fields.many2one('res.country', 'Origin'), | ||
2018 | 32 | 'cond_weight': fields.float('Conditioning weight', digits_compute=dp.get_precision('Stock Weight'), help='Conditioning weight in kg.'), | ||
2019 | 33 | 'size_category': fields.char('Size', size=16), | ||
2020 | 34 | 'plu1': fields.char('PLU', size=8), | ||
2021 | 35 | 'plu2': fields.char('PLU2', size=8), | ||
2022 | 36 | } | ||
2023 | 0 | 37 | ||
2024 | === added directory 'product_reserve_forecast' | |||
2025 | === added file 'product_reserve_forecast/__init__.py' | |||
2026 | --- product_reserve_forecast/__init__.py 1970-01-01 00:00:00 +0000 | |||
2027 | +++ product_reserve_forecast/__init__.py 2014-08-27 19:22:25 +0000 | |||
2028 | @@ -0,0 +1,23 @@ | |||
2029 | 1 | # -*- coding: utf-8 -*- | ||
2030 | 2 | ############################################################################## | ||
2031 | 3 | # | ||
2032 | 4 | # OpenERP, Open Source Management Solution | ||
2033 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
2034 | 6 | # | ||
2035 | 7 | # This program is free software: you can redistribute it and/or modify | ||
2036 | 8 | # it under the terms of the GNU Affero General Public License as | ||
2037 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
2038 | 10 | # License, or (at your option) any later version. | ||
2039 | 11 | # | ||
2040 | 12 | # This program is distributed in the hope that it will be useful, | ||
2041 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2042 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2043 | 15 | # GNU Affero General Public License for more details. | ||
2044 | 16 | # | ||
2045 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
2046 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2047 | 19 | # | ||
2048 | 20 | ############################################################################## | ||
2049 | 21 | |||
2050 | 22 | import product | ||
2051 | 23 | import sale_stock | ||
2052 | 0 | 24 | ||
2053 | === added file 'product_reserve_forecast/__openerp__.py' | |||
2054 | --- product_reserve_forecast/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
2055 | +++ product_reserve_forecast/__openerp__.py 2014-08-27 19:22:25 +0000 | |||
2056 | @@ -0,0 +1,44 @@ | |||
2057 | 1 | # -*- coding: utf-8 -*- | ||
2058 | 2 | ############################################################################## | ||
2059 | 3 | # | ||
2060 | 4 | # OpenERP, Open Source Management Solution | ||
2061 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
2062 | 6 | # | ||
2063 | 7 | # This program is free software: you can redistribute it and/or modify | ||
2064 | 8 | # it under the terms of the GNU Affero General Public License as | ||
2065 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
2066 | 10 | # License, or (at your option) any later version. | ||
2067 | 11 | # | ||
2068 | 12 | # This program is distributed in the hope that it will be useful, | ||
2069 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2070 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2071 | 15 | # GNU Affero General Public License for more details. | ||
2072 | 16 | # | ||
2073 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
2074 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2075 | 19 | # | ||
2076 | 20 | ############################################################################## | ||
2077 | 21 | |||
2078 | 22 | { | ||
2079 | 23 | 'name': 'Reserve Product Quantity on Forecast', | ||
2080 | 24 | 'version': '0.1', | ||
2081 | 25 | 'author': 'Savoir-faire Linux', | ||
2082 | 26 | 'maintainer': 'Savoir-faire Linux', | ||
2083 | 27 | 'website': 'http://www.savoirfairelinux.com', | ||
2084 | 28 | 'category': 'product', | ||
2085 | 29 | 'description': """ | ||
2086 | 30 | Put aside an unsaleable quantity for a product | ||
2087 | 31 | ============================================== | ||
2088 | 32 | |||
2089 | 33 | This reduces the forecasted quantity by a given amount. | ||
2090 | 34 | """, | ||
2091 | 35 | 'depends': ['base', 'product', 'sale', 'sale_stock', 'stock'], | ||
2092 | 36 | 'data': [ | ||
2093 | 37 | 'security/product_reserve_forecast_security.xml', | ||
2094 | 38 | 'product_reserve_forecast_view.xml', | ||
2095 | 39 | ], | ||
2096 | 40 | 'demo': [], | ||
2097 | 41 | 'test': [], | ||
2098 | 42 | 'installable': True, | ||
2099 | 43 | 'active': False, | ||
2100 | 44 | } | ||
2101 | 0 | 45 | ||
2102 | === added directory 'product_reserve_forecast/i18n' | |||
2103 | === added file 'product_reserve_forecast/i18n/fr.po' | |||
2104 | --- product_reserve_forecast/i18n/fr.po 1970-01-01 00:00:00 +0000 | |||
2105 | +++ product_reserve_forecast/i18n/fr.po 2014-08-27 19:22:25 +0000 | |||
2106 | @@ -0,0 +1,67 @@ | |||
2107 | 1 | # Translation of OpenERP Server. | ||
2108 | 2 | # This file contains the translation of the following modules: | ||
2109 | 3 | # * product_reserve_forecast | ||
2110 | 4 | # | ||
2111 | 5 | msgid "" | ||
2112 | 6 | msgstr "" | ||
2113 | 7 | "Project-Id-Version: OpenERP Server 7.0-20130811-231021\n" | ||
2114 | 8 | "Report-Msgid-Bugs-To: \n" | ||
2115 | 9 | "POT-Creation-Date: 2013-09-26 11:42+0000\n" | ||
2116 | 10 | "PO-Revision-Date: 2013-09-26 11:42+0000\n" | ||
2117 | 11 | "Last-Translator: Alexandre Boily <alexandre.boily@savoirfairelinux.com>\n" | ||
2118 | 12 | "Language-Team: Savoir-faire Linux\n" | ||
2119 | 13 | "MIME-Version: 1.0\n" | ||
2120 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
2121 | 15 | "Content-Transfer-Encoding: \n" | ||
2122 | 16 | "Plural-Forms: \n" | ||
2123 | 17 | |||
2124 | 18 | #. module: product_reserve_forecast | ||
2125 | 19 | #: field:product.product,virtual_clone:0 | ||
2126 | 20 | msgid "Forecasted Quantity" | ||
2127 | 21 | msgstr "Quantité prévue" | ||
2128 | 22 | |||
2129 | 23 | #. module: product_reserve_forecast | ||
2130 | 24 | #: model:ir.model,name:product_reserve_forecast.model_product_product | ||
2131 | 25 | msgid "Product" | ||
2132 | 26 | msgstr "Produit" | ||
2133 | 27 | |||
2134 | 28 | #. module: product_reserve_forecast | ||
2135 | 29 | #: code:addons/product_reserve_forecast/sale_stock.py:85 | ||
2136 | 30 | #, python-format | ||
2137 | 31 | msgid "Not enough stock ! : " | ||
2138 | 32 | msgstr "Pas assez de stock: " | ||
2139 | 33 | |||
2140 | 34 | #. module: product_reserve_forecast | ||
2141 | 35 | #: code:addons/product_reserve_forecast/sale_stock.py:81 | ||
2142 | 36 | #, python-format | ||
2143 | 37 | msgid "You plan to sell %.2f %s but you only have %.2f %s available !\n" | ||
2144 | 38 | "The real stock is %.2f %s. (without reservations)" | ||
2145 | 39 | msgstr "Vous planifiez vendre %.2f %s, mais seulement %.2f %s sont disponibles. | ||
2146 | 40 | La vraie quantité en stock est %.2f %s (sans réservations)." | ||
2147 | 41 | |||
2148 | 42 | #. module: product_reserve_forecast | ||
2149 | 43 | #: model:res.groups,name:product_reserve_forecast.group_product_reserve | ||
2150 | 44 | msgid "Define product reserve quantity" | ||
2151 | 45 | msgstr "Définir la quantié réservée sur un produit" | ||
2152 | 46 | |||
2153 | 47 | #. module: product_reserve_forecast | ||
2154 | 48 | #: code:addons/product_reserve_forecast/sale_stock.py:90 | ||
2155 | 49 | #, python-format | ||
2156 | 50 | msgid "Configuration Error!" | ||
2157 | 51 | msgstr "Erreur de configuration!" | ||
2158 | 52 | |||
2159 | 53 | #. module: product_reserve_forecast | ||
2160 | 54 | #: field:product.product,reserved:0 | ||
2161 | 55 | msgid "Reserved Quantity" | ||
2162 | 56 | msgstr "Quantité réservée" | ||
2163 | 57 | |||
2164 | 58 | #. module: product_reserve_forecast | ||
2165 | 59 | #: model:ir.model,name:product_reserve_forecast.model_sale_order_line | ||
2166 | 60 | msgid "Sales Order Line" | ||
2167 | 61 | msgstr "Ligne de vente" | ||
2168 | 62 | |||
2169 | 63 | #. module: product_reserve_forecast | ||
2170 | 64 | #: model:res.groups,comment:product_reserve_forecast.group_product_reserve | ||
2171 | 65 | msgid "Can see and set the per product reserve quantity." | ||
2172 | 66 | msgstr "Peut voir et modifier la quantité réservée d'un produit." | ||
2173 | 67 | |||
2174 | 0 | 68 | ||
2175 | === added file 'product_reserve_forecast/i18n/product_reserve_forecast.pot' | |||
2176 | --- product_reserve_forecast/i18n/product_reserve_forecast.pot 1970-01-01 00:00:00 +0000 | |||
2177 | +++ product_reserve_forecast/i18n/product_reserve_forecast.pot 2014-08-27 19:22:25 +0000 | |||
2178 | @@ -0,0 +1,66 @@ | |||
2179 | 1 | # Translation of OpenERP Server. | ||
2180 | 2 | # This file contains the translation of the following modules: | ||
2181 | 3 | # * product_reserve_forecast | ||
2182 | 4 | # | ||
2183 | 5 | msgid "" | ||
2184 | 6 | msgstr "" | ||
2185 | 7 | "Project-Id-Version: OpenERP Server 7.0-20130811-231021\n" | ||
2186 | 8 | "Report-Msgid-Bugs-To: \n" | ||
2187 | 9 | "POT-Creation-Date: 2013-09-26 11:42+0000\n" | ||
2188 | 10 | "PO-Revision-Date: 2013-09-26 11:42+0000\n" | ||
2189 | 11 | "Last-Translator: <>\n" | ||
2190 | 12 | "Language-Team: \n" | ||
2191 | 13 | "MIME-Version: 1.0\n" | ||
2192 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
2193 | 15 | "Content-Transfer-Encoding: \n" | ||
2194 | 16 | "Plural-Forms: \n" | ||
2195 | 17 | |||
2196 | 18 | #. module: product_reserve_forecast | ||
2197 | 19 | #: field:product.product,virtual_clone:0 | ||
2198 | 20 | msgid "Forecasted Quantity" | ||
2199 | 21 | msgstr "" | ||
2200 | 22 | |||
2201 | 23 | #. module: product_reserve_forecast | ||
2202 | 24 | #: model:ir.model,name:product_reserve_forecast.model_product_product | ||
2203 | 25 | msgid "Product" | ||
2204 | 26 | msgstr "" | ||
2205 | 27 | |||
2206 | 28 | #. module: product_reserve_forecast | ||
2207 | 29 | #: code:addons/product_reserve_forecast/sale_stock.py:85 | ||
2208 | 30 | #, python-format | ||
2209 | 31 | msgid "Not enough stock ! : " | ||
2210 | 32 | msgstr "" | ||
2211 | 33 | |||
2212 | 34 | #. module: product_reserve_forecast | ||
2213 | 35 | #: code:addons/product_reserve_forecast/sale_stock.py:81 | ||
2214 | 36 | #, python-format | ||
2215 | 37 | msgid "You plan to sell %.2f %s but you only have %.2f %s available !\n" | ||
2216 | 38 | "The real stock is %.2f %s. (without reservations)" | ||
2217 | 39 | msgstr "" | ||
2218 | 40 | |||
2219 | 41 | #. module: product_reserve_forecast | ||
2220 | 42 | #: model:res.groups,name:product_reserve_forecast.group_product_reserve | ||
2221 | 43 | msgid "Define product reserve quantity" | ||
2222 | 44 | msgstr "" | ||
2223 | 45 | |||
2224 | 46 | #. module: product_reserve_forecast | ||
2225 | 47 | #: code:addons/product_reserve_forecast/sale_stock.py:90 | ||
2226 | 48 | #, python-format | ||
2227 | 49 | msgid "Configuration Error!" | ||
2228 | 50 | msgstr "" | ||
2229 | 51 | |||
2230 | 52 | #. module: product_reserve_forecast | ||
2231 | 53 | #: field:product.product,reserved:0 | ||
2232 | 54 | msgid "Reserved Quantity" | ||
2233 | 55 | msgstr "" | ||
2234 | 56 | |||
2235 | 57 | #. module: product_reserve_forecast | ||
2236 | 58 | #: model:ir.model,name:product_reserve_forecast.model_sale_order_line | ||
2237 | 59 | msgid "Sales Order Line" | ||
2238 | 60 | msgstr "" | ||
2239 | 61 | |||
2240 | 62 | #. module: product_reserve_forecast | ||
2241 | 63 | #: model:res.groups,comment:product_reserve_forecast.group_product_reserve | ||
2242 | 64 | msgid "Can see and set the per product reserve quantity." | ||
2243 | 65 | msgstr "" | ||
2244 | 66 | |||
2245 | 0 | 67 | ||
2246 | === added file 'product_reserve_forecast/product.py' | |||
2247 | --- product_reserve_forecast/product.py 1970-01-01 00:00:00 +0000 | |||
2248 | +++ product_reserve_forecast/product.py 2014-08-27 19:22:25 +0000 | |||
2249 | @@ -0,0 +1,70 @@ | |||
2250 | 1 | # -*- coding: utf-8 -*- | ||
2251 | 2 | ############################################################################## | ||
2252 | 3 | # | ||
2253 | 4 | # OpenERP, Open Source Management Solution | ||
2254 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
2255 | 6 | # | ||
2256 | 7 | # This program is free software: you can redistribute it and/or modify | ||
2257 | 8 | # it under the terms of the GNU Affero General Public License as | ||
2258 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
2259 | 10 | # License, or (at your option) any later version. | ||
2260 | 11 | # | ||
2261 | 12 | # This program is distributed in the hope that it will be useful, | ||
2262 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2263 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2264 | 15 | # GNU Affero General Public License for more details. | ||
2265 | 16 | # | ||
2266 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
2267 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2268 | 19 | # | ||
2269 | 20 | ############################################################################## | ||
2270 | 21 | |||
2271 | 22 | import openerp.addons.decimal_precision as dp | ||
2272 | 23 | from openerp.osv import orm, fields | ||
2273 | 24 | |||
2274 | 25 | class product_product(orm.Model): | ||
2275 | 26 | |||
2276 | 27 | _inherit = 'product.product' | ||
2277 | 28 | |||
2278 | 29 | def _virtual_available(self, cr, uid, ids, names, arg, context=None): | ||
2279 | 30 | orig = self._product_available(cr, uid, ids, names, arg, context=context) | ||
2280 | 31 | product_pool = self.pool.get('product.product') | ||
2281 | 32 | for product_id in orig.keys(): | ||
2282 | 33 | reserved = product_pool.browse(cr, uid, product_id, context=context).reserved | ||
2283 | 34 | orig[product_id]['virtual_available'] -= reserved | ||
2284 | 35 | |||
2285 | 36 | return orig | ||
2286 | 37 | |||
2287 | 38 | def _virtual_clone(self, cr, uid, ids, names, arg, context=None): | ||
2288 | 39 | '''Small hack to get priority over the Stock module's virtual_available''' | ||
2289 | 40 | |||
2290 | 41 | res = {} | ||
2291 | 42 | |||
2292 | 43 | for line in self.browse(cr, uid, ids, context=context): | ||
2293 | 44 | res[line.id] = line.virtual_available | ||
2294 | 45 | |||
2295 | 46 | return res | ||
2296 | 47 | |||
2297 | 48 | _columns = { | ||
2298 | 49 | 'reserved': fields.integer('Reserved Quantity'), | ||
2299 | 50 | |||
2300 | 51 | 'virtual_clone': | ||
2301 | 52 | fields.function(_virtual_clone, type='float', | ||
2302 | 53 | digits_compute=dp.get_precision('Product Unit of Measure'), string='Forecasted Quantity'), | ||
2303 | 54 | |||
2304 | 55 | 'virtual_available': fields.function(_virtual_available, multi='qty_available', | ||
2305 | 56 | type='float', digits_compute=dp.get_precision('Product Unit of Measure'), | ||
2306 | 57 | string='Forecasted Quantity', | ||
2307 | 58 | help="Forecast quantity (computed as Quantity On Hand " | ||
2308 | 59 | "- Outgoing - Reserved + Incoming)\n" | ||
2309 | 60 | "In a context with a single Stock Location, this includes " | ||
2310 | 61 | "goods stored in this location, or any of its children.\n" | ||
2311 | 62 | "In a context with a single Warehouse, this includes " | ||
2312 | 63 | "goods stored in the Stock Location of this Warehouse, or any " | ||
2313 | 64 | "of its children.\n" | ||
2314 | 65 | "In a context with a single Shop, this includes goods " | ||
2315 | 66 | "stored in the Stock Location of the Warehouse of this Shop, " | ||
2316 | 67 | "or any of its children.\n" | ||
2317 | 68 | "Otherwise, this includes goods stored in any Stock Location " | ||
2318 | 69 | "with 'internal' type."), | ||
2319 | 70 | } | ||
2320 | 0 | 71 | ||
2321 | === added file 'product_reserve_forecast/product_reserve_forecast_view.xml' | |||
2322 | --- product_reserve_forecast/product_reserve_forecast_view.xml 1970-01-01 00:00:00 +0000 | |||
2323 | +++ product_reserve_forecast/product_reserve_forecast_view.xml 2014-08-27 19:22:25 +0000 | |||
2324 | @@ -0,0 +1,28 @@ | |||
2325 | 1 | <?xml version="1.0" encoding="utf8" ?> | ||
2326 | 2 | <openerp> | ||
2327 | 3 | <data> | ||
2328 | 4 | <record id="product_reserve_forecast_form" model="ir.ui.view"> | ||
2329 | 5 | <field name="name">product.product.reserve.form</field> | ||
2330 | 6 | <field name="model">product.product</field> | ||
2331 | 7 | <field name="inherit_id" ref="stock.view_normal_procurement_locations_form" /> | ||
2332 | 8 | <field name="arch" type="xml"> | ||
2333 | 9 | <field name="virtual_available" position="replace"> | ||
2334 | 10 | <field name="virtual_clone" /> | ||
2335 | 11 | <field name="reserved" groups="product_reserve_forecast.group_product_reserve" /> | ||
2336 | 12 | </field> | ||
2337 | 13 | </field> | ||
2338 | 14 | </record> | ||
2339 | 15 | |||
2340 | 16 | <record id="product_reserve_forecast_tree" model="ir.ui.view"> | ||
2341 | 17 | <field name="name">product.product.reserve.tree</field> | ||
2342 | 18 | <field name="model">product.product</field> | ||
2343 | 19 | <field name="inherit_id" ref="product.product_product_tree_view" /> | ||
2344 | 20 | <field name="arch" type="xml"> | ||
2345 | 21 | <field name="virtual_available" position="replace"> | ||
2346 | 22 | <field name="virtual_available" invisible="1" /> | ||
2347 | 23 | <field name="virtual_clone" /> | ||
2348 | 24 | </field> | ||
2349 | 25 | </field> | ||
2350 | 26 | </record> | ||
2351 | 27 | </data> | ||
2352 | 28 | </openerp> | ||
2353 | 0 | 29 | ||
2354 | === added file 'product_reserve_forecast/sale_stock.py' | |||
2355 | --- product_reserve_forecast/sale_stock.py 1970-01-01 00:00:00 +0000 | |||
2356 | +++ product_reserve_forecast/sale_stock.py 2014-08-27 19:22:25 +0000 | |||
2357 | @@ -0,0 +1,94 @@ | |||
2358 | 1 | # -*- coding: utf-8 -*- | ||
2359 | 2 | ############################################################################## | ||
2360 | 3 | # | ||
2361 | 4 | # OpenERP, Open Source Management Solution | ||
2362 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
2363 | 6 | # | ||
2364 | 7 | # This program is free software: you can redistribute it and/or modify | ||
2365 | 8 | # it under the terms of the GNU Affero General Public License as | ||
2366 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
2367 | 10 | # License, or (at your option) any later version. | ||
2368 | 11 | # | ||
2369 | 12 | # This program is distributed in the hope that it will be useful, | ||
2370 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2371 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2372 | 15 | # GNU Affero General Public License for more details. | ||
2373 | 16 | # | ||
2374 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
2375 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2376 | 19 | # | ||
2377 | 20 | ############################################################################## | ||
2378 | 21 | |||
2379 | 22 | from openerp.osv import fields, orm | ||
2380 | 23 | from openerp.tools import float_compare | ||
2381 | 24 | from openerp.tools.translate import _ | ||
2382 | 25 | |||
2383 | 26 | class sale_order_line(orm.Model): | ||
2384 | 27 | |||
2385 | 28 | _inherit = 'sale.order.line' | ||
2386 | 29 | |||
2387 | 30 | def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, | ||
2388 | 31 | uom=False, qty_uos=0, uos=False, name='', partner_id=False, | ||
2389 | 32 | lang=False, update_tax=True, date_order=False, packaging=False, | ||
2390 | 33 | fiscal_position=False, flag=False, context=None): | ||
2391 | 34 | '''Slightly tweaked copy from sale_stock | ||
2392 | 35 | |||
2393 | 36 | The only difference resides in the way the compare_qty is computed: in | ||
2394 | 37 | this implementation, take into account the product's reserved quantity. | ||
2395 | 38 | ''' | ||
2396 | 39 | |||
2397 | 40 | context = context or {} | ||
2398 | 41 | product_uom_obj = self.pool.get('product.uom') | ||
2399 | 42 | partner_obj = self.pool.get('res.partner') | ||
2400 | 43 | product_obj = self.pool.get('product.product') | ||
2401 | 44 | warning = {} | ||
2402 | 45 | res = super(sale_order_line, self).product_id_change(cr, uid, ids, pricelist, product, qty=qty, | ||
2403 | 46 | uom=uom, qty_uos=qty_uos, uos=uos, name=name, partner_id=partner_id, | ||
2404 | 47 | lang=lang, update_tax=update_tax, date_order=date_order, packaging=packaging, fiscal_position=fiscal_position, flag=flag, context=context) | ||
2405 | 48 | |||
2406 | 49 | if not product: | ||
2407 | 50 | res['value'].update({'product_packaging': False}) | ||
2408 | 51 | return res | ||
2409 | 52 | |||
2410 | 53 | #update of result obtained in super function | ||
2411 | 54 | product_obj = product_obj.browse(cr, uid, product, context=context) | ||
2412 | 55 | res['value']['delay'] = (product_obj.sale_delay or 0.0) | ||
2413 | 56 | res['value']['type'] = product_obj.procure_method | ||
2414 | 57 | |||
2415 | 58 | #check if product is available, and if not: raise an error | ||
2416 | 59 | uom2 = False | ||
2417 | 60 | if uom: | ||
2418 | 61 | uom2 = product_uom_obj.browse(cr, uid, uom) | ||
2419 | 62 | if product_obj.uom_id.category_id.id != uom2.category_id.id: | ||
2420 | 63 | uom = False | ||
2421 | 64 | if not uom2: | ||
2422 | 65 | uom2 = product_obj.uom_id | ||
2423 | 66 | |||
2424 | 67 | # Calling product_packaging_change function after updating UoM | ||
2425 | 68 | res_packing = self.product_packaging_change(cr, uid, ids, pricelist, product, qty, uom, partner_id, packaging, context=context) | ||
2426 | 69 | res['value'].update(res_packing.get('value', {})) | ||
2427 | 70 | warning_msgs = res_packing.get('warning') and res_packing['warning']['message'] or '' | ||
2428 | 71 | |||
2429 | 72 | # Original comparison did not substract reserved quantity | ||
2430 | 73 | avail = product_obj.virtual_available - product_obj.reserved | ||
2431 | 74 | compare_qty = float_compare( | ||
2432 | 75 | avail * uom2.factor, | ||
2433 | 76 | qty * product_obj.uom_id.factor, | ||
2434 | 77 | precision_rounding=product_obj.uom_id.rounding) | ||
2435 | 78 | |||
2436 | 79 | if (product_obj.type=='product') and int(compare_qty) == -1 \ | ||
2437 | 80 | and (product_obj.procure_method=='make_to_stock'): | ||
2438 | 81 | warn_msg = _('You plan to sell %.2f %s but you only have %.2f %s available !\nThe real stock is %.2f %s. (without reservations)') % \ | ||
2439 | 82 | (qty, uom2 and uom2.name or product_obj.uom_id.name, | ||
2440 | 83 | max(0,product_obj.virtual_available), product_obj.uom_id.name, | ||
2441 | 84 | max(0,product_obj.qty_available), product_obj.uom_id.name) | ||
2442 | 85 | warning_msgs += _("Not enough stock ! : ") + warn_msg + "\n\n" | ||
2443 | 86 | |||
2444 | 87 | #update of warning messages | ||
2445 | 88 | if warning_msgs: | ||
2446 | 89 | warning = { | ||
2447 | 90 | 'title': _('Configuration Error!'), | ||
2448 | 91 | 'message' : warning_msgs | ||
2449 | 92 | } | ||
2450 | 93 | res.update({'warning': warning}) | ||
2451 | 94 | return res | ||
2452 | 0 | 95 | ||
2453 | === added directory 'product_reserve_forecast/security' | |||
2454 | === added file 'product_reserve_forecast/security/ir.model.access.csv' | |||
2455 | --- product_reserve_forecast/security/ir.model.access.csv 1970-01-01 00:00:00 +0000 | |||
2456 | +++ product_reserve_forecast/security/ir.model.access.csv 2014-08-27 19:22:25 +0000 | |||
2457 | @@ -0,0 +1,1 @@ | |||
2458 | 1 | access_sale_order_warn,access_sale_order_warn,model_sale_order_warn,,1,1,1,1 | ||
2459 | 0 | 2 | ||
2460 | === added file 'product_reserve_forecast/security/product_reserve_forecast_security.xml' | |||
2461 | --- product_reserve_forecast/security/product_reserve_forecast_security.xml 1970-01-01 00:00:00 +0000 | |||
2462 | +++ product_reserve_forecast/security/product_reserve_forecast_security.xml 2014-08-27 19:22:25 +0000 | |||
2463 | @@ -0,0 +1,11 @@ | |||
2464 | 1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2465 | 2 | <openerp> | ||
2466 | 3 | <data> | ||
2467 | 4 | <record id="group_product_reserve" model="res.groups"> | ||
2468 | 5 | <field name="name">Define product reserve quantity</field> | ||
2469 | 6 | <field name="category_id" ref="base.module_category_hidden" /> | ||
2470 | 7 | <field name="comment">Can see and set the per product reserve quantity.</field> | ||
2471 | 8 | <field name="implied_ids" eval="[(4, ref('base.group_user'))]" /> | ||
2472 | 9 | </record> | ||
2473 | 10 | </data> | ||
2474 | 11 | </openerp> | ||
2475 | 0 | 12 | ||
2476 | === added directory 'purchase_gains' | |||
2477 | === added file 'purchase_gains/__init__.py' | |||
2478 | --- purchase_gains/__init__.py 1970-01-01 00:00:00 +0000 | |||
2479 | +++ purchase_gains/__init__.py 2014-08-27 19:22:25 +0000 | |||
2480 | @@ -0,0 +1,23 @@ | |||
2481 | 1 | # -*- coding: utf-8 -*- | ||
2482 | 2 | ############################################################################## | ||
2483 | 3 | # | ||
2484 | 4 | # OpenERP, Open Source Management Solution | ||
2485 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
2486 | 6 | # | ||
2487 | 7 | # This program is free software: you can redistribute it and/or modify | ||
2488 | 8 | # it under the terms of the GNU Affero General Public License as | ||
2489 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
2490 | 10 | # License, or (at your option) any later version. | ||
2491 | 11 | # | ||
2492 | 12 | # This program is distributed in the hope that it will be useful, | ||
2493 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2494 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2495 | 15 | # GNU Affero General Public License for more details. | ||
2496 | 16 | # | ||
2497 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
2498 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2499 | 19 | # | ||
2500 | 20 | ############################################################################## | ||
2501 | 21 | |||
2502 | 22 | import report | ||
2503 | 23 | import purchase | ||
2504 | 0 | 24 | ||
2505 | === added file 'purchase_gains/__init__.pyc' | |||
2506 | 1 | Binary files purchase_gains/__init__.pyc 1970-01-01 00:00:00 +0000 and purchase_gains/__init__.pyc 2014-08-27 19:22:25 +0000 differ | 25 | Binary files purchase_gains/__init__.pyc 1970-01-01 00:00:00 +0000 and purchase_gains/__init__.pyc 2014-08-27 19:22:25 +0000 differ |
2507 | === added file 'purchase_gains/__openerp__.py' | |||
2508 | --- purchase_gains/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
2509 | +++ purchase_gains/__openerp__.py 2014-08-27 19:22:25 +0000 | |||
2510 | @@ -0,0 +1,45 @@ | |||
2511 | 1 | # -*- coding: utf-8 -*- | ||
2512 | 2 | ############################################################################## | ||
2513 | 3 | # | ||
2514 | 4 | # OpenERP, Open Source Management Solution | ||
2515 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
2516 | 6 | # | ||
2517 | 7 | # This program is free software: you can redistribute it and/or modify | ||
2518 | 8 | # it under the terms of the GNU Affero General Public License as | ||
2519 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
2520 | 10 | # License, or (at your option) any later version. | ||
2521 | 11 | # | ||
2522 | 12 | # This program is distributed in the hope that it will be useful, | ||
2523 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2524 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2525 | 15 | # GNU Affero General Public License for more details. | ||
2526 | 16 | # | ||
2527 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
2528 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2529 | 19 | # | ||
2530 | 20 | ############################################################################## | ||
2531 | 21 | |||
2532 | 22 | # NOTE: The name of the supplied field was initially "display_name", but it seems that OpenERP, | ||
2533 | 23 | # whenever it seems "name" in the field, returns the value for "name". Well... | ||
2534 | 24 | |||
2535 | 25 | { | ||
2536 | 26 | 'name': 'Purchase gain', | ||
2537 | 27 | 'version': '1.1', | ||
2538 | 28 | 'author': 'Savoir-faire Linux', | ||
2539 | 29 | 'maintainer': 'Savoir-faire Linux', | ||
2540 | 30 | 'website': 'http://www.savoirfairelinux.com', | ||
2541 | 31 | 'category': 'Generic Modules/Purchases', | ||
2542 | 32 | 'description': """ | ||
2543 | 33 | Create a menu in reporting for Purchase gains | ||
2544 | 34 | ==================================================== | ||
2545 | 35 | """, | ||
2546 | 36 | 'depends': ['base', 'purchase'], | ||
2547 | 37 | 'data': [ | ||
2548 | 38 | 'purchase_report.xml', | ||
2549 | 39 | 'purchase_view.xml', | ||
2550 | 40 | ], | ||
2551 | 41 | 'demo': [], | ||
2552 | 42 | 'test': [], | ||
2553 | 43 | 'installable': True, | ||
2554 | 44 | 'active': False, | ||
2555 | 45 | } | ||
2556 | 0 | 46 | ||
2557 | === added file 'purchase_gains/purchase.py' | |||
2558 | --- purchase_gains/purchase.py 1970-01-01 00:00:00 +0000 | |||
2559 | +++ purchase_gains/purchase.py 2014-08-27 19:22:25 +0000 | |||
2560 | @@ -0,0 +1,106 @@ | |||
2561 | 1 | # -*- coding: utf-8 -*- | ||
2562 | 2 | ############################################################################## | ||
2563 | 3 | # | ||
2564 | 4 | # OpenERP, Open Source Management Solution | ||
2565 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
2566 | 6 | # | ||
2567 | 7 | # This program is free software: you can redistribute it and/or modify | ||
2568 | 8 | # it under the terms of the GNU Affero General Public License as | ||
2569 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
2570 | 10 | # License, or (at your option) any later version. | ||
2571 | 11 | # | ||
2572 | 12 | # This program is distributed in the hope that it will be useful, | ||
2573 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2574 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2575 | 15 | # GNU Affero General Public License for more details. | ||
2576 | 16 | # | ||
2577 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
2578 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2579 | 19 | # | ||
2580 | 20 | ############################################################################## | ||
2581 | 21 | |||
2582 | 22 | from openerp.osv import orm, fields | ||
2583 | 23 | import openerp.addons.decimal_precision as dp | ||
2584 | 24 | |||
2585 | 25 | class purchase_order(orm.Model): | ||
2586 | 26 | |||
2587 | 27 | _inherit = 'purchase.order' | ||
2588 | 28 | |||
2589 | 29 | def get_profit_all(self, cr, uid, ids, name, args, context): | ||
2590 | 30 | if not ids: | ||
2591 | 31 | return {} | ||
2592 | 32 | res = {} | ||
2593 | 33 | for line in self.browse(cr, uid, ids): | ||
2594 | 34 | res[line.id] = { | ||
2595 | 35 | 'profit_po': 0.0, | ||
2596 | 36 | 'amount_total_discount': 0.0, | ||
2597 | 37 | 'amount_landing_cost': 0.0, | ||
2598 | 38 | 'amount_total_price_unit': 0.0, | ||
2599 | 39 | 'amount_total_sale_order': 0.0 | ||
2600 | 40 | } | ||
2601 | 41 | total_landed_cost_po = 0.0 | ||
2602 | 42 | if line.landed_cost_line_ids: | ||
2603 | 43 | for costs in line.landed_cost_line_ids: | ||
2604 | 44 | total_landed_cost_po += costs.amount | ||
2605 | 45 | res[line.id]['amount_landing_cost'] = total_landed_cost_po | ||
2606 | 46 | total_price_unit = 0.0 | ||
2607 | 47 | |||
2608 | 48 | amount_total_sale_order = 0.0 | ||
2609 | 49 | amount_total_discounts = 0.0 | ||
2610 | 50 | total_landed_cost_so = 0.0 | ||
2611 | 51 | if line.order_line: | ||
2612 | 52 | for one_line in line.order_line: | ||
2613 | 53 | acc_id = one_line.account_analytic_id.id | ||
2614 | 54 | total_price_unit += one_line.price_unit | ||
2615 | 55 | ids_stock_prod_lot = self.pool.get('stock.production.lot').search(cr, uid, [('account_analytic_id', '=', acc_id)], context=context)[0] | ||
2616 | 56 | id_stock_prod_lot = self.pool.get('stock.production.lot').browse(cr, uid, ids_stock_prod_lot).id | ||
2617 | 57 | stock_move_ids = self.pool.get('stock.move').search(cr, uid, [('prodlot_id', '=', id_stock_prod_lot)], context=context) | ||
2618 | 58 | |||
2619 | 59 | list_stock_move = self.pool.get('stock.move').browse(cr, uid, stock_move_ids, context) | ||
2620 | 60 | amount_total_sale_order = 0.0 | ||
2621 | 61 | amount_total_discounts = 0.0 | ||
2622 | 62 | if list_stock_move: | ||
2623 | 63 | for one_move_line in list_stock_move: | ||
2624 | 64 | if one_move_line.picking_id.sale_id: | ||
2625 | 65 | amount_total_sale_order += one_move_line.picking_id.sale_id.amount_total | ||
2626 | 66 | amount_total_discounts += one_move_line.picking_id.sale_id.amount_total * (1-(one_move_line.picking_id.sale_id.partner_id.discount or 0.0)) | ||
2627 | 67 | total_landed_cost_so = 0.0 | ||
2628 | 68 | if one_move_line.picking_id.sale_id.landed_cost_line_ids: | ||
2629 | 69 | for costs_so in one_move_line.picking_id.sale_id.landed_cost_line_ids: | ||
2630 | 70 | total_landed_cost_so += costs_so.amount | ||
2631 | 71 | res[line.id]['total_landed_cost_so'] = total_landed_cost_so | ||
2632 | 72 | res[line.id]['amount_total_price_unit'] = total_price_unit | ||
2633 | 73 | res[line.id]['amount_total_discount'] = amount_total_discounts | ||
2634 | 74 | res[line.id]['amount_total_sale_order'] = amount_total_sale_order | ||
2635 | 75 | res[line.id]['profit_po'] = res[line.id]['amount_total_sale_order'] - (res[line.id]['total_landed_cost_so'] + res[line.id]['amount_total_price_unit'] + res[line.id]['amount_total_discount'] + res[line.id]['amount_landing_cost']) | ||
2636 | 76 | return res | ||
2637 | 77 | |||
2638 | 78 | |||
2639 | 79 | _columns = { | ||
2640 | 80 | 'profit_po': fields.function( | ||
2641 | 81 | get_profit_all, | ||
2642 | 82 | digits_compute=dp.get_precision('Account'), | ||
2643 | 83 | string='Profit', multi='all'), | ||
2644 | 84 | 'amount_total_discount': fields.function( | ||
2645 | 85 | get_profit_all, | ||
2646 | 86 | digits_compute=dp.get_precision('Account'), | ||
2647 | 87 | string='Total amount discount', multi='all'), | ||
2648 | 88 | 'amount_landing_cost': fields.function( | ||
2649 | 89 | get_profit_all, | ||
2650 | 90 | digits_compute=dp.get_precision('Account'), | ||
2651 | 91 | string='Total amount landing cost', multi='all'), | ||
2652 | 92 | 'amount_total_price_unit': fields.function( | ||
2653 | 93 | get_profit_all, | ||
2654 | 94 | digits_compute=dp.get_precision('Account'), | ||
2655 | 95 | string='Total amount price unit', multi='all'), | ||
2656 | 96 | 'amount_total_sale_order': fields.function( | ||
2657 | 97 | get_profit_all, | ||
2658 | 98 | digits_compute=dp.get_precision('Account'), | ||
2659 | 99 | string='Total amount sale order', multi='all'), | ||
2660 | 100 | 'total_landed_cost_so': fields.function( | ||
2661 | 101 | get_profit_all, | ||
2662 | 102 | digits_compute=dp.get_precision('Account'), | ||
2663 | 103 | string='Total amount landing cost sale order', multi='all'), | ||
2664 | 104 | } | ||
2665 | 105 | |||
2666 | 106 | |||
2667 | 0 | 107 | ||
2668 | === added file 'purchase_gains/purchase.pyc' | |||
2669 | 1 | Binary files purchase_gains/purchase.pyc 1970-01-01 00:00:00 +0000 and purchase_gains/purchase.pyc 2014-08-27 19:22:25 +0000 differ | 108 | Binary files purchase_gains/purchase.pyc 1970-01-01 00:00:00 +0000 and purchase_gains/purchase.pyc 2014-08-27 19:22:25 +0000 differ |
2670 | === added file 'purchase_gains/purchase_report.xml' | |||
2671 | --- purchase_gains/purchase_report.xml 1970-01-01 00:00:00 +0000 | |||
2672 | +++ purchase_gains/purchase_report.xml 2014-08-27 19:22:25 +0000 | |||
2673 | @@ -0,0 +1,9 @@ | |||
2674 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
2675 | 2 | <openerp> | ||
2676 | 3 | <data> | ||
2677 | 4 | <report auto="False" id="report_purchase_order_gains" model="purchase.order" | ||
2678 | 5 | name="purchase.order.gains" rml="purchase_gains/report/order.rml" | ||
2679 | 6 | usage="default" string="Purchase Order gains"/> | ||
2680 | 7 | |||
2681 | 8 | </data> | ||
2682 | 9 | </openerp> | ||
2683 | 0 | \ No newline at end of file | 10 | \ No newline at end of file |
2684 | 1 | 11 | ||
2685 | === added file 'purchase_gains/purchase_view.xml' | |||
2686 | --- purchase_gains/purchase_view.xml 1970-01-01 00:00:00 +0000 | |||
2687 | +++ purchase_gains/purchase_view.xml 2014-08-27 19:22:25 +0000 | |||
2688 | @@ -0,0 +1,14 @@ | |||
2689 | 1 | <openerp> | ||
2690 | 2 | <data> | ||
2691 | 3 | <record id="purchase_order_tree_inherit44" model="ir.ui.view"> | ||
2692 | 4 | <field name="name">purchase.order.tree.inherit44</field> | ||
2693 | 5 | <field name="model">purchase.order</field> | ||
2694 | 6 | <field name="inherit_id" ref="purchase.purchase_order_tree"></field> | ||
2695 | 7 | <field name="arch" type="xml"> | ||
2696 | 8 | <field name="state" position="after"> | ||
2697 | 9 | <field name="profit_po"></field> | ||
2698 | 10 | </field> | ||
2699 | 11 | </field> | ||
2700 | 12 | </record> | ||
2701 | 13 | </data> | ||
2702 | 14 | </openerp> | ||
2703 | 0 | 15 | ||
2704 | === added directory 'purchase_gains/report' | |||
2705 | === added file 'purchase_gains/report/__init__.py' | |||
2706 | --- purchase_gains/report/__init__.py 1970-01-01 00:00:00 +0000 | |||
2707 | +++ purchase_gains/report/__init__.py 2014-08-27 19:22:25 +0000 | |||
2708 | @@ -0,0 +1,24 @@ | |||
2709 | 1 | # -*- coding: utf-8 -*- | ||
2710 | 2 | ############################################################################## | ||
2711 | 3 | # | ||
2712 | 4 | # OpenERP, Open Source Management Solution | ||
2713 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
2714 | 6 | # | ||
2715 | 7 | # This program is free software: you can redistribute it and/or modify | ||
2716 | 8 | # it under the terms of the GNU Affero General Public License as | ||
2717 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
2718 | 10 | # License, or (at your option) any later version. | ||
2719 | 11 | # | ||
2720 | 12 | # This program is distributed in the hope that it will be useful, | ||
2721 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2722 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2723 | 15 | # GNU Affero General Public License for more details. | ||
2724 | 16 | # | ||
2725 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
2726 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2727 | 19 | # | ||
2728 | 20 | ############################################################################## | ||
2729 | 21 | |||
2730 | 22 | import order | ||
2731 | 23 | |||
2732 | 24 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
2733 | 0 | \ No newline at end of file | 25 | \ No newline at end of file |
2734 | 1 | 26 | ||
2735 | === added file 'purchase_gains/report/order.py' | |||
2736 | --- purchase_gains/report/order.py 1970-01-01 00:00:00 +0000 | |||
2737 | +++ purchase_gains/report/order.py 2014-08-27 19:22:25 +0000 | |||
2738 | @@ -0,0 +1,35 @@ | |||
2739 | 1 | # -*- coding: utf-8 -*- | ||
2740 | 2 | ############################################################################## | ||
2741 | 3 | # | ||
2742 | 4 | # OpenERP, Open Source Management Solution | ||
2743 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
2744 | 6 | # | ||
2745 | 7 | # This program is free software: you can redistribute it and/or modify | ||
2746 | 8 | # it under the terms of the GNU Affero General Public License as | ||
2747 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
2748 | 10 | # License, or (at your option) any later version. | ||
2749 | 11 | # | ||
2750 | 12 | # This program is distributed in the hope that it will be useful, | ||
2751 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2752 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2753 | 15 | # GNU Affero General Public License for more details. | ||
2754 | 16 | # | ||
2755 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
2756 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2757 | 19 | # | ||
2758 | 20 | ############################################################################## | ||
2759 | 21 | |||
2760 | 22 | import time | ||
2761 | 23 | from openerp.report import report_sxw | ||
2762 | 24 | from openerp.osv import osv | ||
2763 | 25 | from openerp import pooler | ||
2764 | 26 | |||
2765 | 27 | class order(report_sxw.rml_parse): | ||
2766 | 28 | def __init__(self, cr, uid, name, context): | ||
2767 | 29 | super(order, self).__init__(cr, uid, name, context=context) | ||
2768 | 30 | self.localcontext.update({'time': time}) | ||
2769 | 31 | |||
2770 | 32 | report_sxw.report_sxw('report.purchase.order.gains','purchase.order','addons/purchase_gains/report/order.rml',parser=order) | ||
2771 | 33 | |||
2772 | 34 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
2773 | 35 | |||
2774 | 0 | 36 | ||
2775 | === added file 'purchase_gains/report/order.rml' | |||
2776 | --- purchase_gains/report/order.rml 1970-01-01 00:00:00 +0000 | |||
2777 | +++ purchase_gains/report/order.rml 2014-08-27 19:22:25 +0000 | |||
2778 | @@ -0,0 +1,172 @@ | |||
2779 | 1 | <?xml version="1.0"?> | ||
2780 | 2 | <document filename="Purchase Order.pdf"> | ||
2781 | 3 | <template title="Purchase Order" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20"> | ||
2782 | 4 | <pageTemplate id="first"> | ||
2783 | 5 | <frame id="first" x1="18.0" y1="42.0" width="535" height="758"/> | ||
2784 | 6 | </pageTemplate> | ||
2785 | 7 | </template> | ||
2786 | 8 | <stylesheet> | ||
2787 | 9 | <blockTableStyle id="Standard_Outline"> | ||
2788 | 10 | <blockAlignment value="LEFT"/> | ||
2789 | 11 | <blockValign value="TOP"/> | ||
2790 | 12 | </blockTableStyle> | ||
2791 | 13 | <blockTableStyle id="Tableau1"> | ||
2792 | 14 | <blockAlignment value="LEFT"/> | ||
2793 | 15 | <blockValign value="TOP"/> | ||
2794 | 16 | </blockTableStyle> | ||
2795 | 17 | <blockTableStyle id="Tableau2"> | ||
2796 | 18 | <blockAlignment value="LEFT"/> | ||
2797 | 19 | <blockValign value="TOP"/> | ||
2798 | 20 | </blockTableStyle> | ||
2799 | 21 | <blockTableStyle id="Header_Order_Reference_Tbl"> | ||
2800 | 22 | <blockAlignment value="LEFT"/> | ||
2801 | 23 | <blockValign value="TOP"/> | ||
2802 | 24 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
2803 | 25 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
2804 | 26 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2805 | 27 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
2806 | 28 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
2807 | 29 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2808 | 30 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> | ||
2809 | 31 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> | ||
2810 | 32 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
2811 | 33 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> | ||
2812 | 34 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/> | ||
2813 | 35 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> | ||
2814 | 36 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
2815 | 37 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/> | ||
2816 | 38 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/> | ||
2817 | 39 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
2818 | 40 | </blockTableStyle> | ||
2819 | 41 | <blockTableStyle id="Content_Order_Reference_Table"> | ||
2820 | 42 | <blockAlignment value="LEFT"/> | ||
2821 | 43 | <blockValign value="TOP"/> | ||
2822 | 44 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
2823 | 45 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
2824 | 46 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2825 | 47 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
2826 | 48 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
2827 | 49 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2828 | 50 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> | ||
2829 | 51 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> | ||
2830 | 52 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
2831 | 53 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> | ||
2832 | 54 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/> | ||
2833 | 55 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> | ||
2834 | 56 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
2835 | 57 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/> | ||
2836 | 58 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/> | ||
2837 | 59 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
2838 | 60 | </blockTableStyle> | ||
2839 | 61 | <blockTableStyle id="Table_Header_Pur_ord_Line"> | ||
2840 | 62 | <blockAlignment value="LEFT"/> | ||
2841 | 63 | <blockValign value="TOP"/> | ||
2842 | 64 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> | ||
2843 | 65 | <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> | ||
2844 | 66 | <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> | ||
2845 | 67 | <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> | ||
2846 | 68 | <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> | ||
2847 | 69 | <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> | ||
2848 | 70 | </blockTableStyle> | ||
2849 | 71 | <blockTableStyle id="Table_Order_Pur_line_Content"> | ||
2850 | 72 | <blockAlignment value="LEFT"/> | ||
2851 | 73 | <blockValign value="TOP"/> | ||
2852 | 74 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2853 | 75 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2854 | 76 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
2855 | 77 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
2856 | 78 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
2857 | 79 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
2858 | 80 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
2859 | 81 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
2860 | 82 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
2861 | 83 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
2862 | 84 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
2863 | 85 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
2864 | 86 | </blockTableStyle> | ||
2865 | 87 | <blockTableStyle id="Table_All_Total_Detail"> | ||
2866 | 88 | <blockAlignment value="LEFT"/> | ||
2867 | 89 | <blockValign value="TOP"/> | ||
2868 | 90 | <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/> | ||
2869 | 91 | <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> | ||
2870 | 92 | <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> | ||
2871 | 93 | <lineStyle kind="LINEABOVE" colorName="#000000" start="1,2" stop="1,2"/> | ||
2872 | 94 | <lineStyle kind="LINEABOVE" colorName="#000000" start="2,2" stop="2,2"/> | ||
2873 | 95 | </blockTableStyle> | ||
2874 | 96 | <blockTableStyle id="Table_Outer_Notes"> | ||
2875 | 97 | <blockAlignment value="LEFT"/> | ||
2876 | 98 | <blockValign value="TOP"/> | ||
2877 | 99 | </blockTableStyle> | ||
2878 | 100 | <initialize> | ||
2879 | 101 | <paraStyle name="all" alignment="justify"/> | ||
2880 | 102 | </initialize> | ||
2881 | 103 | <paraStyle name="terp_header" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> | ||
2882 | 104 | <paraStyle name="terp_tblheader_General" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
2883 | 105 | <paraStyle name="terp_default_8" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2884 | 106 | <paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> | ||
2885 | 107 | <paraStyle name="terp_tblheader_General_Right" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
2886 | 108 | <paraStyle name="terp_default_Centre_8" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2887 | 109 | <paraStyle name="terp_default_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2888 | 110 | <paraStyle name="terp_default_Bold_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2889 | 111 | <paraStyle name="terp_default_Right_9" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2890 | 112 | <paraStyle name="terp_default_Bold_9_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
2891 | 113 | <images/> | ||
2892 | 114 | </stylesheet> | ||
2893 | 115 | <story> | ||
2894 | 116 | <pto> | ||
2895 | 117 | <!--<para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>--> | ||
2896 | 118 | <para style="terp_default_9"> | ||
2897 | 119 | <font color="white"> </font> | ||
2898 | 120 | </para> | ||
2899 | 121 | <para style="terp_default_9"> | ||
2900 | 122 | <font color="white"> </font> | ||
2901 | 123 | </para> | ||
2902 | 124 | <para style="terp_header"><b>Purchase Order gains </b></para> | ||
2903 | 125 | <para style="terp_default_8"> | ||
2904 | 126 | <font color="white"> </font> | ||
2905 | 127 | </para> | ||
2906 | 128 | <blockTable colWidths="136.0,132.0,96.0,100.0,70.0" style="Header_Order_Reference_Tbl"> | ||
2907 | 129 | <tr> | ||
2908 | 130 | <td> | ||
2909 | 131 | <para style="terp_tblheader_General_Centre"><b>Our Order Reference</b></para> | ||
2910 | 132 | </td> | ||
2911 | 133 | <td> | ||
2912 | 134 | <para style="terp_tblheader_General_Centre"><b>Your Order Reference</b></para> | ||
2913 | 135 | </td> | ||
2914 | 136 | <td> | ||
2915 | 137 | <para style="terp_tblheader_General_Centre"><b>Order Date</b></para> | ||
2916 | 138 | </td> | ||
2917 | 139 | <td> | ||
2918 | 140 | <para style="terp_tblheader_General_Centre"><b>Validated By</b></para> | ||
2919 | 141 | </td> | ||
2920 | 142 | <td> | ||
2921 | 143 | <para style="terp_tblheader_General_Centre"><b>Profit</b></para> | ||
2922 | 144 | </td> | ||
2923 | 145 | </tr> | ||
2924 | 146 | </blockTable> | ||
2925 | 147 | <section> | ||
2926 | 148 | <para style="terp_default_8">[[repeatIn(objects,'o')]]</para> | ||
2927 | 149 | <blockTable colWidths="136.0,132.0,96.0,100.0,70.0" style="Content_Order_Reference_Table"> | ||
2928 | 150 | <tr> | ||
2929 | 151 | <td> | ||
2930 | 152 | <para style="terp_default_Centre_8">[[ o.name or '' ]]</para> | ||
2931 | 153 | </td> | ||
2932 | 154 | <td> | ||
2933 | 155 | <para style="terp_default_Centre_8">[[ o.partner_ref or '' ]]</para> | ||
2934 | 156 | </td> | ||
2935 | 157 | <td> | ||
2936 | 158 | <para style="terp_default_Centre_8">[[formatLang(o.date_order,date=True) ]]</para> | ||
2937 | 159 | </td> | ||
2938 | 160 | <td> | ||
2939 | 161 | <para style="terp_default_Centre_8">[[ (o.validator and o.validator.name) or '' ]]</para> | ||
2940 | 162 | </td> | ||
2941 | 163 | <td> | ||
2942 | 164 | <para style="terp_default_Centre_8">[[ formatLang(o.profit_po, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id ) ]]</para> | ||
2943 | 165 | <para style="terp_default_Centre_8"></para> | ||
2944 | 166 | </td> | ||
2945 | 167 | </tr> | ||
2946 | 168 | </blockTable> | ||
2947 | 169 | </section> | ||
2948 | 170 | </pto> | ||
2949 | 171 | </story> | ||
2950 | 172 | </document> | ||
2951 | 0 | 173 | ||
2952 | === added directory 'purchase_lot_tracking' | |||
2953 | === added file 'purchase_lot_tracking/README' | |||
2954 | === added file 'purchase_lot_tracking/__init__.py' | |||
2955 | --- purchase_lot_tracking/__init__.py 1970-01-01 00:00:00 +0000 | |||
2956 | +++ purchase_lot_tracking/__init__.py 2014-08-27 19:22:25 +0000 | |||
2957 | @@ -0,0 +1,28 @@ | |||
2958 | 1 | # -*- coding: utf-8 -*- | ||
2959 | 2 | ############################################################################## | ||
2960 | 3 | # | ||
2961 | 4 | # OpenERP, Open Source Management Solution | ||
2962 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
2963 | 6 | # | ||
2964 | 7 | # This program is free software: you can redistribute it and/or modify | ||
2965 | 8 | # it under the terms of the GNU Affero General Public License as | ||
2966 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
2967 | 10 | # License, or (at your option) any later version. | ||
2968 | 11 | # | ||
2969 | 12 | # This program is distributed in the hope that it will be useful, | ||
2970 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2971 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2972 | 15 | # GNU Affero General Public License for more details. | ||
2973 | 16 | # | ||
2974 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
2975 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2976 | 19 | # | ||
2977 | 20 | ############################################################################## | ||
2978 | 21 | |||
2979 | 22 | import purchase_lot_tracking | ||
2980 | 23 | import product | ||
2981 | 24 | import purchase | ||
2982 | 25 | import stock | ||
2983 | 26 | import wizard | ||
2984 | 27 | import account | ||
2985 | 28 | import sale | ||
2986 | 0 | 29 | ||
2987 | === added file 'purchase_lot_tracking/__openerp__.py' | |||
2988 | --- purchase_lot_tracking/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
2989 | +++ purchase_lot_tracking/__openerp__.py 2014-08-27 19:22:25 +0000 | |||
2990 | @@ -0,0 +1,52 @@ | |||
2991 | 1 | # -*- coding: utf-8 -*- | ||
2992 | 2 | ############################################################################## | ||
2993 | 3 | # | ||
2994 | 4 | # OpenERP, Open Source Management Solution | ||
2995 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
2996 | 6 | # | ||
2997 | 7 | # This program is free software: you can redistribute it and/or modify | ||
2998 | 8 | # it under the terms of the GNU Affero General Public License as | ||
2999 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
3000 | 10 | # License, or (at your option) any later version. | ||
3001 | 11 | # | ||
3002 | 12 | # This program is distributed in the hope that it will be useful, | ||
3003 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3004 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3005 | 15 | # GNU Affero General Public License for more details. | ||
3006 | 16 | # | ||
3007 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
3008 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3009 | 19 | # | ||
3010 | 20 | ############################################################################## | ||
3011 | 21 | |||
3012 | 22 | # NOTE: The name of the supplied field was initially "display_name", but it seems that OpenERP, | ||
3013 | 23 | # whenever it seems "name" in the field, returns the value for "name". Well... | ||
3014 | 24 | |||
3015 | 25 | { | ||
3016 | 26 | 'name': 'purchase_lot_tracking', | ||
3017 | 27 | 'version': '1.0', | ||
3018 | 28 | 'author': 'Savoir-faire Linux', | ||
3019 | 29 | 'website': 'http://www.savoirfairelinux.com', | ||
3020 | 30 | 'category': 'Generic Modules/Purchases', | ||
3021 | 31 | 'description': """ | ||
3022 | 32 | Lets you track expenses using product's lots numbers | ||
3023 | 33 | ==================================================== | ||
3024 | 34 | |||
3025 | 35 | This module lets you track expenses using a product's lot | ||
3026 | 36 | number. | ||
3027 | 37 | |||
3028 | 38 | If you create an analytic account for a product | ||
3029 | 39 | |||
3030 | 40 | |||
3031 | 41 | """, | ||
3032 | 42 | 'depends': ['base', 'purchase', 'purchase_landed_costs', 'analytic', 'sale'], | ||
3033 | 43 | 'data': [ | ||
3034 | 44 | 'purchase_lot_tracking_view.xml', | ||
3035 | 45 | 'purchase_workflow.xml', | ||
3036 | 46 | 'account_view.xml' | ||
3037 | 47 | ], | ||
3038 | 48 | 'demo': [], | ||
3039 | 49 | 'test': [], | ||
3040 | 50 | 'installable': True, | ||
3041 | 51 | 'active': False, | ||
3042 | 52 | } | ||
3043 | 0 | 53 | ||
3044 | === added file 'purchase_lot_tracking/account.py' | |||
3045 | --- purchase_lot_tracking/account.py 1970-01-01 00:00:00 +0000 | |||
3046 | +++ purchase_lot_tracking/account.py 2014-08-27 19:22:25 +0000 | |||
3047 | @@ -0,0 +1,88 @@ | |||
3048 | 1 | # -*- coding: utf-8 -*- | ||
3049 | 2 | ############################################################################## | ||
3050 | 3 | # | ||
3051 | 4 | # OpenERP, Open Source Management Solution | ||
3052 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
3053 | 6 | # | ||
3054 | 7 | # This program is free software: you can redistribute it and/or modify | ||
3055 | 8 | # it under the terms of the GNU Affero General Public License as | ||
3056 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
3057 | 10 | # License, or (at your option) any later version. | ||
3058 | 11 | # | ||
3059 | 12 | # This program is distributed in the hope that it will be useful, | ||
3060 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3061 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3062 | 15 | # GNU Affero General Public License for more details. | ||
3063 | 16 | # | ||
3064 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
3065 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3066 | 19 | # | ||
3067 | 20 | ############################################################################## | ||
3068 | 21 | |||
3069 | 22 | from openerp.osv import orm, fields | ||
3070 | 23 | import openerp.addons.decimal_precision as dp | ||
3071 | 24 | |||
3072 | 25 | class account_analytic_account(orm.Model): | ||
3073 | 26 | |||
3074 | 27 | _inherit = 'account.analytic.account' | ||
3075 | 28 | |||
3076 | 29 | def _calculate_total_in(self, cr, uid, ids, name, arg, context=None): | ||
3077 | 30 | res = {} | ||
3078 | 31 | |||
3079 | 32 | move_pool = self.pool.get('stock.move') | ||
3080 | 33 | |||
3081 | 34 | for account in self.browse(cr, uid, ids): | ||
3082 | 35 | res[account.id] = 0.0 | ||
3083 | 36 | total_moves = 0 | ||
3084 | 37 | production_pool = self.pool.get('stock.production.lot') | ||
3085 | 38 | lot_ids = production_pool.search(cr, uid, [('name', '=', account.name)]) | ||
3086 | 39 | |||
3087 | 40 | for lot in production_pool.browse(cr, uid, lot_ids): | ||
3088 | 41 | move_ids = move_pool.search( | ||
3089 | 42 | cr, uid, [('prodlot_id', '=', lot.id)]) | ||
3090 | 43 | for move in move_pool.browse(cr, uid, move_ids): | ||
3091 | 44 | |||
3092 | 45 | # Add in purchases, remove sales | ||
3093 | 46 | if move.type == 'in': | ||
3094 | 47 | total_moves += move.product_qty | ||
3095 | 48 | #else: | ||
3096 | 49 | # total_moves -= move.product_qty | ||
3097 | 50 | |||
3098 | 51 | total_moves = max(total_moves, 0) | ||
3099 | 52 | res[account.id] = total_moves | ||
3100 | 53 | |||
3101 | 54 | return res | ||
3102 | 55 | |||
3103 | 56 | def _calculate_tcu(self, cr, uid, ids, name, arg, context=None): | ||
3104 | 57 | res = {} | ||
3105 | 58 | for account in self.browse(cr, uid, ids): | ||
3106 | 59 | res[account.id] = 0.0 | ||
3107 | 60 | if account.total_in_qty > 0: | ||
3108 | 61 | res[account.id] = account.credit / account.total_in_qty | ||
3109 | 62 | return res | ||
3110 | 63 | |||
3111 | 64 | def _estimated_tcu(self, cr, uid, ids, name, arg, context=None): | ||
3112 | 65 | res = {} | ||
3113 | 66 | po_line_pool = self.pool.get('purchase.order.line') | ||
3114 | 67 | for line in self.browse(cr, uid, ids): | ||
3115 | 68 | if line.code.startswith('LOT'): | ||
3116 | 69 | po_line_ids = po_line_pool.search(cr, uid, [('account_analytic_id', '=', line.id)]) | ||
3117 | 70 | if po_line_ids: | ||
3118 | 71 | po_line_id = po_line_ids[0] | ||
3119 | 72 | po_line = po_line_pool.browse(cr, uid, po_line_id, context) | ||
3120 | 73 | if po_line.product_qty == 0: | ||
3121 | 74 | res[line.id] = 0 | ||
3122 | 75 | else: | ||
3123 | 76 | res[line.id] = po_line.landed_costs / po_line.product_qty | ||
3124 | 77 | else: | ||
3125 | 78 | res[line.id] = 0.0 | ||
3126 | 79 | else: | ||
3127 | 80 | res[line.id] = 0.0 | ||
3128 | 81 | return res | ||
3129 | 82 | |||
3130 | 83 | _columns = { | ||
3131 | 84 | 'purchase_order': fields.many2one('purchase.order', 'Purchase Order', help='Issuing Purchase Order'), | ||
3132 | 85 | 'total_cost_unit': fields.function(_calculate_tcu, string='Total Cost Unit', type='float'), | ||
3133 | 86 | 'estimated_tcu': fields.function(_estimated_tcu, string='Estimated Total Cost per Unit', type='float'), | ||
3134 | 87 | 'total_in_qty': fields.function(_calculate_total_in, string='Total Received Quantity', type='float'), | ||
3135 | 88 | } | ||
3136 | 0 | 89 | ||
3137 | === added file 'purchase_lot_tracking/account_view.xml' | |||
3138 | --- purchase_lot_tracking/account_view.xml 1970-01-01 00:00:00 +0000 | |||
3139 | +++ purchase_lot_tracking/account_view.xml 2014-08-27 19:22:25 +0000 | |||
3140 | @@ -0,0 +1,28 @@ | |||
3141 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
3142 | 2 | <openerp> | ||
3143 | 3 | <data> | ||
3144 | 4 | <record id="lot_total_cost_unit" model="ir.ui.view"> | ||
3145 | 5 | <field name="name">Total Cost Unit</field> | ||
3146 | 6 | <field name="model">account.analytic.account</field> | ||
3147 | 7 | <field name="inherit_id" ref="account.view_account_analytic_account_tree" /> | ||
3148 | 8 | <field name="arch" type="xml"> | ||
3149 | 9 | <field name="type" position="before"> | ||
3150 | 10 | <field name="total_in_qty" /> | ||
3151 | 11 | <field name="estimated_tcu" /> | ||
3152 | 12 | <field name="total_cost_unit"/> | ||
3153 | 13 | </field> | ||
3154 | 14 | </field> | ||
3155 | 15 | </record> | ||
3156 | 16 | |||
3157 | 17 | <record id="lot_purchase_order" model="ir.ui.view"> | ||
3158 | 18 | <field name="name">Purchase Order</field> | ||
3159 | 19 | <field name="model">account.analytic.account</field> | ||
3160 | 20 | <field name="inherit_id" ref="account.view_account_analytic_account_tree" /> | ||
3161 | 21 | <field name="arch" type="xml"> | ||
3162 | 22 | <field name="code" position="before"> | ||
3163 | 23 | <field name="purchase_order" /> | ||
3164 | 24 | </field> | ||
3165 | 25 | </field> | ||
3166 | 26 | </record> | ||
3167 | 27 | </data> | ||
3168 | 28 | </openerp> | ||
3169 | 0 | 29 | ||
3170 | === added directory 'purchase_lot_tracking/i18n' | |||
3171 | === added file 'purchase_lot_tracking/i18n/fr.po' | |||
3172 | --- purchase_lot_tracking/i18n/fr.po 1970-01-01 00:00:00 +0000 | |||
3173 | +++ purchase_lot_tracking/i18n/fr.po 2014-08-27 19:22:25 +0000 | |||
3174 | @@ -0,0 +1,109 @@ | |||
3175 | 1 | # Translation of OpenERP Server. | ||
3176 | 2 | # This file contains the translation of the following modules: | ||
3177 | 3 | # * purchase_lot_tracking | ||
3178 | 4 | # | ||
3179 | 5 | msgid "" | ||
3180 | 6 | msgstr "" | ||
3181 | 7 | "Project-Id-Version: OpenERP Server 7.0-20130811-231021\n" | ||
3182 | 8 | "Report-Msgid-Bugs-To: \n" | ||
3183 | 9 | "POT-Creation-Date: 2013-09-18 14:23+0000\n" | ||
3184 | 10 | "PO-Revision-Date: 2013-09-18 14:23+0000\n" | ||
3185 | 11 | "Last-Translator: Alexandre Boily <alexandre.boily@savoirfairelinux.com>\n" | ||
3186 | 12 | "Language-Team: Savoir-faire Linux\n" | ||
3187 | 13 | "MIME-Version: 1.0\n" | ||
3188 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
3189 | 15 | "Content-Transfer-Encoding: \n" | ||
3190 | 16 | "Plural-Forms: \n" | ||
3191 | 17 | |||
3192 | 18 | #. module: purchase_lot_tracking | ||
3193 | 19 | #: field:sale.order.line,average:0 | ||
3194 | 20 | msgid "Avg." | ||
3195 | 21 | msgstr "Moy." | ||
3196 | 22 | |||
3197 | 23 | #. module: purchase_lot_tracking | ||
3198 | 24 | #: model:ir.model,name:purchase_lot_tracking.model_product_category | ||
3199 | 25 | msgid "Product Category" | ||
3200 | 26 | msgstr "Catégorie de produit" | ||
3201 | 27 | |||
3202 | 28 | #. module: purchase_lot_tracking | ||
3203 | 29 | #: model:ir.model,name:purchase_lot_tracking.model_stock_invoice_onshipping | ||
3204 | 30 | msgid "Stock Invoice Onshipping" | ||
3205 | 31 | msgstr "Stock Invoice Onshipping" | ||
3206 | 32 | |||
3207 | 33 | #. module: purchase_lot_tracking | ||
3208 | 34 | #: field:sale.order.line,minimum:0 | ||
3209 | 35 | msgid "Min." | ||
3210 | 36 | msgstr "Min." | ||
3211 | 37 | |||
3212 | 38 | #. module: purchase_lot_tracking | ||
3213 | 39 | #: model:ir.model,name:purchase_lot_tracking.model_purchase_order_line | ||
3214 | 40 | msgid "Purchase Order Line" | ||
3215 | 41 | msgstr "Ligne de bon de commande" | ||
3216 | 42 | |||
3217 | 43 | #. module: purchase_lot_tracking | ||
3218 | 44 | #: model:ir.model,name:purchase_lot_tracking.model_stock_partial_picking_line | ||
3219 | 45 | msgid "stock.partial.picking.line" | ||
3220 | 46 | msgstr "stock.partial.picking.line" | ||
3221 | 47 | |||
3222 | 48 | #. module: purchase_lot_tracking | ||
3223 | 49 | #: field:product.category,account_id:0 | ||
3224 | 50 | #: field:product.product,account_id:0 | ||
3225 | 51 | msgid "Analytical Account" | ||
3226 | 52 | msgstr "Compte analytique" | ||
3227 | 53 | |||
3228 | 54 | #. module: purchase_lot_tracking | ||
3229 | 55 | #: model:ir.model,name:purchase_lot_tracking.model_product_product | ||
3230 | 56 | msgid "Product" | ||
3231 | 57 | msgstr "Produit" | ||
3232 | 58 | |||
3233 | 59 | #. module: purchase_lot_tracking | ||
3234 | 60 | #: model:ir.model,name:purchase_lot_tracking.model_account_analytic_account | ||
3235 | 61 | #: view:product.category:0 | ||
3236 | 62 | #: field:stock.production.lot,account_analytic_id:0 | ||
3237 | 63 | msgid "Analytic Account" | ||
3238 | 64 | msgstr "Compte analytique" | ||
3239 | 65 | |||
3240 | 66 | #. module: purchase_lot_tracking | ||
3241 | 67 | #: field:purchase.order.line,lot:0 | ||
3242 | 68 | msgid "Lot Number" | ||
3243 | 69 | msgstr "Numéro de lot" | ||
3244 | 70 | |||
3245 | 71 | #. module: purchase_lot_tracking | ||
3246 | 72 | #: model:ir.model,name:purchase_lot_tracking.model_stock_production_lot | ||
3247 | 73 | msgid "Serial Number" | ||
3248 | 74 | msgstr "Numéro de série" | ||
3249 | 75 | |||
3250 | 76 | #. module: purchase_lot_tracking | ||
3251 | 77 | #: field:sale.order.line,maximum:0 | ||
3252 | 78 | msgid "Max." | ||
3253 | 79 | msgstr "Max." | ||
3254 | 80 | |||
3255 | 81 | #. module: purchase_lot_tracking | ||
3256 | 82 | #: field:account.analytic.account,estimated_tcu:0 | ||
3257 | 83 | msgid "Estimated Total Cost per Unit" | ||
3258 | 84 | msgstr "Coût total estimé par unité" | ||
3259 | 85 | |||
3260 | 86 | #. module: purchase_lot_tracking | ||
3261 | 87 | #: model:ir.model,name:purchase_lot_tracking.model_account_invoice | ||
3262 | 88 | msgid "Invoice" | ||
3263 | 89 | msgstr "Facture" | ||
3264 | 90 | |||
3265 | 91 | #. module: purchase_lot_tracking | ||
3266 | 92 | #: field:account.analytic.account,total_cost_unit:0 | ||
3267 | 93 | msgid "Total Cost Unit" | ||
3268 | 94 | msgstr "Coût total unitaire" | ||
3269 | 95 | |||
3270 | 96 | #. module: purchase_lot_tracking | ||
3271 | 97 | #: model:ir.model,name:purchase_lot_tracking.model_purchase_order | ||
3272 | 98 | msgid "Purchase Order" | ||
3273 | 99 | msgstr "Bon de commande" | ||
3274 | 100 | |||
3275 | 101 | #. module: purchase_lot_tracking | ||
3276 | 102 | #: model:ir.model,name:purchase_lot_tracking.model_sale_order_line | ||
3277 | 103 | msgid "Sales Order Line" | ||
3278 | 104 | msgstr "Ligne de bon d'achat" | ||
3279 | 105 | |||
3280 | 106 | #. module: purchase_lot_tracking | ||
3281 | 107 | #: field:account.analytic.account,total_in_qty:0 | ||
3282 | 108 | msgid "Total Received Quantity" | ||
3283 | 109 | msgstr "Quantité reçue totale" | ||
3284 | 0 | 110 | ||
3285 | === added file 'purchase_lot_tracking/i18n/purchase_lot_tracking.pot' | |||
3286 | --- purchase_lot_tracking/i18n/purchase_lot_tracking.pot 1970-01-01 00:00:00 +0000 | |||
3287 | +++ purchase_lot_tracking/i18n/purchase_lot_tracking.pot 2014-08-27 19:22:25 +0000 | |||
3288 | @@ -0,0 +1,110 @@ | |||
3289 | 1 | # Translation of OpenERP Server. | ||
3290 | 2 | # This file contains the translation of the following modules: | ||
3291 | 3 | # * purchase_lot_tracking | ||
3292 | 4 | # | ||
3293 | 5 | msgid "" | ||
3294 | 6 | msgstr "" | ||
3295 | 7 | "Project-Id-Version: OpenERP Server 7.0-20130811-231021\n" | ||
3296 | 8 | "Report-Msgid-Bugs-To: \n" | ||
3297 | 9 | "POT-Creation-Date: 2013-09-18 14:23+0000\n" | ||
3298 | 10 | "PO-Revision-Date: 2013-09-18 14:23+0000\n" | ||
3299 | 11 | "Last-Translator: <>\n" | ||
3300 | 12 | "Language-Team: \n" | ||
3301 | 13 | "MIME-Version: 1.0\n" | ||
3302 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
3303 | 15 | "Content-Transfer-Encoding: \n" | ||
3304 | 16 | "Plural-Forms: \n" | ||
3305 | 17 | |||
3306 | 18 | #. module: purchase_lot_tracking | ||
3307 | 19 | #: field:sale.order.line,average:0 | ||
3308 | 20 | msgid "Avg." | ||
3309 | 21 | msgstr "" | ||
3310 | 22 | |||
3311 | 23 | #. module: purchase_lot_tracking | ||
3312 | 24 | #: model:ir.model,name:purchase_lot_tracking.model_product_category | ||
3313 | 25 | msgid "Product Category" | ||
3314 | 26 | msgstr "" | ||
3315 | 27 | |||
3316 | 28 | #. module: purchase_lot_tracking | ||
3317 | 29 | #: model:ir.model,name:purchase_lot_tracking.model_stock_invoice_onshipping | ||
3318 | 30 | msgid "Stock Invoice Onshipping" | ||
3319 | 31 | msgstr "" | ||
3320 | 32 | |||
3321 | 33 | #. module: purchase_lot_tracking | ||
3322 | 34 | #: field:sale.order.line,minimum:0 | ||
3323 | 35 | msgid "Min." | ||
3324 | 36 | msgstr "" | ||
3325 | 37 | |||
3326 | 38 | #. module: purchase_lot_tracking | ||
3327 | 39 | #: model:ir.model,name:purchase_lot_tracking.model_purchase_order_line | ||
3328 | 40 | msgid "Purchase Order Line" | ||
3329 | 41 | msgstr "" | ||
3330 | 42 | |||
3331 | 43 | #. module: purchase_lot_tracking | ||
3332 | 44 | #: model:ir.model,name:purchase_lot_tracking.model_stock_partial_picking_line | ||
3333 | 45 | msgid "stock.partial.picking.line" | ||
3334 | 46 | msgstr "" | ||
3335 | 47 | |||
3336 | 48 | #. module: purchase_lot_tracking | ||
3337 | 49 | #: field:product.category,account_id:0 | ||
3338 | 50 | #: field:product.product,account_id:0 | ||
3339 | 51 | msgid "Analytical Account" | ||
3340 | 52 | msgstr "" | ||
3341 | 53 | |||
3342 | 54 | #. module: purchase_lot_tracking | ||
3343 | 55 | #: model:ir.model,name:purchase_lot_tracking.model_product_product | ||
3344 | 56 | msgid "Product" | ||
3345 | 57 | msgstr "" | ||
3346 | 58 | |||
3347 | 59 | #. module: purchase_lot_tracking | ||
3348 | 60 | #: model:ir.model,name:purchase_lot_tracking.model_account_analytic_account | ||
3349 | 61 | #: view:product.category:0 | ||
3350 | 62 | #: field:stock.production.lot,account_analytic_id:0 | ||
3351 | 63 | msgid "Analytic Account" | ||
3352 | 64 | msgstr "" | ||
3353 | 65 | |||
3354 | 66 | #. module: purchase_lot_tracking | ||
3355 | 67 | #: field:purchase.order.line,lot:0 | ||
3356 | 68 | msgid "Lot Number" | ||
3357 | 69 | msgstr "" | ||
3358 | 70 | |||
3359 | 71 | #. module: purchase_lot_tracking | ||
3360 | 72 | #: model:ir.model,name:purchase_lot_tracking.model_stock_production_lot | ||
3361 | 73 | msgid "Serial Number" | ||
3362 | 74 | msgstr "" | ||
3363 | 75 | |||
3364 | 76 | #. module: purchase_lot_tracking | ||
3365 | 77 | #: field:sale.order.line,maximum:0 | ||
3366 | 78 | msgid "Max." | ||
3367 | 79 | msgstr "" | ||
3368 | 80 | |||
3369 | 81 | #. module: purchase_lot_tracking | ||
3370 | 82 | #: field:account.analytic.account,estimated_tcu:0 | ||
3371 | 83 | msgid "Estimated Total Cost per Unit" | ||
3372 | 84 | msgstr "" | ||
3373 | 85 | |||
3374 | 86 | #. module: purchase_lot_tracking | ||
3375 | 87 | #: model:ir.model,name:purchase_lot_tracking.model_account_invoice | ||
3376 | 88 | msgid "Invoice" | ||
3377 | 89 | msgstr "" | ||
3378 | 90 | |||
3379 | 91 | #. module: purchase_lot_tracking | ||
3380 | 92 | #: field:account.analytic.account,total_cost_unit:0 | ||
3381 | 93 | msgid "Total Cost Unit" | ||
3382 | 94 | msgstr "" | ||
3383 | 95 | |||
3384 | 96 | #. module: purchase_lot_tracking | ||
3385 | 97 | #: model:ir.model,name:purchase_lot_tracking.model_purchase_order | ||
3386 | 98 | msgid "Purchase Order" | ||
3387 | 99 | msgstr "" | ||
3388 | 100 | |||
3389 | 101 | #. module: purchase_lot_tracking | ||
3390 | 102 | #: model:ir.model,name:purchase_lot_tracking.model_sale_order_line | ||
3391 | 103 | msgid "Sales Order Line" | ||
3392 | 104 | msgstr "" | ||
3393 | 105 | |||
3394 | 106 | #. module: purchase_lot_tracking | ||
3395 | 107 | #: field:account.analytic.account,total_in_qty:0 | ||
3396 | 108 | msgid "Total Received Quantity" | ||
3397 | 109 | msgstr "" | ||
3398 | 110 | |||
3399 | 0 | 111 | ||
3400 | === added file 'purchase_lot_tracking/product.py' | |||
3401 | --- purchase_lot_tracking/product.py 1970-01-01 00:00:00 +0000 | |||
3402 | +++ purchase_lot_tracking/product.py 2014-08-27 19:22:25 +0000 | |||
3403 | @@ -0,0 +1,44 @@ | |||
3404 | 1 | # -*- coding: utf-8 -*- | ||
3405 | 2 | ############################################################################## | ||
3406 | 3 | # | ||
3407 | 4 | # OpenERP, Open Source Management Solution | ||
3408 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
3409 | 6 | # | ||
3410 | 7 | # This program is free software: you can redistribute it and/or modify | ||
3411 | 8 | # it under the terms of the GNU Affero General Public License as | ||
3412 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
3413 | 10 | # License, or (at your option) any later version. | ||
3414 | 11 | # | ||
3415 | 12 | # This program is distributed in the hope that it will be useful, | ||
3416 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3417 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3418 | 15 | # GNU Affero General Public License for more details. | ||
3419 | 16 | # | ||
3420 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
3421 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3422 | 19 | # | ||
3423 | 20 | ############################################################################## | ||
3424 | 21 | |||
3425 | 22 | from openerp.osv import orm, fields | ||
3426 | 23 | |||
3427 | 24 | class product_category(orm.Model): | ||
3428 | 25 | """ | ||
3429 | 26 | Adds an analytical account to a purchase category | ||
3430 | 27 | """ | ||
3431 | 28 | |||
3432 | 29 | _inherit = 'product.category' | ||
3433 | 30 | |||
3434 | 31 | _columns = { | ||
3435 | 32 | 'account_id': fields.many2one('account.analytic.account', 'Analytical Account', required=False) | ||
3436 | 33 | } | ||
3437 | 34 | |||
3438 | 35 | class product_product(orm.Model): | ||
3439 | 36 | """ | ||
3440 | 37 | Adds an analytical account to a purchase category | ||
3441 | 38 | """ | ||
3442 | 39 | |||
3443 | 40 | _inherit = 'product.product' | ||
3444 | 41 | |||
3445 | 42 | _columns = { | ||
3446 | 43 | 'account_id': fields.many2one('account.analytic.account', 'Analytical Account', required=False) | ||
3447 | 44 | } | ||
3448 | 0 | 45 | ||
3449 | === added file 'purchase_lot_tracking/purchase.py' | |||
3450 | --- purchase_lot_tracking/purchase.py 1970-01-01 00:00:00 +0000 | |||
3451 | +++ purchase_lot_tracking/purchase.py 2014-08-27 19:22:25 +0000 | |||
3452 | @@ -0,0 +1,265 @@ | |||
3453 | 1 | # -*- coding: utf-8 -*- | ||
3454 | 2 | ############################################################################## | ||
3455 | 3 | # | ||
3456 | 4 | # OpenERP, Open Source Management Solution | ||
3457 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
3458 | 6 | # | ||
3459 | 7 | # This program is free software: you can redistribute it and/or modify | ||
3460 | 8 | # it under the terms of the GNU Affero General Public License as | ||
3461 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
3462 | 10 | # License, or (at your option) any later version. | ||
3463 | 11 | # | ||
3464 | 12 | # This program is distributed in the hope that it will be useful, | ||
3465 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3466 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3467 | 15 | # GNU Affero General Public License for more details. | ||
3468 | 16 | # | ||
3469 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
3470 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3471 | 19 | # | ||
3472 | 20 | ############################################################################## | ||
3473 | 21 | |||
3474 | 22 | from openerp.osv import orm, fields | ||
3475 | 23 | from openerp import netsvc | ||
3476 | 24 | |||
3477 | 25 | |||
3478 | 26 | def assign_lot_number(pool, cr, uid, line_orders, context=None): | ||
3479 | 27 | """ | ||
3480 | 28 | Manages and tracks a lot number for this production line | ||
3481 | 29 | |||
3482 | 30 | Generates a lot number, a stock.production.lot and an analytic | ||
3483 | 31 | account for this purchase order line. | ||
3484 | 32 | """ | ||
3485 | 33 | stock_prod_lot_obj = pool.get('stock.production.lot') | ||
3486 | 34 | ir_sequence_obj = pool.get('ir.sequence') | ||
3487 | 35 | |||
3488 | 36 | for line_order in line_orders: | ||
3489 | 37 | order_id = line_order.order_id.id | ||
3490 | 38 | |||
3491 | 39 | lot_number = ir_sequence_obj.get(cr, uid, 'ls.lot') | ||
3492 | 40 | product = line_order.product_id | ||
3493 | 41 | |||
3494 | 42 | # Creates the analytic account | ||
3495 | 43 | account_id = _analytic_account_from_product(pool, | ||
3496 | 44 | cr, | ||
3497 | 45 | uid, | ||
3498 | 46 | order_id, | ||
3499 | 47 | product, | ||
3500 | 48 | lot_number, | ||
3501 | 49 | context=context) | ||
3502 | 50 | |||
3503 | 51 | # Creates the stock.production.line | ||
3504 | 52 | serial_number_data = { | ||
3505 | 53 | 'name': lot_number, | ||
3506 | 54 | 'product_id': product.id, | ||
3507 | 55 | 'account_analytic_id': account_id, | ||
3508 | 56 | } | ||
3509 | 57 | |||
3510 | 58 | serial_number_id = stock_prod_lot_obj.create(cr, uid, | ||
3511 | 59 | serial_number_data, | ||
3512 | 60 | context=context) | ||
3513 | 61 | |||
3514 | 62 | return serial_number_id, account_id | ||
3515 | 63 | |||
3516 | 64 | |||
3517 | 65 | def _analytic_account_from_product(pool, cr, uid, order_id, product, | ||
3518 | 66 | lot_number, context=None): | ||
3519 | 67 | """ | ||
3520 | 68 | Creates an analytic account for the lot number and places it | ||
3521 | 69 | as a children of the product's analytic account. | ||
3522 | 70 | |||
3523 | 71 | Assumes two variables in the context | ||
3524 | 72 | - product: parent product id | ||
3525 | 73 | - lot_number: lot_number to create analytic account for | ||
3526 | 74 | """ | ||
3527 | 75 | account_analytic_obj = pool.get('account.analytic.account') | ||
3528 | 76 | parent_account = product.account_id | ||
3529 | 77 | |||
3530 | 78 | account_values = { | ||
3531 | 79 | 'name': lot_number, | ||
3532 | 80 | 'complete_name': lot_number, | ||
3533 | 81 | 'purchase_order': order_id, | ||
3534 | 82 | 'code': lot_number, | ||
3535 | 83 | 'type': 'normal', | ||
3536 | 84 | 'parent_id': parent_account.id, | ||
3537 | 85 | 'balance': 0.0, | ||
3538 | 86 | 'debit': 0.0, | ||
3539 | 87 | 'credit': 0.0, | ||
3540 | 88 | 'quantity': 0.0, | ||
3541 | 89 | 'date_start': parent_account.date_start, | ||
3542 | 90 | 'date': parent_account.date, | ||
3543 | 91 | 'state': parent_account.state, | ||
3544 | 92 | } | ||
3545 | 93 | |||
3546 | 94 | if parent_account.currency_id: | ||
3547 | 95 | account_values['currency_id'] = parent_account.currency_id.id | ||
3548 | 96 | |||
3549 | 97 | analytic_account_id = account_analytic_obj.create(cr, uid, | ||
3550 | 98 | account_values, | ||
3551 | 99 | context=context) | ||
3552 | 100 | |||
3553 | 101 | return analytic_account_id | ||
3554 | 102 | |||
3555 | 103 | |||
3556 | 104 | class purchase_order_line(orm.Model): | ||
3557 | 105 | """ | ||
3558 | 106 | Adds an analytical account to a product | ||
3559 | 107 | """ | ||
3560 | 108 | |||
3561 | 109 | _inherit = 'purchase.order.line' | ||
3562 | 110 | |||
3563 | 111 | def must_be_tracked(self, cr, uid, ids): | ||
3564 | 112 | """ | ||
3565 | 113 | Determines if this purchase order line for this product must be tracked | ||
3566 | 114 | """ | ||
3567 | 115 | return True | ||
3568 | 116 | |||
3569 | 117 | |||
3570 | 118 | |||
3571 | 119 | |||
3572 | 120 | _columns = { | ||
3573 | 121 | 'lot': fields.char('Lot Number', size=64, required=False, | ||
3574 | 122 | translate=True), | ||
3575 | 123 | } | ||
3576 | 124 | |||
3577 | 125 | |||
3578 | 126 | class purchase_order(orm.Model): | ||
3579 | 127 | _inherit = "purchase.order" | ||
3580 | 128 | |||
3581 | 129 | def _create_pickings(self, cr, uid, order, order_lines, picking_id=False, | ||
3582 | 130 | context=None): | ||
3583 | 131 | if not picking_id: | ||
3584 | 132 | picking_id = self.pool.get('stock.picking').create( | ||
3585 | 133 | cr, uid, | ||
3586 | 134 | self._prepare_order_picking(cr, uid, order, context=context)) | ||
3587 | 135 | |||
3588 | 136 | todo_moves = [] | ||
3589 | 137 | stock_move = self.pool.get('stock.move') | ||
3590 | 138 | wf_service = netsvc.LocalService("workflow") | ||
3591 | 139 | |||
3592 | 140 | for order_line in order_lines: | ||
3593 | 141 | if not order_line.product_id: | ||
3594 | 142 | continue | ||
3595 | 143 | if order_line.product_id.type in ('product', 'consu'): | ||
3596 | 144 | move = stock_move.create( | ||
3597 | 145 | cr, uid, | ||
3598 | 146 | self._prepare_order_line_move(cr, uid, order, order_line, | ||
3599 | 147 | picking_id, context=context)) | ||
3600 | 148 | |||
3601 | 149 | if order_line.move_dest_id: | ||
3602 | 150 | order_line.move_dest_id.write( | ||
3603 | 151 | {'location_id': order.location_id.id}) | ||
3604 | 152 | |||
3605 | 153 | todo_moves.append(move) | ||
3606 | 154 | |||
3607 | 155 | stock_move.action_confirm(cr, uid, todo_moves) | ||
3608 | 156 | stock_move.force_assign(cr, uid, todo_moves) | ||
3609 | 157 | wf_service.trg_validate(uid, 'stock.picking', picking_id, | ||
3610 | 158 | 'button_confirm', cr) | ||
3611 | 159 | |||
3612 | 160 | res = [picking_id] | ||
3613 | 161 | pick_id = int(res[0]) | ||
3614 | 162 | |||
3615 | 163 | invoice_obj = self.pool.get('account.invoice') | ||
3616 | 164 | invoice_line_obj = self.pool.get('account.invoice.line') | ||
3617 | 165 | journal_obj = self.pool.get('account.journal') | ||
3618 | 166 | journal_ids = journal_obj.search( | ||
3619 | 167 | cr, uid, [('type', '=', 'purchase'), | ||
3620 | 168 | ('company_id', '=', order.company_id.id)], limit=1) | ||
3621 | 169 | |||
3622 | 170 | # Create the analytic account | ||
3623 | 171 | |||
3624 | 172 | stock_picking_id = self.pool.get('stock.picking.in').search(cr, uid, [ | ||
3625 | 173 | ('origin', 'like', order.name)]) | ||
3626 | 174 | stock_picking = \ | ||
3627 | 175 | self.pool.get('stock.picking.in').browse(cr, uid, | ||
3628 | 176 | stock_picking_id)[0] | ||
3629 | 177 | |||
3630 | 178 | all_lines_tracked = True | ||
3631 | 179 | total_pallets = 0.0 | ||
3632 | 180 | |||
3633 | 181 | for po_line in order.order_line: | ||
3634 | 182 | if not po_line.product_id.track_production: | ||
3635 | 183 | all_lines_tracked = False | ||
3636 | 184 | else: | ||
3637 | 185 | lot_number, account_id = assign_lot_number(self.pool, cr, uid, [po_line], context=context) | ||
3638 | 186 | matching_lines = [line for line in stock_picking.move_lines | ||
3639 | 187 | if line.product_qty == po_line.product_qty | ||
3640 | 188 | and line.product_id.id == po_line.product_id.id | ||
3641 | 189 | and not line.prodlot_id] | ||
3642 | 190 | if matching_lines: | ||
3643 | 191 | matching_lines[0].write({'prodlot_id': lot_number}) | ||
3644 | 192 | |||
3645 | 193 | po_line.write({'account_analytic_id': account_id}) | ||
3646 | 194 | po_line.refresh() | ||
3647 | 195 | stock_picking.refresh() | ||
3648 | 196 | |||
3649 | 197 | total_pallets += po_line.nb_pallets | ||
3650 | 198 | |||
3651 | 199 | for order_cost in order.landed_cost_line_ids: | ||
3652 | 200 | fiscal_position = False | ||
3653 | 201 | if order.partner_id.property_account_position: | ||
3654 | 202 | fiscal_position = order.partner_id.property_account_position.id | ||
3655 | 203 | |||
3656 | 204 | vals_inv = { | ||
3657 | 205 | 'partner_id': order_cost.partner_id.id, | ||
3658 | 206 | 'currency_id': order_cost.currency_id.id or order.company_id.currency_id.id, | ||
3659 | 207 | 'account_id': order_cost.partner_id.property_account_payable.id, | ||
3660 | 208 | 'type': 'in_invoice', | ||
3661 | 209 | 'origin': order.name, | ||
3662 | 210 | 'fiscal_position': fiscal_position, | ||
3663 | 211 | 'company_id': order.company_id.id, | ||
3664 | 212 | 'journal_id': len(journal_ids) and journal_ids[0] or False, | ||
3665 | 213 | } | ||
3666 | 214 | |||
3667 | 215 | inv_id = invoice_obj.create(cr, uid, vals_inv, context=None) | ||
3668 | 216 | |||
3669 | 217 | if all_lines_tracked: | ||
3670 | 218 | for po_line in order.order_line: | ||
3671 | 219 | factor = 0.0 | ||
3672 | 220 | |||
3673 | 221 | if order_cost.price_type == 'per_unit': | ||
3674 | 222 | factor = po_line.product_qty / po_line.order_id.quantity_total | ||
3675 | 223 | |||
3676 | 224 | elif order_cost.price_type == 'value': | ||
3677 | 225 | factor = po_line.price_subtotal / po_line.order_id.amount_total | ||
3678 | 226 | |||
3679 | 227 | elif order_cost.price_type == 'per_pallet': | ||
3680 | 228 | factor = po_line.nb_pallets / total_pallets | ||
3681 | 229 | |||
3682 | 230 | else: | ||
3683 | 231 | raise ValueError( | ||
3684 | 232 | 'Unknown price type (neither "per_unit", "value" nor "per_pallet")') | ||
3685 | 233 | |||
3686 | 234 | amount = order_cost.amount * factor | ||
3687 | 235 | vals_line = { | ||
3688 | 236 | 'product_id': order_cost.product_id.id, | ||
3689 | 237 | 'name': order_cost.product_id.name, | ||
3690 | 238 | 'account_id': self._get_product_account_expense_id( | ||
3691 | 239 | order_cost.product_id), | ||
3692 | 240 | 'partner_id': order_cost.partner_id.id, | ||
3693 | 241 | 'invoice_id': inv_id, | ||
3694 | 242 | 'origin': order.name, | ||
3695 | 243 | 'account_analytic_id': po_line.account_analytic_id.id, | ||
3696 | 244 | 'price_unit': amount, | ||
3697 | 245 | 'invoice_line_tax_id': [(6, 0, [x.id for x in | ||
3698 | 246 | order_cost.product_id.supplier_taxes_id])], | ||
3699 | 247 | } | ||
3700 | 248 | |||
3701 | 249 | invoice_line_obj.create(cr, uid, vals_line, context=None) | ||
3702 | 250 | else: | ||
3703 | 251 | vals_line = { | ||
3704 | 252 | 'product_id': order_cost.product_id.id, | ||
3705 | 253 | 'name': order_cost.product_id.name, | ||
3706 | 254 | 'account_id': self._get_product_account_expense_id( | ||
3707 | 255 | order_cost.product_id), | ||
3708 | 256 | 'partner_id': order_cost.partner_id.id, | ||
3709 | 257 | 'invoice_id': inv_id, | ||
3710 | 258 | 'price_unit': order_cost.amount, | ||
3711 | 259 | 'invoice_line_tax_id': [(6, 0, [x.id for x in | ||
3712 | 260 | order_cost.product_id.supplier_taxes_id])], | ||
3713 | 261 | } | ||
3714 | 262 | |||
3715 | 263 | invoice_line_obj.create(cr, uid, vals_line, context=None) | ||
3716 | 264 | |||
3717 | 265 | return res | ||
3718 | 0 | 266 | ||
3719 | === added file 'purchase_lot_tracking/purchase_lot_tracking.py' | |||
3720 | --- purchase_lot_tracking/purchase_lot_tracking.py 1970-01-01 00:00:00 +0000 | |||
3721 | +++ purchase_lot_tracking/purchase_lot_tracking.py 2014-08-27 19:22:25 +0000 | |||
3722 | @@ -0,0 +1,72 @@ | |||
3723 | 1 | # -*- coding: utf-8 -*- | ||
3724 | 2 | ############################################################################## | ||
3725 | 3 | # | ||
3726 | 4 | # OpenERP, Open Source Management Solution | ||
3727 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
3728 | 6 | # | ||
3729 | 7 | # This program is free software: you can redistribute it and/or modify | ||
3730 | 8 | # it under the terms of the GNU Affero General Public License as | ||
3731 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
3732 | 10 | # License, or (at your option) any later version. | ||
3733 | 11 | # | ||
3734 | 12 | # This program is distributed in the hope that it will be useful, | ||
3735 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3736 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3737 | 15 | # GNU Affero General Public License for more details. | ||
3738 | 16 | # | ||
3739 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
3740 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3741 | 19 | # | ||
3742 | 20 | ############################################################################## | ||
3743 | 21 | |||
3744 | 22 | from openerp.osv import orm, fields, osv | ||
3745 | 23 | from openerp import netsvc | ||
3746 | 24 | import openerp.addons.decimal_precision as dp | ||
3747 | 25 | |||
3748 | 26 | from datetime import datetime | ||
3749 | 27 | |||
3750 | 28 | |||
3751 | 29 | |||
3752 | 30 | |||
3753 | 31 | #class stock_partial_picking(orm.Model): | ||
3754 | 32 | |||
3755 | 33 | # _inherit = 'stock.picking.in' | ||
3756 | 34 | |||
3757 | 35 | # def action_process(self, cr, uid, ids, context=None): | ||
3758 | 36 | |||
3759 | 37 | # if context is None: | ||
3760 | 38 | # context = {} | ||
3761 | 39 | # """Open the partial picking wizard""" | ||
3762 | 40 | # context.update({ | ||
3763 | 41 | # 'active_model': self._name, | ||
3764 | 42 | # 'active_ids': ids, | ||
3765 | 43 | # 'active_id': len(ids) and ids[0] or False | ||
3766 | 44 | # }) | ||
3767 | 45 | # | ||
3768 | 46 | # for stock_picking in self.browse(cr, uid, ids): | ||
3769 | 47 | # import ipdb; ipdb.set_trace() | ||
3770 | 48 | # ref_po_id = self.pool.get('purchase.order').search(cr, uid, [('name', 'like', stock_picking.origin)]) | ||
3771 | 49 | # ref_po = self.pool.get('purchase.order').browse(cr, uid, ref_po_id)[0] | ||
3772 | 50 | # | ||
3773 | 51 | # for stock_picking_line in stock_picking.move_lines: | ||
3774 | 52 | # | ||
3775 | 53 | # matching_line = [po_line for po_line in ref_po.order_line if\ | ||
3776 | 54 | # po_line.product_qty == stock_picking_line.product_qty and \ | ||
3777 | 55 | # po_line.product_id.id == stock_picking_line.product_id.id][0] | ||
3778 | 56 | # | ||
3779 | 57 | ## matching_lot = self.pool.get('stock.production.lot').search(cr, uid, [('name', 'like', matching_line.lot)])[0] | ||
3780 | 58 | # | ||
3781 | 59 | # stock_picking_line.write({'prodlot_id': matching_lot}) | ||
3782 | 60 | # stock_picking_line.refresh() | ||
3783 | 61 | |||
3784 | 62 | |||
3785 | 63 | |||
3786 | 64 | # return { | ||
3787 | 65 | # 'view_type': 'form', | ||
3788 | 66 | # 'view_mode': 'form', | ||
3789 | 67 | # 'res_model': 'stock.partial.picking', | ||
3790 | 68 | # 'type': 'ir.actions.act_window', | ||
3791 | 69 | # 'target': 'new', | ||
3792 | 70 | # 'context': context, | ||
3793 | 71 | # 'nodestroy': True, | ||
3794 | 72 | # } | ||
3795 | 0 | 73 | ||
3796 | === added file 'purchase_lot_tracking/purchase_lot_tracking_view.xml' | |||
3797 | --- purchase_lot_tracking/purchase_lot_tracking_view.xml 1970-01-01 00:00:00 +0000 | |||
3798 | +++ purchase_lot_tracking/purchase_lot_tracking_view.xml 2014-08-27 19:22:25 +0000 | |||
3799 | @@ -0,0 +1,69 @@ | |||
3800 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
3801 | 2 | <openerp> | ||
3802 | 3 | <data> | ||
3803 | 4 | <record id="purchase_lot_tracking_product" model="ir.ui.view"> | ||
3804 | 5 | <field name="name">purchase_lot_tracking.product.view</field> | ||
3805 | 6 | <field name="model">product.product</field> | ||
3806 | 7 | <field name="inherit_id" ref="product.product_normal_form_view"/> | ||
3807 | 8 | <field name="arch" type="xml"> | ||
3808 | 9 | <field name="taxes_id" position="after"> | ||
3809 | 10 | <field name="account_id"/> | ||
3810 | 11 | </field> | ||
3811 | 12 | </field> | ||
3812 | 13 | </record> | ||
3813 | 14 | |||
3814 | 15 | <record id="purchase_lot_tracking_product_category" model="ir.ui.view"> | ||
3815 | 16 | <field name="name">purchase_lot_tracking.product_category.view</field> | ||
3816 | 17 | <field name="model">product.category</field> | ||
3817 | 18 | <field name="inherit_id" ref="product.product_category_form_view"/> | ||
3818 | 19 | <field name="arch" type="xml"> | ||
3819 | 20 | <field name="type" position="after"> | ||
3820 | 21 | <group name="analytic_account" string="Analytic Account" colspan="2"> | ||
3821 | 22 | <field name="account_id"/> | ||
3822 | 23 | </group> | ||
3823 | 24 | </field> | ||
3824 | 25 | </field> | ||
3825 | 26 | </record> | ||
3826 | 27 | |||
3827 | 28 | <record id="purchase_order_line_readonly_aa" model="ir.ui.view"> | ||
3828 | 29 | <field name="name">purchase.order.readonly.aa</field> | ||
3829 | 30 | <field name="model">purchase.order</field> | ||
3830 | 31 | <field name="inherit_id" ref="purchase.purchase_order_form" /> | ||
3831 | 32 | <field name="arch" type="xml"> | ||
3832 | 33 | <field name="account_analytic_id" position="replace"> | ||
3833 | 34 | <field | ||
3834 | 35 | name="account_analytic_id" | ||
3835 | 36 | colspan="2" | ||
3836 | 37 | groups="purchase.group_analytic_accounting" | ||
3837 | 38 | attrs="{'readonly': True}" /> | ||
3838 | 39 | </field> | ||
3839 | 40 | </field> | ||
3840 | 41 | </record> | ||
3841 | 42 | |||
3842 | 43 | <record id="purchase_lot_tracking_sale_order" model="ir.ui.view"> | ||
3843 | 44 | <field name="name">purchase_lot_tracking.sale.order.view</field> | ||
3844 | 45 | <field name="model">sale.order</field> | ||
3845 | 46 | <field name="inherit_id" ref="sale.view_order_form"/> | ||
3846 | 47 | <field name="arch" type="xml"> | ||
3847 | 48 | <xpath expr="/form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_unit']" position="before"> | ||
3848 | 49 | <field name="minimum" /> | ||
3849 | 50 | <field name="average" /> | ||
3850 | 51 | <field name="maximum" /> | ||
3851 | 52 | </xpath> | ||
3852 | 53 | </field> | ||
3853 | 54 | </record> | ||
3854 | 55 | |||
3855 | 56 | <!-- Sequence --> | ||
3856 | 57 | <record id="seq_type_lot" model="ir.sequence.type"> | ||
3857 | 58 | <field name="name">ls.lot</field> | ||
3858 | 59 | <field name="code">ls.lot</field> | ||
3859 | 60 | </record> | ||
3860 | 61 | |||
3861 | 62 | <record id="seq_lot" model="ir.sequence"> | ||
3862 | 63 | <field name="name">ls.lot</field> | ||
3863 | 64 | <field name="code">ls.lot</field> | ||
3864 | 65 | <field name="prefix">LOT</field> | ||
3865 | 66 | <field name="padding">6</field> | ||
3866 | 67 | </record> | ||
3867 | 68 | </data> | ||
3868 | 69 | </openerp> | ||
3869 | 0 | 70 | ||
3870 | === added file 'purchase_lot_tracking/purchase_workflow.xml' | |||
3871 | --- purchase_lot_tracking/purchase_workflow.xml 1970-01-01 00:00:00 +0000 | |||
3872 | +++ purchase_lot_tracking/purchase_workflow.xml 2014-08-27 19:22:25 +0000 | |||
3873 | @@ -0,0 +1,12 @@ | |||
3874 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
3875 | 2 | <openerp> | ||
3876 | 3 | <data> | ||
3877 | 4 | <record id="act_confirmed" model="workflow.activity"> | ||
3878 | 5 | <field name="wkf_id" ref="purchase.purchase_order"/> | ||
3879 | 6 | <field name="name">confirmed</field> | ||
3880 | 7 | <field name="split_mode">OR</field> | ||
3881 | 8 | <field name="kind">function</field> | ||
3882 | 9 | <field name="action">wkf_confirm_order()</field> | ||
3883 | 10 | </record> | ||
3884 | 11 | </data> | ||
3885 | 12 | </openerp> | ||
3886 | 0 | 13 | ||
3887 | === added file 'purchase_lot_tracking/sale.py' | |||
3888 | --- purchase_lot_tracking/sale.py 1970-01-01 00:00:00 +0000 | |||
3889 | +++ purchase_lot_tracking/sale.py 2014-08-27 19:22:25 +0000 | |||
3890 | @@ -0,0 +1,95 @@ | |||
3891 | 1 | # -*- coding: utf-8 -*- | ||
3892 | 2 | ############################################################################## | ||
3893 | 3 | # | ||
3894 | 4 | # OpenERP, Open Source Management Solution | ||
3895 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
3896 | 6 | # | ||
3897 | 7 | # This program is free software: you can redistribute it and/or modify | ||
3898 | 8 | # it under the terms of the GNU Affero General Public License as | ||
3899 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
3900 | 10 | # License, or (at your option) any later version. | ||
3901 | 11 | # | ||
3902 | 12 | # This program is distributed in the hope that it will be useful, | ||
3903 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3904 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3905 | 15 | # GNU Affero General Public License for more details. | ||
3906 | 16 | # | ||
3907 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
3908 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3909 | 19 | # | ||
3910 | 20 | ############################################################################## | ||
3911 | 21 | |||
3912 | 22 | from openerp.osv import orm, fields | ||
3913 | 23 | import logging | ||
3914 | 24 | |||
3915 | 25 | class sale(orm.Model): | ||
3916 | 26 | |||
3917 | 27 | _inherit = 'sale.order.line' | ||
3918 | 28 | _logger = logging.Logger(__name__) | ||
3919 | 29 | |||
3920 | 30 | def _minimum(self, cr, uid, ids, name, arg, context=None): | ||
3921 | 31 | res = {} | ||
3922 | 32 | |||
3923 | 33 | for order_line in self.browse(cr, uid, ids, context): | ||
3924 | 34 | account = order_line.product_id.account_id | ||
3925 | 35 | minimum = 0.0 | ||
3926 | 36 | |||
3927 | 37 | if account: | ||
3928 | 38 | values = [lot.estimated_tcu for lot in account.child_ids | ||
3929 | 39 | if lot.total_in_qty != 0] | ||
3930 | 40 | |||
3931 | 41 | if values: | ||
3932 | 42 | minimum = min(values) | ||
3933 | 43 | |||
3934 | 44 | res[order_line.id] = minimum | ||
3935 | 45 | |||
3936 | 46 | return res | ||
3937 | 47 | |||
3938 | 48 | def _average(self, cr, uid, ids, name, arg, context=None): | ||
3939 | 49 | res = {} | ||
3940 | 50 | |||
3941 | 51 | for order_line in self.browse(cr, uid, ids, context): | ||
3942 | 52 | account = order_line.product_id.account_id | ||
3943 | 53 | average = 0.0 | ||
3944 | 54 | |||
3945 | 55 | total_count = 0 | ||
3946 | 56 | |||
3947 | 57 | if account: | ||
3948 | 58 | for lot in account.child_ids: | ||
3949 | 59 | quantity = lot.total_in_qty | ||
3950 | 60 | tcu = lot.estimated_tcu | ||
3951 | 61 | |||
3952 | 62 | if quantity != 0: | ||
3953 | 63 | average += quantity * tcu | ||
3954 | 64 | total_count += quantity | ||
3955 | 65 | |||
3956 | 66 | if total_count == 0: | ||
3957 | 67 | res[order_line.id] = 0 | ||
3958 | 68 | else: | ||
3959 | 69 | res[order_line.id] = average / total_count | ||
3960 | 70 | |||
3961 | 71 | return res | ||
3962 | 72 | |||
3963 | 73 | def _maximum(self, cr, uid, ids, name, arg, context=None): | ||
3964 | 74 | res = {} | ||
3965 | 75 | |||
3966 | 76 | for order_line in self.browse(cr, uid, ids, context): | ||
3967 | 77 | account = order_line.product_id.account_id | ||
3968 | 78 | maximum = 0.0 | ||
3969 | 79 | |||
3970 | 80 | if account: | ||
3971 | 81 | values = [lot.estimated_tcu for lot in account.child_ids | ||
3972 | 82 | if lot.total_in_qty != 0] | ||
3973 | 83 | |||
3974 | 84 | if values: | ||
3975 | 85 | maximum = max(values) | ||
3976 | 86 | |||
3977 | 87 | res[order_line.id] = maximum | ||
3978 | 88 | |||
3979 | 89 | return res | ||
3980 | 90 | |||
3981 | 91 | _columns = { | ||
3982 | 92 | 'minimum': fields.function(_minimum, string='Min.', type='float'), | ||
3983 | 93 | 'average': fields.function(_average, string='Avg.', type='float'), | ||
3984 | 94 | 'maximum': fields.function(_maximum, string='Max.', type='float') | ||
3985 | 95 | } | ||
3986 | 0 | 96 | ||
3987 | === added file 'purchase_lot_tracking/stock.py' | |||
3988 | --- purchase_lot_tracking/stock.py 1970-01-01 00:00:00 +0000 | |||
3989 | +++ purchase_lot_tracking/stock.py 2014-08-27 19:22:25 +0000 | |||
3990 | @@ -0,0 +1,141 @@ | |||
3991 | 1 | # -*- coding: utf-8 -*- | ||
3992 | 2 | ############################################################################## | ||
3993 | 3 | # | ||
3994 | 4 | # OpenERP, Open Source Management Solution | ||
3995 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
3996 | 6 | # | ||
3997 | 7 | # This program is free software: you can redistribute it and/or modify | ||
3998 | 8 | # it under the terms of the GNU Affero General Public License as | ||
3999 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
4000 | 10 | # License, or (at your option) any later version. | ||
4001 | 11 | # | ||
4002 | 12 | # This program is distributed in the hope that it will be useful, | ||
4003 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
4004 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
4005 | 15 | # GNU Affero General Public License for more details. | ||
4006 | 16 | # | ||
4007 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
4008 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4009 | 19 | # | ||
4010 | 20 | ############################################################################## | ||
4011 | 21 | |||
4012 | 22 | from openerp.osv import orm, fields | ||
4013 | 23 | from openerp.tools.translate import _ | ||
4014 | 24 | |||
4015 | 25 | class stock_production_lot(orm.Model): | ||
4016 | 26 | |||
4017 | 27 | _inherit = 'stock.production.lot' | ||
4018 | 28 | |||
4019 | 29 | _columns = { | ||
4020 | 30 | 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', required=False) | ||
4021 | 31 | } | ||
4022 | 32 | |||
4023 | 33 | |||
4024 | 34 | class stock_invoice_onshipping(orm.TransientModel): | ||
4025 | 35 | |||
4026 | 36 | _inherit = 'stock.invoice.onshipping' | ||
4027 | 37 | |||
4028 | 38 | def retrieve_move_lines(self, cr, uid, ids, context=None): | ||
4029 | 39 | """Retrieves all different move lines from the stock picking | ||
4030 | 40 | """ | ||
4031 | 41 | move_lines = [] | ||
4032 | 42 | for pick in self.pool.get('stock.picking').browse(cr, uid, | ||
4033 | 43 | context['active_ids'], | ||
4034 | 44 | context=context): | ||
4035 | 45 | move_lines += pick.move_lines | ||
4036 | 46 | |||
4037 | 47 | return move_lines | ||
4038 | 48 | |||
4039 | 49 | def _retrieve_invoice_lines(self, cr, uid, ids, context=None): | ||
4040 | 50 | """Retrieves invoice lines of a newly created invoice | ||
4041 | 51 | |||
4042 | 52 | expects invoice_id to be passed in context | ||
4043 | 53 | """ | ||
4044 | 54 | invoice = self.pool.get('account.invoice')\ | ||
4045 | 55 | .browse(cr,uid, context['invoice_id']) | ||
4046 | 56 | return invoice.invoice_line | ||
4047 | 57 | |||
4048 | 58 | def _find_matching_move_line(self, invoice_line, move_lines): | ||
4049 | 59 | """Finds the matching invoice line in the move lines list | ||
4050 | 60 | |||
4051 | 61 | It is considered matching if they have the same product quantity | ||
4052 | 62 | and the same product id. | ||
4053 | 63 | """ | ||
4054 | 64 | matching_move_lines = [line for line in move_lines if | ||
4055 | 65 | line.product_qty == invoice_line.quantity and | ||
4056 | 66 | line.product_id.id == invoice_line.product_id.id] | ||
4057 | 67 | |||
4058 | 68 | if matching_move_lines: | ||
4059 | 69 | return matching_move_lines[0] | ||
4060 | 70 | return None | ||
4061 | 71 | |||
4062 | 72 | def create_invoice(self, cr, uid, ids, context=None): | ||
4063 | 73 | """ | ||
4064 | 74 | Creates an invoice when the delivery lots are confirmed | ||
4065 | 75 | |||
4066 | 76 | Iterates through all the lines of the invoice to specify | ||
4067 | 77 | the proper analytic_account | ||
4068 | 78 | """ | ||
4069 | 79 | prod_lot_pool = self.pool.get('stock.production.lot') | ||
4070 | 80 | # creates the invoice properly | ||
4071 | 81 | res = super(stock_invoice_onshipping, self)\ | ||
4072 | 82 | .create_invoice(cr, uid, ids, context=context) | ||
4073 | 83 | |||
4074 | 84 | context['invoice_id'] = res.values()[0] | ||
4075 | 85 | |||
4076 | 86 | # retrieve move lines of stock pickings | ||
4077 | 87 | move_lines = self.retrieve_move_lines(cr, uid, ids, context=context) | ||
4078 | 88 | |||
4079 | 89 | # retrieve invoice lines of newly create invoice | ||
4080 | 90 | invoice_lines = self._retrieve_invoice_lines(cr, uid, ids, | ||
4081 | 91 | context=context) | ||
4082 | 92 | |||
4083 | 93 | # first iteration, check if matching | ||
4084 | 94 | lst_match = [] | ||
4085 | 95 | for invoice_line in invoice_lines: | ||
4086 | 96 | # don't add service to analytic account | ||
4087 | 97 | if invoice_line.product_id.type == u'service': | ||
4088 | 98 | continue | ||
4089 | 99 | matching_move_line = self._find_matching_move_line(invoice_line, | ||
4090 | 100 | move_lines) | ||
4091 | 101 | name = invoice_line.name | ||
4092 | 102 | if not matching_move_line: | ||
4093 | 103 | msg = _("The item %s is not in stock picking." % name) | ||
4094 | 104 | raise orm.except_orm(_("Missed line!"), msg) | ||
4095 | 105 | |||
4096 | 106 | # search account analytic | ||
4097 | 107 | prod_lot_id = matching_move_line.prodlot_id | ||
4098 | 108 | if not prod_lot_id: | ||
4099 | 109 | msg = _("The item '%s' missed 'prodlot_id' on associated move \ | ||
4100 | 110 | item, origin %s." % (name, matching_move_line.origin)) | ||
4101 | 111 | raise orm.except_orm(_("Missed Serial Number!"), msg) | ||
4102 | 112 | |||
4103 | 113 | matching_prod_lot = prod_lot_pool.browse(cr, uid, prod_lot_id.id) | ||
4104 | 114 | matching_account = matching_prod_lot.account_analytic_id.id | ||
4105 | 115 | |||
4106 | 116 | lst_match.append((invoice_line, matching_account)) | ||
4107 | 117 | |||
4108 | 118 | # transaction | ||
4109 | 119 | for invoice_line, matching_account in lst_match: | ||
4110 | 120 | invoice_line.write({'account_analytic_id': matching_account}) | ||
4111 | 121 | |||
4112 | 122 | return res | ||
4113 | 123 | |||
4114 | 124 | |||
4115 | 125 | class stock_picking_out(orm.Model): | ||
4116 | 126 | |||
4117 | 127 | _inherit = 'stock.picking.out' | ||
4118 | 128 | |||
4119 | 129 | def action_process(self, cr, uid, ids, context={}): | ||
4120 | 130 | '''Check if tracked products have their lot number specified''' | ||
4121 | 131 | |||
4122 | 132 | picking = self.browse(cr, uid, ids, context=context)[0] | ||
4123 | 133 | |||
4124 | 134 | for line in picking.move_lines: | ||
4125 | 135 | if line.product_id.track_production and not line.prodlot_id.id: | ||
4126 | 136 | message = ' '.join([ | ||
4127 | 137 | _('Please specify a lot number for all products of type:'), | ||
4128 | 138 | line.product_id.name_template]) | ||
4129 | 139 | raise orm.except_orm(_('Missing lot number'), message) | ||
4130 | 140 | |||
4131 | 141 | return super(stock_picking_out, self).action_process(cr, uid, ids, context) | ||
4132 | 0 | 142 | ||
4133 | === added directory 'purchase_lot_tracking/wizard' | |||
4134 | === added file 'purchase_lot_tracking/wizard/__init__.py' | |||
4135 | --- purchase_lot_tracking/wizard/__init__.py 1970-01-01 00:00:00 +0000 | |||
4136 | +++ purchase_lot_tracking/wizard/__init__.py 2014-08-27 19:22:25 +0000 | |||
4137 | @@ -0,0 +1,1 @@ | |||
4138 | 1 | import stock_partial_picking | ||
4139 | 0 | 2 | ||
4140 | === added file 'purchase_lot_tracking/wizard/stock_partial_picking.py' | |||
4141 | --- purchase_lot_tracking/wizard/stock_partial_picking.py 1970-01-01 00:00:00 +0000 | |||
4142 | +++ purchase_lot_tracking/wizard/stock_partial_picking.py 2014-08-27 19:22:25 +0000 | |||
4143 | @@ -0,0 +1,53 @@ | |||
4144 | 1 | # -*- coding: utf-8 -*- | ||
4145 | 2 | ############################################################################## | ||
4146 | 3 | # | ||
4147 | 4 | # OpenERP, Open Source Management Solution | ||
4148 | 5 | # Copyright (C) 2004-TODAY OpenERP SA (<http://openerp.com>). | ||
4149 | 6 | # | ||
4150 | 7 | # This program is free software: you can redistribute it and/or modify | ||
4151 | 8 | # it under the terms of the GNU Affero General Public License as | ||
4152 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
4153 | 10 | # License, or (at your option) any later version. | ||
4154 | 11 | # | ||
4155 | 12 | # This program is distributed in the hope that it will be useful, | ||
4156 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
4157 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
4158 | 15 | # GNU Affero General Public License for more details. | ||
4159 | 16 | # | ||
4160 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
4161 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4162 | 19 | # | ||
4163 | 20 | ############################################################################## | ||
4164 | 21 | |||
4165 | 22 | import time | ||
4166 | 23 | from lxml import etree | ||
4167 | 24 | from openerp.osv import fields, osv | ||
4168 | 25 | from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT | ||
4169 | 26 | from openerp.tools.float_utils import float_compare | ||
4170 | 27 | import openerp.addons.decimal_precision as dp | ||
4171 | 28 | from openerp.tools.translate import _ | ||
4172 | 29 | |||
4173 | 30 | class stock_partial_picking_line(osv.TransientModel): | ||
4174 | 31 | |||
4175 | 32 | def _tracking(self, cursor, user, ids, name, arg, context=None): | ||
4176 | 33 | res = {} | ||
4177 | 34 | for tracklot in self.browse(cursor, user, ids, context=context): | ||
4178 | 35 | tracking = False | ||
4179 | 36 | if (tracklot.move_id.picking_id.type == 'in' and tracklot.product_id.track_incoming == True) or \ | ||
4180 | 37 | (tracklot.move_id.picking_id.type == 'out' and tracklot.product_id.track_outgoing == True): | ||
4181 | 38 | tracking = True | ||
4182 | 39 | res[tracklot.id] = tracking | ||
4183 | 40 | return res | ||
4184 | 41 | |||
4185 | 42 | _inherit = "stock.partial.picking.line" | ||
4186 | 43 | |||
4187 | 44 | def onchange_product_id(self, cr, uid, ids, product_id, context=None): | ||
4188 | 45 | |||
4189 | 46 | raise Exception() | ||
4190 | 47 | |||
4191 | 48 | uom_id = False | ||
4192 | 49 | if product_id: | ||
4193 | 50 | product = self.pool.get('product.product').browse(cr, uid, product_id, context=context) | ||
4194 | 51 | uom_id = product.uom_id.id | ||
4195 | 52 | return {'value': {'product_uom': uom_id}} | ||
4196 | 53 | |||
4197 | 0 | 54 | ||
4198 | === added directory 'purchase_order_pick_up_date' | |||
4199 | === added file 'purchase_order_pick_up_date/__init__.py' | |||
4200 | --- purchase_order_pick_up_date/__init__.py 1970-01-01 00:00:00 +0000 | |||
4201 | +++ purchase_order_pick_up_date/__init__.py 2014-08-27 19:22:25 +0000 | |||
4202 | @@ -0,0 +1,22 @@ | |||
4203 | 1 | # -*- coding: utf-8 -*- | ||
4204 | 2 | ############################################################################## | ||
4205 | 3 | # | ||
4206 | 4 | # OpenERP, Open Source Management Solution | ||
4207 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
4208 | 6 | # | ||
4209 | 7 | # This program is free software: you can redistribute it and/or modify | ||
4210 | 8 | # it under the terms of the GNU Affero General Public License as | ||
4211 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
4212 | 10 | # License, or (at your option) any later version. | ||
4213 | 11 | # | ||
4214 | 12 | # This program is distributed in the hope that it will be useful, | ||
4215 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
4216 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
4217 | 15 | # GNU Affero General Public License for more details. | ||
4218 | 16 | # | ||
4219 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
4220 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4221 | 19 | # | ||
4222 | 20 | ############################################################################## | ||
4223 | 21 | |||
4224 | 22 | import purchase | ||
4225 | 0 | 23 | ||
4226 | === added file 'purchase_order_pick_up_date/__openerp__.py' | |||
4227 | --- purchase_order_pick_up_date/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
4228 | +++ purchase_order_pick_up_date/__openerp__.py 2014-08-27 19:22:25 +0000 | |||
4229 | @@ -0,0 +1,44 @@ | |||
4230 | 1 | # -*- coding: utf-8 -*- | ||
4231 | 2 | ############################################################################## | ||
4232 | 3 | # | ||
4233 | 4 | # OpenERP, Open Source Management Solution | ||
4234 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
4235 | 6 | # | ||
4236 | 7 | # This program is free software: you can redistribute it and/or modify | ||
4237 | 8 | # it under the terms of the GNU Affero General Public License as | ||
4238 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
4239 | 10 | # License, or (at your option) any later version. | ||
4240 | 11 | # | ||
4241 | 12 | # This program is distributed in the hope that it will be useful, | ||
4242 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
4243 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
4244 | 15 | # GNU Affero General Public License for more details. | ||
4245 | 16 | # | ||
4246 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
4247 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4248 | 19 | # | ||
4249 | 20 | ############################################################################## | ||
4250 | 21 | |||
4251 | 22 | { | ||
4252 | 23 | 'name': 'Purchase Order Pick Up Date', | ||
4253 | 24 | 'version': '0.1', | ||
4254 | 25 | 'author': 'Savoir-faire Linux', | ||
4255 | 26 | 'maintainer': 'Savoir-faire Linux', | ||
4256 | 27 | 'website': 'http://www.savoirfairelinux.com', | ||
4257 | 28 | 'category': 'purchase', | ||
4258 | 29 | 'description': """ | ||
4259 | 30 | Add a field for a purchase pick up date | ||
4260 | 31 | ======================================= | ||
4261 | 32 | |||
4262 | 33 | This module lets you specify a scheduled pick up date for a purchase order. | ||
4263 | 34 | """, | ||
4264 | 35 | 'depends': ['base', 'purchase'], | ||
4265 | 36 | 'data': [ | ||
4266 | 37 | 'purchase_order_pick_up_date_report.xml', | ||
4267 | 38 | 'purchase_order_pick_up_date_view.xml', | ||
4268 | 39 | ], | ||
4269 | 40 | 'demo': [], | ||
4270 | 41 | 'test': [], | ||
4271 | 42 | 'installable': True, | ||
4272 | 43 | 'active': False, | ||
4273 | 44 | } | ||
4274 | 0 | 45 | ||
4275 | === added directory 'purchase_order_pick_up_date/i18n' | |||
4276 | === added file 'purchase_order_pick_up_date/i18n/fr.po' | |||
4277 | --- purchase_order_pick_up_date/i18n/fr.po 1970-01-01 00:00:00 +0000 | |||
4278 | +++ purchase_order_pick_up_date/i18n/fr.po 2014-08-27 19:22:25 +0000 | |||
4279 | @@ -0,0 +1,31 @@ | |||
4280 | 1 | # Translation of OpenERP Server. | ||
4281 | 2 | # This file contains the translation of the following modules: | ||
4282 | 3 | # * purchase_order_pick_up_date | ||
4283 | 4 | # | ||
4284 | 5 | msgid "" | ||
4285 | 6 | msgstr "" | ||
4286 | 7 | "Project-Id-Version: OpenERP Server 7.0-20130811-231021\n" | ||
4287 | 8 | "Report-Msgid-Bugs-To: \n" | ||
4288 | 9 | "POT-Creation-Date: 2013-09-18 14:24+0000\n" | ||
4289 | 10 | "PO-Revision-Date: 2013-09-18 14:24+0000\n" | ||
4290 | 11 | "Last-Translator: Alexandre Boily <alexandre.boily@savoirfairelinux.com>\n" | ||
4291 | 12 | "Language-Team: Savoir-faire Linux\n" | ||
4292 | 13 | "MIME-Version: 1.0\n" | ||
4293 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
4294 | 15 | "Content-Transfer-Encoding: \n" | ||
4295 | 16 | "Plural-Forms: \n" | ||
4296 | 17 | |||
4297 | 18 | #. module: purchase_order_pick_up_date | ||
4298 | 19 | #: help:purchase.order,date_pick_up:0 | ||
4299 | 20 | msgid "Scheduled date where the purchase will arrive at one of your warehouses" | ||
4300 | 21 | msgstr "Date prévue à laquelle l'achat arrivera à l'un de vos entrepôts" | ||
4301 | 22 | |||
4302 | 23 | #. module: purchase_order_pick_up_date | ||
4303 | 24 | #: field:purchase.order,date_pick_up:0 | ||
4304 | 25 | msgid "Pick Up Date" | ||
4305 | 26 | msgstr "Date de pick up" | ||
4306 | 27 | |||
4307 | 28 | #. module: purchase_order_pick_up_date | ||
4308 | 29 | #: model:ir.model,name:purchase_order_pick_up_date.model_purchase_order | ||
4309 | 30 | msgid "Purchase Order" | ||
4310 | 31 | msgstr "Bon de commande" | ||
4311 | 0 | 32 | ||
4312 | === added file 'purchase_order_pick_up_date/i18n/purchase_order_pick_up_date.pot' | |||
4313 | --- purchase_order_pick_up_date/i18n/purchase_order_pick_up_date.pot 1970-01-01 00:00:00 +0000 | |||
4314 | +++ purchase_order_pick_up_date/i18n/purchase_order_pick_up_date.pot 2014-08-27 19:22:25 +0000 | |||
4315 | @@ -0,0 +1,32 @@ | |||
4316 | 1 | # Translation of OpenERP Server. | ||
4317 | 2 | # This file contains the translation of the following modules: | ||
4318 | 3 | # * purchase_order_pick_up_date | ||
4319 | 4 | # | ||
4320 | 5 | msgid "" | ||
4321 | 6 | msgstr "" | ||
4322 | 7 | "Project-Id-Version: OpenERP Server 7.0-20130811-231021\n" | ||
4323 | 8 | "Report-Msgid-Bugs-To: \n" | ||
4324 | 9 | "POT-Creation-Date: 2013-09-18 14:24+0000\n" | ||
4325 | 10 | "PO-Revision-Date: 2013-09-18 14:24+0000\n" | ||
4326 | 11 | "Last-Translator: <>\n" | ||
4327 | 12 | "Language-Team: \n" | ||
4328 | 13 | "MIME-Version: 1.0\n" | ||
4329 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
4330 | 15 | "Content-Transfer-Encoding: \n" | ||
4331 | 16 | "Plural-Forms: \n" | ||
4332 | 17 | |||
4333 | 18 | #. module: purchase_order_pick_up_date | ||
4334 | 19 | #: help:purchase.order,date_pick_up:0 | ||
4335 | 20 | msgid "Scheduled date where the purchase will arrive at one of your warehouses" | ||
4336 | 21 | msgstr "" | ||
4337 | 22 | |||
4338 | 23 | #. module: purchase_order_pick_up_date | ||
4339 | 24 | #: field:purchase.order,date_pick_up:0 | ||
4340 | 25 | msgid "Pick Up Date" | ||
4341 | 26 | msgstr "" | ||
4342 | 27 | |||
4343 | 28 | #. module: purchase_order_pick_up_date | ||
4344 | 29 | #: model:ir.model,name:purchase_order_pick_up_date.model_purchase_order | ||
4345 | 30 | msgid "Purchase Order" | ||
4346 | 31 | msgstr "" | ||
4347 | 32 | |||
4348 | 0 | 33 | ||
4349 | === added file 'purchase_order_pick_up_date/purchase.py' | |||
4350 | --- purchase_order_pick_up_date/purchase.py 1970-01-01 00:00:00 +0000 | |||
4351 | +++ purchase_order_pick_up_date/purchase.py 2014-08-27 19:22:25 +0000 | |||
4352 | @@ -0,0 +1,33 @@ | |||
4353 | 1 | # -*- coding: utf-8 -*- | ||
4354 | 2 | ############################################################################## | ||
4355 | 3 | # | ||
4356 | 4 | # OpenERP, Open Source Management Solution | ||
4357 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
4358 | 6 | # | ||
4359 | 7 | # This program is free software: you can redistribute it and/or modify | ||
4360 | 8 | # it under the terms of the GNU Affero General Public License as | ||
4361 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
4362 | 10 | # License, or (at your option) any later version. | ||
4363 | 11 | # | ||
4364 | 12 | # This program is distributed in the hope that it will be useful, | ||
4365 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
4366 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
4367 | 15 | # GNU Affero General Public License for more details. | ||
4368 | 16 | # | ||
4369 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
4370 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4371 | 19 | # | ||
4372 | 20 | ############################################################################## | ||
4373 | 21 | |||
4374 | 22 | from openerp.osv import orm, fields | ||
4375 | 23 | |||
4376 | 24 | class purchase_order(orm.Model): | ||
4377 | 25 | |||
4378 | 26 | _inherit = 'purchase.order' | ||
4379 | 27 | |||
4380 | 28 | _columns = { | ||
4381 | 29 | 'date_pick_up': | ||
4382 | 30 | fields.date( | ||
4383 | 31 | 'Pick Up Date', | ||
4384 | 32 | help='''Scheduled date where the purchase will arrive at one of your warehouses'''), | ||
4385 | 33 | } | ||
4386 | 0 | 34 | ||
4387 | === added file 'purchase_order_pick_up_date/purchase_order_pick_up_date_report.xml' | |||
4388 | --- purchase_order_pick_up_date/purchase_order_pick_up_date_report.xml 1970-01-01 00:00:00 +0000 | |||
4389 | +++ purchase_order_pick_up_date/purchase_order_pick_up_date_report.xml 2014-08-27 19:22:25 +0000 | |||
4390 | @@ -0,0 +1,21 @@ | |||
4391 | 1 | <?xml version="1.0" encoding="utf-8" ?> | ||
4392 | 2 | <openerp> | ||
4393 | 3 | <data> | ||
4394 | 4 | <report | ||
4395 | 5 | auto="False" | ||
4396 | 6 | id="purchase.report_purchase_quotation" | ||
4397 | 7 | model="purchase.order" | ||
4398 | 8 | name="purchase.quotation" | ||
4399 | 9 | rml="purchase_order_pick_up_date/report/request_quotation.rml" | ||
4400 | 10 | usage="default" | ||
4401 | 11 | string="Request for Quotation" /> | ||
4402 | 12 | |||
4403 | 13 | <report | ||
4404 | 14 | auto="False" | ||
4405 | 15 | id="purchase.report_purchase_order" | ||
4406 | 16 | model="purchase.order" | ||
4407 | 17 | name="purchase.order" | ||
4408 | 18 | rml="purchase_order_pick_up_date/report/order.rml" | ||
4409 | 19 | string="Purchase Order" /> | ||
4410 | 20 | </data> | ||
4411 | 21 | </openerp> | ||
4412 | 0 | 22 | ||
4413 | === added file 'purchase_order_pick_up_date/purchase_order_pick_up_date_view.xml' | |||
4414 | --- purchase_order_pick_up_date/purchase_order_pick_up_date_view.xml 1970-01-01 00:00:00 +0000 | |||
4415 | +++ purchase_order_pick_up_date/purchase_order_pick_up_date_view.xml 2014-08-27 19:22:25 +0000 | |||
4416 | @@ -0,0 +1,26 @@ | |||
4417 | 1 | <?xml version="1.0" encoding="utf-8" ?> | ||
4418 | 2 | <openerp> | ||
4419 | 3 | <data> | ||
4420 | 4 | <record id="purchase_order_pick_up_date_tree" model="ir.ui.view"> | ||
4421 | 5 | <field name="name">purchase.order.pick.tree</field> | ||
4422 | 6 | <field name="model">purchase.order</field> | ||
4423 | 7 | <field name="inherit_id" ref="purchase.purchase_order_tree" /> | ||
4424 | 8 | <field name="arch" type="xml"> | ||
4425 | 9 | <field name="minimum_planned_date" position="after"> | ||
4426 | 10 | <field name="date_pick_up" /> | ||
4427 | 11 | </field> | ||
4428 | 12 | </field> | ||
4429 | 13 | </record> | ||
4430 | 14 | |||
4431 | 15 | <record id="purchase_order_pick_up_date_form" model="ir.ui.view"> | ||
4432 | 16 | <field name="name">purchase.order.pick.form</field> | ||
4433 | 17 | <field name="model">purchase.order</field> | ||
4434 | 18 | <field name="inherit_id" ref="purchase.purchase_order_form" /> | ||
4435 | 19 | <field name="arch" type="xml"> | ||
4436 | 20 | <field name="date_order" position="after"> | ||
4437 | 21 | <field name="date_pick_up" /> | ||
4438 | 22 | </field> | ||
4439 | 23 | </field> | ||
4440 | 24 | </record> | ||
4441 | 25 | </data> | ||
4442 | 26 | </openerp> | ||
4443 | 0 | 27 | ||
4444 | === added directory 'purchase_order_pick_up_date/report' | |||
4445 | === added file 'purchase_order_pick_up_date/report/order.rml' | |||
4446 | --- purchase_order_pick_up_date/report/order.rml 1970-01-01 00:00:00 +0000 | |||
4447 | +++ purchase_order_pick_up_date/report/order.rml 2014-08-27 19:22:25 +0000 | |||
4448 | @@ -0,0 +1,335 @@ | |||
4449 | 1 | <?xml version="1.0" encoding="utf-8" ?> | ||
4450 | 2 | <document filename="Purchase Order.pdf"> | ||
4451 | 3 | <template title="Purchase Order" author="Savoir-faire Linux (support@savoirfairelinux.com)" allowSplitting="20"> | ||
4452 | 4 | <pageTemplate id="first"> | ||
4453 | 5 | <frame id="first" x1="18.0" y1="42.0" width="535" height="758"/> | ||
4454 | 6 | </pageTemplate> | ||
4455 | 7 | </template> | ||
4456 | 8 | <stylesheet> | ||
4457 | 9 | <blockTableStyle id="Standard_Outline"> | ||
4458 | 10 | <blockAlignment value="LEFT"/> | ||
4459 | 11 | <blockValign value="TOP"/> | ||
4460 | 12 | </blockTableStyle> | ||
4461 | 13 | <blockTableStyle id="Tableau1"> | ||
4462 | 14 | <blockAlignment value="LEFT"/> | ||
4463 | 15 | <blockValign value="TOP"/> | ||
4464 | 16 | </blockTableStyle> | ||
4465 | 17 | <blockTableStyle id="Tableau2"> | ||
4466 | 18 | <blockAlignment value="LEFT"/> | ||
4467 | 19 | <blockValign value="TOP"/> | ||
4468 | 20 | </blockTableStyle> | ||
4469 | 21 | <blockTableStyle id="Header_Order_Reference_Tbl"> | ||
4470 | 22 | <blockAlignment value="LEFT"/> | ||
4471 | 23 | <blockValign value="TOP"/> | ||
4472 | 24 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
4473 | 25 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
4474 | 26 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
4475 | 27 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
4476 | 28 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
4477 | 29 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
4478 | 30 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> | ||
4479 | 31 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> | ||
4480 | 32 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
4481 | 33 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> | ||
4482 | 34 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> | ||
4483 | 35 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
4484 | 36 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/> | ||
4485 | 37 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/> | ||
4486 | 38 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/> | ||
4487 | 39 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
4488 | 40 | </blockTableStyle> | ||
4489 | 41 | <blockTableStyle id="Content_Order_Reference_Table"> | ||
4490 | 42 | <blockAlignment value="LEFT"/> | ||
4491 | 43 | <blockValign value="TOP"/> | ||
4492 | 44 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/> | ||
4493 | 45 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/> | ||
4494 | 46 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
4495 | 47 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/> | ||
4496 | 48 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/> | ||
4497 | 49 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
4498 | 50 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/> | ||
4499 | 51 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/> | ||
4500 | 52 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
4501 | 53 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/> | ||
4502 | 54 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/> | ||
4503 | 55 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
4504 | 56 | <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/> | ||
4505 | 57 | <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/> | ||
4506 | 58 | <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/> | ||
4507 | 59 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
4508 | 60 | </blockTableStyle> | ||
4509 | 61 | <blockTableStyle id="Table_Header_Pur_ord_Line"> | ||
4510 | 62 | <blockAlignment value="LEFT"/> | ||
4511 | 63 | <blockValign value="TOP"/> | ||
4512 | 64 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> | ||
4513 | 65 | <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> | ||
4514 | 66 | <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> | ||
4515 | 67 | <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> | ||
4516 | 68 | <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> | ||
4517 | 69 | <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> | ||
4518 | 70 | </blockTableStyle> | ||
4519 | 71 | <blockTableStyle id="Table_Order_Pur_line_Content"> | ||
4520 | 72 | <blockAlignment value="LEFT"/> | ||
4521 | 73 | <blockValign value="TOP"/> | ||
4522 | 74 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
4523 | 75 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
4524 | 76 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
4525 | 77 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
4526 | 78 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
4527 | 79 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
4528 | 80 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
4529 | 81 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
4530 | 82 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
4531 | 83 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
4532 | 84 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
4533 | 85 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
4534 | 86 | </blockTableStyle> | ||
4535 | 87 | <blockTableStyle id="Table_All_Total_Detail"> | ||
4536 | 88 | <blockAlignment value="LEFT"/> | ||
4537 | 89 | <blockValign value="TOP"/> | ||
4538 | 90 | <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/> | ||
4539 | 91 | <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> | ||
4540 | 92 | <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> | ||
4541 | 93 | <lineStyle kind="LINEABOVE" colorName="#000000" start="1,2" stop="1,2"/> | ||
4542 | 94 | <lineStyle kind="LINEABOVE" colorName="#000000" start="2,2" stop="2,2"/> | ||
4543 | 95 | </blockTableStyle> | ||
4544 | 96 | <blockTableStyle id="Table_Outer_Notes"> | ||
4545 | 97 | <blockAlignment value="LEFT"/> | ||
4546 | 98 | <blockValign value="TOP"/> | ||
4547 | 99 | </blockTableStyle> | ||
4548 | 100 | <initialize> | ||
4549 | 101 | <paraStyle name="all" alignment="justify"/> | ||
4550 | 102 | </initialize> | ||
4551 | 103 | <paraStyle name="terp_header" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> | ||
4552 | 104 | <paraStyle name="terp_tblheader_General" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
4553 | 105 | <paraStyle name="terp_default_8" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4554 | 106 | <paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> | ||
4555 | 107 | <paraStyle name="terp_tblheader_General_Right" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
4556 | 108 | <paraStyle name="terp_default_Centre_8" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4557 | 109 | <paraStyle name="terp_default_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4558 | 110 | <paraStyle name="terp_default_Bold_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4559 | 111 | <paraStyle name="terp_default_Right_9" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4560 | 112 | <paraStyle name="terp_default_Bold_9_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4561 | 113 | <images/> | ||
4562 | 114 | </stylesheet> | ||
4563 | 115 | <story> | ||
4564 | 116 | <pto> | ||
4565 | 117 | <para style="terp_default_8">[[repeatIn(objects,'o')]]</para> | ||
4566 | 118 | <para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para> | ||
4567 | 119 | <pto_header> | ||
4568 | 120 | <blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line"> | ||
4569 | 121 | <tr> | ||
4570 | 122 | <td> | ||
4571 | 123 | <para style="terp_tblheader_General"><b>Description</b></para> | ||
4572 | 124 | </td> | ||
4573 | 125 | <td> | ||
4574 | 126 | <para style="terp_tblheader_General"><b>Taxes</b></para> | ||
4575 | 127 | </td> | ||
4576 | 128 | <td> | ||
4577 | 129 | <para style="terp_tblheader_General"><b>Date Req.</b></para> | ||
4578 | 130 | </td> | ||
4579 | 131 | <td> | ||
4580 | 132 | <para style="terp_tblheader_General_Right"><b>Qty</b></para> | ||
4581 | 133 | </td> | ||
4582 | 134 | <td> | ||
4583 | 135 | <para style="terp_tblheader_General_Right"><b>Unit Price</b></para> | ||
4584 | 136 | </td> | ||
4585 | 137 | <td> | ||
4586 | 138 | <para style="terp_tblheader_General_Right"><b>Net Price</b></para> | ||
4587 | 139 | </td> | ||
4588 | 140 | </tr> | ||
4589 | 141 | </blockTable> | ||
4590 | 142 | </pto_header> | ||
4591 | 143 | <para style="terp_default_9"> | ||
4592 | 144 | <font color="white"> </font> | ||
4593 | 145 | </para> | ||
4594 | 146 | <blockTable colWidths="253.0,59.0,223.0" style="Tableau1"> | ||
4595 | 147 | <tr> | ||
4596 | 148 | <td> | ||
4597 | 149 | <blockTable colWidths="253.0" style="Tableau2"> | ||
4598 | 150 | <tr> | ||
4599 | 151 | <td> | ||
4600 | 152 | <para style="terp_default_Bold_9"><b>Shipping address :</b></para> | ||
4601 | 153 | <para style="terp_default_9">[[ (o.dest_address_id and o.dest_address_id.name) or (o.warehouse_id and o.warehouse_id.name) or '']]</para> | ||
4602 | 154 | <para style="terp_default_9">[[ (o.dest_address_id and display_address(o.dest_address_id)) or (o.warehouse_id and display_address(o.warehouse_id.partner_id)) or '']]</para> | ||
4603 | 155 | </td> | ||
4604 | 156 | </tr> | ||
4605 | 157 | </blockTable> | ||
4606 | 158 | <para style="terp_default_9"> | ||
4607 | 159 | <font color="white"> </font> | ||
4608 | 160 | </para> | ||
4609 | 161 | </td> | ||
4610 | 162 | <td> | ||
4611 | 163 | <para style="terp_default_9"> | ||
4612 | 164 | <font color="white"> </font> | ||
4613 | 165 | </para> | ||
4614 | 166 | </td> | ||
4615 | 167 | <td> | ||
4616 | 168 | <para style="terp_default_9">[[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]]</para> | ||
4617 | 169 | <para style="terp_default_9">[[ o.partner_id and display_address(o.partner_id) ]] </para> | ||
4618 | 170 | <para style="terp_default_9"> | ||
4619 | 171 | <font color="white"> </font> | ||
4620 | 172 | </para> | ||
4621 | 173 | <para style="terp_default_9">Tel : [[ (o.partner_id.phone) or removeParentNode('para') ]]</para> | ||
4622 | 174 | <para style="terp_default_9">Fax : [[ (o.partner_id.fax) or removeParentNode('para') ]]</para> | ||
4623 | 175 | <para style="terp_default_9">TIN : [[ (o.partner_id.vat) or removeParentNode('para') ]]</para> | ||
4624 | 176 | </td> | ||
4625 | 177 | </tr> | ||
4626 | 178 | </blockTable> | ||
4627 | 179 | <para style="terp_default_9"> | ||
4628 | 180 | <font color="white"> </font> | ||
4629 | 181 | </para> | ||
4630 | 182 | <para style="terp_header"><b>[[ o.state=='draft' and removeParentNode('para') ]] Purchase Order Confirmation N° [[ o.name ]]</b></para> | ||
4631 | 183 | <para style="terp_header"><b>[[ o.state<>'draft' and removeParentNode('para') ]] Request for Quotation N° [[ o.name ]]</b></para> | ||
4632 | 184 | <para style="terp_default_8"> | ||
4633 | 185 | <font color="white"> </font> | ||
4634 | 186 | </para> | ||
4635 | 187 | <blockTable colWidths="106.8,106.8,106.8,106.8,106.8" style="Header_Order_Reference_Tbl"> | ||
4636 | 188 | <tr> | ||
4637 | 189 | <td> | ||
4638 | 190 | <para style="terp_tblheader_General_Centre"><b>Our Order Reference</b></para> | ||
4639 | 191 | </td> | ||
4640 | 192 | <td> | ||
4641 | 193 | <para style="terp_tblheader_General_Centre"><b>Your Order Reference</b></para> | ||
4642 | 194 | </td> | ||
4643 | 195 | <td> | ||
4644 | 196 | <para style="terp_tblheader_General_Centre"><b>Order Date</b></para> | ||
4645 | 197 | </td> | ||
4646 | 198 | |||
4647 | 199 | <td> | ||
4648 | 200 | <para style="terp_tblheader_General_Centre"><b>Pick Up Date</b></para> | ||
4649 | 201 | </td> | ||
4650 | 202 | |||
4651 | 203 | <td> | ||
4652 | 204 | <para style="terp_tblheader_General_Centre"><b>Validated By</b></para> | ||
4653 | 205 | </td> | ||
4654 | 206 | </tr> | ||
4655 | 207 | </blockTable> | ||
4656 | 208 | <blockTable colWidths="106.8,106.8,106.8,106.8,106.8" style="Content_Order_Reference_Table"> | ||
4657 | 209 | <tr> | ||
4658 | 210 | <td> | ||
4659 | 211 | <para style="terp_default_Centre_8">[[ o.name or '' ]]</para> | ||
4660 | 212 | </td> | ||
4661 | 213 | <td> | ||
4662 | 214 | <para style="terp_default_Centre_8">[[ o.partner_ref or '' ]]</para> | ||
4663 | 215 | </td> | ||
4664 | 216 | <td> | ||
4665 | 217 | <para style="terp_default_Centre_8">[[formatLang(o.date_order,date=True) ]]</para> | ||
4666 | 218 | </td> | ||
4667 | 219 | |||
4668 | 220 | <td> | ||
4669 | 221 | <para style="terp_default_Centre_8">[[ formatLang(o.date_pick_up, date=True) ]]</para> | ||
4670 | 222 | </td> | ||
4671 | 223 | |||
4672 | 224 | <td> | ||
4673 | 225 | <para style="terp_default_Centre_8">[[ (o.validator and o.validator.name) or '' ]]</para> | ||
4674 | 226 | </td> | ||
4675 | 227 | </tr> | ||
4676 | 228 | </blockTable> | ||
4677 | 229 | <para style="terp_default_9"> | ||
4678 | 230 | <font color="white"> </font> | ||
4679 | 231 | </para> | ||
4680 | 232 | <blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" repeatRows="1" style="Table_Header_Pur_ord_Line"> | ||
4681 | 233 | <tr> | ||
4682 | 234 | <td> | ||
4683 | 235 | <para style="terp_tblheader_General"><b>Description</b></para> | ||
4684 | 236 | </td> | ||
4685 | 237 | <td> | ||
4686 | 238 | <para style="terp_tblheader_General"><b>Taxes</b></para> | ||
4687 | 239 | </td> | ||
4688 | 240 | <td> | ||
4689 | 241 | <para style="terp_tblheader_General"><b>Date Req.</b></para> | ||
4690 | 242 | </td> | ||
4691 | 243 | <td> | ||
4692 | 244 | <para style="terp_tblheader_General_Right"><b>Qty</b></para> | ||
4693 | 245 | </td> | ||
4694 | 246 | <td> | ||
4695 | 247 | <para style="terp_tblheader_General_Right"><b>Unit Price</b></para> | ||
4696 | 248 | </td> | ||
4697 | 249 | <td> | ||
4698 | 250 | <para style="terp_tblheader_General_Right"><b>Net Price</b></para> | ||
4699 | 251 | </td> | ||
4700 | 252 | </tr> | ||
4701 | 253 | </blockTable> | ||
4702 | 254 | <section> | ||
4703 | 255 | <para style="terp_default_8">[[repeatIn(o.order_line,'line')]]</para> | ||
4704 | 256 | <blockTable colWidths="180.0,70.0,60.0,80.0,60.0,85.0" style="Table_Order_Pur_line_Content"> | ||
4705 | 257 | <tr> | ||
4706 | 258 | <td> | ||
4707 | 259 | <para style="terp_default_9">[[ line.name ]]</para> | ||
4708 | 260 | </td> | ||
4709 | 261 | <td> | ||
4710 | 262 | <para style="terp_default_9">[[ ', '.join(map(lambda x: x.name, line.taxes_id)) ]]</para> | ||
4711 | 263 | </td> | ||
4712 | 264 | <td> | ||
4713 | 265 | <para style="terp_default_9">[[ formatLang( line.date_planned, date=True) ]]</para> | ||
4714 | 266 | </td> | ||
4715 | 267 | <td> | ||
4716 | 268 | <para style="terp_default_Right_9">[[ formatLang(line.product_qty ) ]] [[ line.product_uom.name ]] </para> | ||
4717 | 269 | </td> | ||
4718 | 270 | <td> | ||
4719 | 271 | <para style="terp_default_Right_9">[[ formatLang(line.price_unit, digits=get_digits(dp='Product Price') ) ]]</para> | ||
4720 | 272 | </td> | ||
4721 | 273 | <td> | ||
4722 | 274 | <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id ) ]]</para> | ||
4723 | 275 | </td> | ||
4724 | 276 | </tr> | ||
4725 | 277 | </blockTable> | ||
4726 | 278 | </section> | ||
4727 | 279 | <blockTable colWidths="375.0,60.0,100.0" style="Table_All_Total_Detail"> | ||
4728 | 280 | <tr> | ||
4729 | 281 | <td> | ||
4730 | 282 | <para style="terp_default_9"> | ||
4731 | 283 | <font color="white"> </font> | ||
4732 | 284 | </para> | ||
4733 | 285 | </td> | ||
4734 | 286 | <td> | ||
4735 | 287 | <para style="terp_default_9">Net Total :</para> | ||
4736 | 288 | </td> | ||
4737 | 289 | <td> | ||
4738 | 290 | <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id ) ]]</para> | ||
4739 | 291 | </td> | ||
4740 | 292 | </tr> | ||
4741 | 293 | <tr> | ||
4742 | 294 | <td> | ||
4743 | 295 | <para style="terp_default_9"> | ||
4744 | 296 | <font color="white"> </font> | ||
4745 | 297 | </para> | ||
4746 | 298 | </td> | ||
4747 | 299 | <td> | ||
4748 | 300 | <para style="terp_default_9">Taxes :</para> | ||
4749 | 301 | </td> | ||
4750 | 302 | <td> | ||
4751 | 303 | <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</para> | ||
4752 | 304 | </td> | ||
4753 | 305 | </tr> | ||
4754 | 306 | <tr> | ||
4755 | 307 | <td> | ||
4756 | 308 | <para style="terp_default_9"> | ||
4757 | 309 | <font color="white"> </font> | ||
4758 | 310 | </para> | ||
4759 | 311 | </td> | ||
4760 | 312 | <td> | ||
4761 | 313 | <para style="terp_default_Bold_9"><b>Total :</b></para> | ||
4762 | 314 | </td> | ||
4763 | 315 | <td> | ||
4764 | 316 | <para style="terp_default_Bold_9_Right"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account') , currency_obj=o.pricelist_id.currency_id) ]]</b></para> | ||
4765 | 317 | </td> | ||
4766 | 318 | </tr> | ||
4767 | 319 | </blockTable> | ||
4768 | 320 | <para style="terp_default_8"> | ||
4769 | 321 | <font color="white"> </font> | ||
4770 | 322 | </para> | ||
4771 | 323 | <blockTable colWidths="535.0" style="Table_Outer_Notes"> | ||
4772 | 324 | <tr> | ||
4773 | 325 | <td> | ||
4774 | 326 | <para style="terp_default_9">[[ format(o.notes or '') ]]</para> | ||
4775 | 327 | </td> | ||
4776 | 328 | </tr> | ||
4777 | 329 | </blockTable> | ||
4778 | 330 | <para style="terp_default_9"> | ||
4779 | 331 | <font color="white"> </font> | ||
4780 | 332 | </para> | ||
4781 | 333 | </pto> | ||
4782 | 334 | </story> | ||
4783 | 335 | </document> | ||
4784 | 0 | 336 | ||
4785 | === added file 'purchase_order_pick_up_date/report/request_quotation.rml' | |||
4786 | --- purchase_order_pick_up_date/report/request_quotation.rml 1970-01-01 00:00:00 +0000 | |||
4787 | +++ purchase_order_pick_up_date/report/request_quotation.rml 2014-08-27 19:22:25 +0000 | |||
4788 | @@ -0,0 +1,156 @@ | |||
4789 | 1 | <?xml version="1.0" encoding="utf-8" ?> | ||
4790 | 2 | <document filename="requestforquotation.pdf"> | ||
4791 | 3 | <template pageSize="(595.0,842.0)" title="Test" author="Savoir-faire Linux (support@savoirfairelinux.com)" allowSplitting="20"> | ||
4792 | 4 | <pageTemplate id="first"> | ||
4793 | 5 | <frame id="first" x1="23.0" y1="43.0" width="530" height="799"/> | ||
4794 | 6 | </pageTemplate> | ||
4795 | 7 | </template> | ||
4796 | 8 | <stylesheet> | ||
4797 | 9 | <blockTableStyle id="Standard_Outline"> | ||
4798 | 10 | <blockAlignment value="LEFT"/> | ||
4799 | 11 | <blockValign value="TOP"/> | ||
4800 | 12 | </blockTableStyle> | ||
4801 | 13 | <blockTableStyle id="Tableau1"> | ||
4802 | 14 | <blockAlignment value="LEFT"/> | ||
4803 | 15 | <blockValign value="TOP"/> | ||
4804 | 16 | </blockTableStyle> | ||
4805 | 17 | <blockTableStyle id="Tableau2"> | ||
4806 | 18 | <blockAlignment value="LEFT"/> | ||
4807 | 19 | <blockValign value="TOP"/> | ||
4808 | 20 | </blockTableStyle> | ||
4809 | 21 | <blockTableStyle id="Table_Product_Header_Title"> | ||
4810 | 22 | <blockAlignment value="LEFT"/> | ||
4811 | 23 | <blockValign value="TOP"/> | ||
4812 | 24 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> | ||
4813 | 25 | <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> | ||
4814 | 26 | <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> | ||
4815 | 27 | </blockTableStyle> | ||
4816 | 28 | <blockTableStyle id="Table_Product_Line"> | ||
4817 | 29 | <blockAlignment value="LEFT"/> | ||
4818 | 30 | <blockValign value="TOP"/> | ||
4819 | 31 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
4820 | 32 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
4821 | 33 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
4822 | 34 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
4823 | 35 | </blockTableStyle> | ||
4824 | 36 | <initialize> | ||
4825 | 37 | <paraStyle name="all" alignment="justify"/> | ||
4826 | 38 | </initialize> | ||
4827 | 39 | <paraStyle name="P1" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4828 | 40 | <paraStyle name="Standard"/> | ||
4829 | 41 | <paraStyle name="terp_header" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> | ||
4830 | 42 | <paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
4831 | 43 | <paraStyle name="terp_default_8" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4832 | 44 | <paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> | ||
4833 | 45 | <paraStyle name="terp_default_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4834 | 46 | <paraStyle name="terp_default_Bold_9" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4835 | 47 | <paraStyle name="terp_default_Centre_9" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4836 | 48 | <paraStyle name="terp_default_Right_9" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4837 | 49 | <paraStyle name="Space bet user and signature" fontSize="4.0" leading="5" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
4838 | 50 | <images/> | ||
4839 | 51 | </stylesheet> | ||
4840 | 52 | <story> | ||
4841 | 53 | <para style="terp_default_9">[[repeatIn(objects,'order')]]</para> | ||
4842 | 54 | <para style="terp_default_9">[[ setLang(order.partner_id.lang) ]]</para> | ||
4843 | 55 | <para style="terp_default_9"> | ||
4844 | 56 | <font color="white"> </font> | ||
4845 | 57 | </para> | ||
4846 | 58 | <blockTable colWidths="250.0,59.0,221.0" style="Tableau1"> | ||
4847 | 59 | <tr> | ||
4848 | 60 | <td> | ||
4849 | 61 | <blockTable colWidths="250.0" style="Tableau2"> | ||
4850 | 62 | <tr> | ||
4851 | 63 | <td> | ||
4852 | 64 | <para style="terp_default_Bold_9"><b>Expected Delivery address:</b></para> | ||
4853 | 65 | <para style="terp_default_9">[[ (order.dest_address_id and order.dest_address_id.name) or (order.warehouse_id and order.warehouse_id.name) or '']]</para> | ||
4854 | 66 | <para style="P1">[[ order.dest_address_id and display_address(order.dest_address_id) ]]</para> | ||
4855 | 67 | </td> | ||
4856 | 68 | </tr> | ||
4857 | 69 | </blockTable> | ||
4858 | 70 | <para style="terp_default_9"> | ||
4859 | 71 | <font color="white"> </font> | ||
4860 | 72 | </para> | ||
4861 | 73 | </td> | ||
4862 | 74 | <td> | ||
4863 | 75 | <para style="terp_default_9"> | ||
4864 | 76 | <font color="white"> </font> | ||
4865 | 77 | </para> | ||
4866 | 78 | </td> | ||
4867 | 79 | <td> | ||
4868 | 80 | <para style="terp_default_9">[[ (order .partner_id and order.partner_id.title and order.partner_id.title.name) or '' ]] [[ (order .partner_id and order.partner_id.name) or '' ]] </para> | ||
4869 | 81 | <para style="terp_default_9">[[ order.partner_id and display_address(order .partner_id) ]] </para> | ||
4870 | 82 | <para style="terp_default_9"> | ||
4871 | 83 | <font color="white"> </font> | ||
4872 | 84 | </para> | ||
4873 | 85 | <para style="terp_default_9">Tel.: [[ (order.partner_id and order.partner_id.phone) or removeParentNode('para') ]]</para> | ||
4874 | 86 | <para style="terp_default_9">Fax: [[ (order.partner_id and order.partner_id.fax) or removeParentNode('para') ]]</para> | ||
4875 | 87 | <para style="P1">TVA: [[ (order.partner_id and order.partner_id.vat) or removeParentNode('para') ]]</para> | ||
4876 | 88 | </td> | ||
4877 | 89 | </tr> | ||
4878 | 90 | </blockTable> | ||
4879 | 91 | <para style="Standard"> | ||
4880 | 92 | <font color="white"> </font> | ||
4881 | 93 | </para> | ||
4882 | 94 | |||
4883 | 95 | <blockTable colWidths="524.0" style="Tableau1"> | ||
4884 | 96 | <tr> | ||
4885 | 97 | <td> | ||
4886 | 98 | <para style="terp_default_9">Expected Pick Up Date: [[ (order.date_pick_up and formatLang(order.date_pick_up, date=True)) or removeParentNode('para') and '']]</para> | ||
4887 | 99 | </td> | ||
4888 | 100 | </tr> | ||
4889 | 101 | </blockTable> | ||
4890 | 102 | <para style="terp_header"><b>Request for Quotation : [[order.name]]</b></para> | ||
4891 | 103 | |||
4892 | 104 | <para style="terp_default_8"> | ||
4893 | 105 | <font color="white"> </font> | ||
4894 | 106 | </para> | ||
4895 | 107 | |||
4896 | 108 | <blockTable colWidths="371.0,98.0,61.0" repeatRows="1" style="Table_Product_Header_Title"> | ||
4897 | 109 | <tr> | ||
4898 | 110 | <td> | ||
4899 | 111 | <para style="terp_tblheader_Details"><b>Description</b></para> | ||
4900 | 112 | </td> | ||
4901 | 113 | <td> | ||
4902 | 114 | <para style="terp_tblheader_Details_Centre"><b>Expected Date</b></para> | ||
4903 | 115 | </td> | ||
4904 | 116 | <td> | ||
4905 | 117 | <para style="terp_tblheader_Details_Centre"><b>Qty</b></para> | ||
4906 | 118 | </td> | ||
4907 | 119 | </tr> | ||
4908 | 120 | </blockTable> | ||
4909 | 121 | <section> | ||
4910 | 122 | <para style="terp_default_9">[[ repeatIn(order.order_line,'order_line') ]]</para> | ||
4911 | 123 | <blockTable colWidths="371.0,98.0,61.0" style="Table_Product_Line"> | ||
4912 | 124 | <tr> | ||
4913 | 125 | <td> | ||
4914 | 126 | <para style="terp_default_9">[[ order_line.name ]]</para> | ||
4915 | 127 | </td> | ||
4916 | 128 | <td> | ||
4917 | 129 | <para style="terp_default_Centre_9">[[ formatLang(order_line.date_planned, date = True) ]]</para> | ||
4918 | 130 | </td> | ||
4919 | 131 | <td> | ||
4920 | 132 | <para style="terp_default_Right_9"> | ||
4921 | 133 | [[ formatLang(order_line.product_qty )]] | ||
4922 | 134 | <i>[[ (order_line.product_uom and order_line.product_uom.name) or '' ]]</i> | ||
4923 | 135 | </para> | ||
4924 | 136 | </td> | ||
4925 | 137 | </tr> | ||
4926 | 138 | </blockTable> | ||
4927 | 139 | </section> | ||
4928 | 140 | <para style="terp_default_9"> | ||
4929 | 141 | <font color="white"> </font> | ||
4930 | 142 | </para> | ||
4931 | 143 | <para style="terp_default_9">[[ format(order.notes or '') ]]</para> | ||
4932 | 144 | <para style="terp_default_9"> | ||
4933 | 145 | <font color="white"> </font> | ||
4934 | 146 | </para> | ||
4935 | 147 | <para style="terp_default_9">Regards,</para> | ||
4936 | 148 | <para style="terp_default_9"> | ||
4937 | 149 | <font color="white"> </font> | ||
4938 | 150 | </para> | ||
4939 | 151 | <para style="Space bet user and signature"> | ||
4940 | 152 | <font color="white"> </font> | ||
4941 | 153 | </para> | ||
4942 | 154 | <para style="terp_default_9">[[ user.signature or '' ]]</para> | ||
4943 | 155 | </story> | ||
4944 | 156 | </document> | ||
4945 | 0 | 157 | ||
4946 | === added directory 'sale_improved_slip' | |||
4947 | === added file 'sale_improved_slip/__init__.py' | |||
4948 | --- sale_improved_slip/__init__.py 1970-01-01 00:00:00 +0000 | |||
4949 | +++ sale_improved_slip/__init__.py 2014-08-27 19:22:25 +0000 | |||
4950 | @@ -0,0 +1,23 @@ | |||
4951 | 1 | # -*- coding: utf-8 -*- | ||
4952 | 2 | ############################################################################## | ||
4953 | 3 | # | ||
4954 | 4 | # OpenERP, Open Source Management Solution | ||
4955 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
4956 | 6 | # | ||
4957 | 7 | # This program is free software: you can redistribute it and/or modify | ||
4958 | 8 | # it under the terms of the GNU Affero General Public License as | ||
4959 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
4960 | 10 | # License, or (at your option) any later version. | ||
4961 | 11 | # | ||
4962 | 12 | # This program is distributed in the hope that it will be useful, | ||
4963 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
4964 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
4965 | 15 | # GNU Affero General Public License for more details. | ||
4966 | 16 | # | ||
4967 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
4968 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4969 | 19 | # | ||
4970 | 20 | ############################################################################## | ||
4971 | 21 | |||
4972 | 22 | import report | ||
4973 | 23 | import sale | ||
4974 | 0 | 24 | ||
4975 | === added file 'sale_improved_slip/__openerp__.py' | |||
4976 | --- sale_improved_slip/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
4977 | +++ sale_improved_slip/__openerp__.py 2014-08-27 19:22:25 +0000 | |||
4978 | @@ -0,0 +1,47 @@ | |||
4979 | 1 | # -*- coding: utf-8 -*- | ||
4980 | 2 | ############################################################################## | ||
4981 | 3 | # | ||
4982 | 4 | # OpenERP, Open Source Management Solution | ||
4983 | 5 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). | ||
4984 | 6 | # | ||
4985 | 7 | # This program is free software: you can redistribute it and/or modify | ||
4986 | 8 | # it under the terms of the GNU Affero General Public License as | ||
4987 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
4988 | 10 | # License, or (at your option) any later version. | ||
4989 | 11 | # | ||
4990 | 12 | # This program is distributed in the hope that it will be useful, | ||
4991 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
4992 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
4993 | 15 | # GNU Affero General Public License for more details. | ||
4994 | 16 | # | ||
4995 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
4996 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4997 | 19 | # | ||
4998 | 20 | ############################################################################## | ||
4999 | 21 | |||
5000 | 22 | { |
MP Description : ''
MP Commit message : ''
__openerp__.py 'description': """""",
My remarks : '''?'''
Please fix this lack of information about this module