Merge lp:~openerp-commiter/openobject-addons/chricar_trunk_stock_SoPo_account_project_mrp_crm into lp:openobject-addons

Proposed by Ferdinand
Status: Rejected
Rejected by: qdp (OpenERP)
Proposed branch: lp:~openerp-commiter/openobject-addons/chricar_trunk_stock_SoPo_account_project_mrp_crm
Merge into: lp:openobject-addons
Diff against target: 1053 lines (+338/-190)
17 files modified
account/account_invoice_view.xml (+56/-58)
account/account_view.xml (+9/-10)
account/project/project_view.xml (+4/-4)
account_tax_include/account_tax_include_view.xml (+1/-1)
mrp/mrp_view.xml (+8/-10)
procurement/procurement_view.xml (+3/-2)
project/project.py (+2/-2)
project/project_view.xml (+28/-31)
purchase/partner.py (+13/-5)
purchase/partner_view.xml (+14/-0)
purchase/purchase.py (+5/-3)
purchase/purchase_view.xml (+15/-12)
sale/sale.py (+96/-4)
sale/sale_view.xml (+21/-14)
sale/stock_view.xml (+16/-4)
sale_order_dates/sale_order_dates_view.xml (+11/-1)
stock/stock_view.xml (+36/-29)
To merge this branch: bzr merge lp:~openerp-commiter/openobject-addons/chricar_trunk_stock_SoPo_account_project_mrp_crm
Reviewer Review Type Date Requested Status
qdp (OpenERP) Disapprove
Review via email: mp+34726@code.launchpad.net

Description of the change

unified layout according to proposed specs (accounting experts) for crm related forms

please merge after
https://code.launchpad.net/~openerp-commiter/openobject-addons/chricar_trunk_stock_SoPo_account_project_mrp

To post a comment you must log in.
Revision history for this message
qdp (OpenERP) (qdp) wrote :

Hello Ferdinand,

i think that something went wrong with your branches, all your branches related to SOPO seems to share the same diff.

Besides, there are not onyl changes related to xml changes (but also in .py files).

And i must admit that even if the 2 above points would be fixed i'm not sure we would accept this branch. You certainly have noticed that we improved a lot the usability in v6 and, due to our slowness, your suggestion are probably deprecated now.

But thank you a lot for your interest and contribution,
Quentin

review: Disapprove

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account/account_invoice_view.xml'
--- account/account_invoice_view.xml 2010-09-01 03:33:18 +0000
+++ account/account_invoice_view.xml 2010-09-07 06:36:14 +0000
@@ -147,31 +147,36 @@
147 <field name="priority">2</field>147 <field name="priority">2</field>
148 <field name="arch" type="xml">148 <field name="arch" type="xml">
149 <form string="Supplier invoice">149 <form string="Supplier invoice">
150 <group col="8" colspan="4">150
151 <field domain="[('type', '=', 'purchase')]" name="journal_id"/>151 <group col="6" colspan="4">
152 <field name="number" readonly="1"/>152 <field name="number" readonly="1"/>
153 <field name="type" invisible="1"/>
154 <field name="currency_id" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
155 <button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>
156 <newline/>
157 <field name="partner_id" domain="[('supplier','=', 1)]" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" context="{'default_customer': 0}"/>
158 <field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
159 <field name="fiscal_position" groups="base.group_extended" widget="selection"/>
160 <newline/>
161 <field name="date_invoice"/>153 <field name="date_invoice"/>
154 <field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>
155 <field name="partner_id" domain="[('supplier','=', 1)]" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" context="{'default_customer': 0}" colspan="4"/>
156<field name="reference_type" nolabel="1" size="0"/>
157 <field name="reference" nolabel="1"/>
158 <field domain="[('partner_id','=',partner_id)]" name="address_invoice_id" colspan="4"/>
159 <newline/>
160 <field name="type" />
162 <field name="period_id" groups="account.group_account_user"/>161 <field name="period_id" groups="account.group_account_user"/>
163 <group colspan="2" col="1" groups="account.group_account_user">162 <group col="4" colspan="2">
164 <label align="0.0" string="(keep empty to use the current period)"/>163 <field name="currency_id" on_change="onchange_currency_id(currency_id, company_id)" widget="selection"/>
165 </group>164 <button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>
166 </group>165 </group>
166 </group>
167
167 <notebook colspan="4">168 <notebook colspan="4">
168 <page string="Invoice">169 <page string="Invoice">
169 <field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" name="account_id" groups="account.group_account_user"/>170 <group col="6" colspan="4">
170 <field name="reference_type" nolabel="1" size="0"/>171 <field domain="[('type', '=', 'purchase')]" name="journal_id"/>
171 <field name="reference" nolabel="1"/>172 <field name="fiscal_position" groups="base.group_extended" widget="selection"/>
172 <field name="date_due"/>173 <field name="payment_term" widget="selection"/>
173 <field name="check_total" required="2"/>174 <field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" name="account_id" groups="account.group_account_user" colspan="4"/>
174 <field colspan="4" default_get="{'check_total': check_total, 'invoice_line': invoice_line, 'address_invoice_id': address_invoice_id, 'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False}" name="invoice_line" nolabel="1">175 <field name="date_due"/>
176 <field name="name" colspan="4"/>
177 <field name="reconciled"/>
178 </group>
179 <field colspan="4" default_get="{'check_total': check_total, 'invoice_line': invoice_line, 'address_invoice_id': address_invoice_id, 'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False}" name="invoice_line" nolabel="1">
175 <tree string="Invoice lines">180 <tree string="Invoice lines">
176 <field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, {'company_id': parent.company_id})"/>181 <field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, {'company_id': parent.company_id})"/>
177 <field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(parent.fiscal_position,account_id)"/>182 <field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(parent.fiscal_position,account_id)"/>
@@ -202,7 +207,7 @@
202 <field name="amount_untaxed"/>207 <field name="amount_untaxed"/>
203 <label string="" colspan="2"/>208 <label string="" colspan="2"/>
204 <field name="amount_tax"/>209 <field name="amount_tax"/>
205 <field name="reconciled"/>210 <field name="check_total" required="2" string="Vendor Total"/>
206 <field name="amount_total"/>211 <field name="amount_total"/>
207 <field name="state"/>212 <field name="state"/>
208 <field name="residual"/>213 <field name="residual"/>
@@ -216,16 +221,11 @@
216 </group>221 </group>
217 </page>222 </page>
218 <page string="Other Info">223 <page string="Other Info">
219 <field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)"/>224 <field domain="[('partner_id','=',partner_id)]" name="address_contact_id" groups="base.group_extended" colspan="4"/>
220225 <field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)" colspan="4"/>
221 <field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>226 <field name="user_id"/>
222 <newline/>
223 <field name="payment_term" widget="selection"/>
224 <field name="name"/>
225 <newline/>
226 <field name="origin" groups="base.group_extended"/>227 <field name="origin" groups="base.group_extended"/>
227 <field domain="[('partner_id','=',partner_id)]" name="address_contact_id" groups="base.group_extended"/>228
228 <field name="user_id"/>
229 <field name="move_id" groups="account.group_account_user"/>229 <field name="move_id" groups="account.group_account_user"/>
230 <separator colspan="4" string="Additional Information"/>230 <separator colspan="4" string="Additional Information"/>
231 <field colspan="4" name="comment" nolabel="1"/>231 <field colspan="4" name="comment" nolabel="1"/>
@@ -255,29 +255,33 @@
255 <field name="type">form</field>255 <field name="type">form</field>
256 <field name="arch" type="xml">256 <field name="arch" type="xml">
257 <form string="Invoice">257 <form string="Invoice">
258 <group colspan="4" col="8">258 <group colspan="4" col="6">
259 <field name="journal_id" groups="base.group_user"/>259 <field name="number"/>
260 <field name="number"/>260 <field name="date_invoice"/>
261 <field name="type" invisible="1"/>261 <field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>
262 <field name="currency_id" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>262 <newline/>
263 <button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>263 <field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" groups="base.group_user" colspan="4"/>
264 <newline/>264 <field domain="[('partner_id','=',partner_id)]" name="address_invoice_id" colspan="4"/>
265 <field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" groups="base.group_user"/>265 <newline/>
266 <field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>266 <field name="type" />
267 <field name="fiscal_position" groups="base.group_extended" widget="selection"/>267 <field name="period_id" groups="account.group_account_user"/>
268 <newline/>268 <group colspan="2" col="4">
269 <field name="date_invoice"/>269 <field name="currency_id" on_change="onchange_currency_id(currency_id, company_id)" width="50" widget="selection"/>
270 <field name="period_id" groups="account.group_account_user"/>270 <button name="549" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>
271 <group colspan="2" col="1" groups="account.group_account_user">271 </group>
272 <label align="0.0" string="(keep empty to use the current period)"/>
273 </group>
274 </group>272 </group>
275 <notebook colspan="4">273 <notebook colspan="4">
276 <page string="Invoice">274 <page string="Invoice">
277 <field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" name="account_id" groups="account.group_account_user"/>275 <group col="6" colspan="4">
278 <field name="name"/>276 <field name="journal_id" groups="base.group_user"/>
277 <field name="fiscal_position" groups="base.group_extended" widget="selection"/>
279 <field name="payment_term" widget="selection"/>278 <field name="payment_term" widget="selection"/>
280 <field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list"/>279 <field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" name="account_id" groups="account.group_account_user" colspan="4"/>
280 <field name="date_due"/>
281 <field name="name" colspan="4"/>
282 <field name="reconciled"/>
283 </group>
284 <field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list"/>
281 <group col="1" colspan="2">285 <group col="1" colspan="2">
282 <field name="tax_line" nolabel="1">286 <field name="tax_line" nolabel="1">
283 <tree editable="bottom" string="Taxes">287 <tree editable="bottom" string="Taxes">
@@ -294,7 +298,7 @@
294 <field name="amount_untaxed"/>298 <field name="amount_untaxed"/>
295 <label string="" colspan="2"/>299 <label string="" colspan="2"/>
296 <field name="amount_tax"/>300 <field name="amount_tax"/>
297 <field name="reconciled"/>301 <label align="0.0" string="" colspan="2"/>
298 <field name="amount_total"/>302 <field name="amount_total"/>
299 <field name="state"/>303 <field name="state"/>
300 <field name="residual"/>304 <field name="residual"/>
@@ -310,16 +314,10 @@
310 </group>314 </group>
311 </page>315 </page>
312 <page string="Other Info">316 <page string="Other Info">
313 <field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>317 <field colspan="4" domain="[('partner_id','=',partner_id)]" name="address_contact_id" groups="base.group_extended"/>
314 <newline/>318 <field colspan="4" domain="[('partner_id.ref_companies', 'in', [company_id])]" name="partner_bank_id" groups="base.group_extended"/>
315 <field name="date_due"/>
316 <field name="user_id"/>319 <field name="user_id"/>
317 <newline/>
318 <field domain="[('partner_id.ref_companies', 'in', [company_id])]" name="partner_bank_id"
319 groups="base.group_extended"/>
320 <field name="origin"/>320 <field name="origin"/>
321 <field colspan="4" domain="[('partner_id','=',partner_id)]" name="address_contact_id"
322 groups="base.group_extended"/>
323 <field name="move_id" groups="account.group_account_user"/>321 <field name="move_id" groups="account.group_account_user"/>
324 <separator colspan="4" string="Additional Information"/>322 <separator colspan="4" string="Additional Information"/>
325 <field colspan="4" name="comment" nolabel="1"/>323 <field colspan="4" name="comment" nolabel="1"/>
326324
=== modified file 'account/account_view.xml'
--- account/account_view.xml 2010-09-03 07:24:13 +0000
+++ account/account_view.xml 2010-09-07 06:36:14 +0000
@@ -121,7 +121,7 @@
121 </tree>121 </tree>
122 </field>122 </field>
123 </record>123 </record>
124 124
125 <record id="view_account_period_search" model="ir.ui.view">125 <record id="view_account_period_search" model="ir.ui.view">
126 <field name="name">account.period.search</field>126 <field name="name">account.period.search</field>
127 <field name="model">account.period</field>127 <field name="model">account.period</field>
@@ -137,7 +137,7 @@
137 </search>137 </search>
138 </field>138 </field>
139 </record>139 </record>
140 140
141 <record id="action_account_period_form" model="ir.actions.act_window">141 <record id="action_account_period_form" model="ir.actions.act_window">
142 <field name="name">Periods</field>142 <field name="name">Periods</field>
143 <field name="res_model">account.period</field>143 <field name="res_model">account.period</field>
@@ -157,14 +157,13 @@
157 <field name="type">form</field>157 <field name="type">form</field>
158 <field name="arch" type="xml">158 <field name="arch" type="xml">
159 <form string="Account">159 <form string="Account">
160 <group col="6" colspan="4">160 <group col="6" colspan="6">
161 <field name="name" select="1"/>161 <field name="code" select="1"/>
162 <field name="code" select="1"/>162 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
163 <field name="company_id" widget="selection" groups="base.group_multi_company"/>163 <field name="name" select="1" colspan="6"/>
164 <newline/>164 <field name="parent_id" colspan="6"/>
165 <field name="parent_id"/>165 <field name="type" select="1"/>
166 <field name="type" select="1"/>166 <field name="user_type" select="1"/>
167 <field name="user_type" select="1"/>
168 </group>167 </group>
169 <notebook colspan="4">168 <notebook colspan="4">
170 <page string="General Information">169 <page string="General Information">
171170
=== modified file 'account/project/project_view.xml'
--- account/project/project_view.xml 2010-09-01 15:09:45 +0000
+++ account/project/project_view.xml 2010-09-07 06:36:14 +0000
@@ -71,16 +71,16 @@
71 <field name="arch" type="xml">71 <field name="arch" type="xml">
72 <form string="Analytic account">72 <form string="Analytic account">
73 <group colspan="4" col="6">73 <group colspan="4" col="6">
74 <field name="name" select="1" colspan="4"/>
75 <field name="code" select="1"/>74 <field name="code" select="1"/>
76 <field name="parent_id" on_change="on_change_parent(parent_id)" groups="base.group_extended"/>
77 <field name="company_id" select="2" widget="selection" groups="base.group_multi_company"/>75 <field name="company_id" select="2" widget="selection" groups="base.group_multi_company"/>
76 <field name="name" select="1" colspan="6"/>
77 <field name="parent_id" on_change="on_change_parent(parent_id)" groups="base.group_extended" colspan="6"/>
78 <field name="type" select="2"/>78 <field name="type" select="2"/>
79 <field name="company_currency_id" select="2"/>79 <field name="company_currency_id" select="2" widget="selection" />
80 </group>80 </group>
81 <notebook colspan="4">81 <notebook colspan="4">
82 <page string="Account Data">82 <page string="Account Data">
83 <field name="partner_id" select="1"/>83 <field name="partner_id" select="1" colspan="4"/>
84 <newline/>84 <newline/>
85 <field name="date_start"/>85 <field name="date_start"/>
86 <field name="date" select="2"/>86 <field name="date" select="2"/>
8787
=== modified file 'account_tax_include/account_tax_include_view.xml'
--- account_tax_include/account_tax_include_view.xml 2010-08-12 20:45:13 +0000
+++ account_tax_include/account_tax_include_view.xml 2010-09-07 06:36:14 +0000
@@ -21,7 +21,7 @@
21 <field name="model">account.invoice</field>21 <field name="model">account.invoice</field>
22 <field name="inherit_id" ref="account.invoice_form"/>22 <field name="inherit_id" ref="account.invoice_form"/>
23 <field name="arch" type="xml">23 <field name="arch" type="xml">
24 <field name="payment_term" position="after">24 <field name="invoice_line" position="before">
25 <field name="price_type"/>25 <field name="price_type"/>
26 </field>26 </field>
27 </field>27 </field>
2828
=== modified file 'mrp/mrp_view.xml'
--- mrp/mrp_view.xml 2010-09-03 11:44:46 +0000
+++ mrp/mrp_view.xml 2010-09-07 06:36:14 +0000
@@ -297,6 +297,7 @@
297 <field name="type">form</field>297 <field name="type">form</field>
298 <field name="arch" type="xml">298 <field name="arch" type="xml">
299 <form string="Bill of Material">299 <form string="Bill of Material">
300
300 <group colspan="4" col="6">301 <group colspan="4" col="6">
301 <field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>302 <field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
302 <field name="name" select="1"/>303 <field name="name" select="1"/>
@@ -562,27 +563,24 @@
562 <group colspan="4" col="6">563 <group colspan="4" col="6">
563 <field name="name" string="Reference"/>564 <field name="name" string="Reference"/>
564 <field name="date_planned"/>565 <field name="date_planned"/>
566 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
567
568 <field name="product_id" on_change="product_id_change(product_id)" colspan="4"/>
565 <field name="origin"/>569 <field name="origin"/>
566 <field name="product_id" on_change="product_id_change(product_id)"/>
567 <field name="product_qty"/>570 <field name="product_qty"/>
568 <group colspan="2" col="3">
569 <field name="product_uom"/>571 <field name="product_uom"/>
570 <button type="action"572 <button type="action"
571 name="%(mrp.action_change_production_qty)d"573 name="%(mrp.action_change_production_qty)d"
572 string="Change Qty" states="ready,confirmed" />574 string="Change Qty" states="ready,confirmed" />
573 </group>575 <newline/>
574 <label string="" colspan="2"/>
575 <field name="product_uos_qty" groups="product.group_uos"/>576 <field name="product_uos_qty" groups="product.group_uos"/>
576 <group colspan="2" col="3" groups="product.group_uos">577 <field name="product_uos"/>
577 <field name="product_uos"/>
578 <label string=""/>
579 </group>
580 </group>578 </group>
581579
582 <notebook colspan="4">580 <notebook colspan="4">
583 <page string="Consumed Products">581 <page string="Consumed Products">
584 <field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]" on_change="bom_id_change(bom_id)" />582 <field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]" on_change="bom_id_change(bom_id)" colspan="4"/>
585 <field name="routing_id" groups="base.group_extended" select="1"/>583 <field name="routing_id" groups="base.group_extended" select="1" colspan="4"/>
586 <field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>584 <field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
587 <field name="location_dest_id" domain="[('usage','=','internal')]"/>585 <field name="location_dest_id" domain="[('usage','=','internal')]"/>
588 <separator string="" colspan="4"/>586 <separator string="" colspan="4"/>
589587
=== modified file 'procurement/procurement_view.xml'
--- procurement/procurement_view.xml 2010-08-18 06:30:58 +0000
+++ procurement/procurement_view.xml 2010-09-07 06:36:14 +0000
@@ -45,8 +45,9 @@
45 <notebook colspan="4">45 <notebook colspan="4">
46 <page string="Procurement Details">46 <page string="Procurement Details">
47 <separator colspan="4" string="Product &amp; Location"/>47 <separator colspan="4" string="Product &amp; Location"/>
48 <field name="product_id" on_change="onchange_product_id(product_id)"/>48 <field name="product_id" on_change="onchange_product_id(product_id)" colspan="4"/>
49 <field name="location_id" domain="[('usage','=','internal')]"/>49 <field name="location_id" domain="[('usage','=','internal')]"/>
50 <newline/>
50 <field name="product_qty"/>51 <field name="product_qty"/>
51 <field name="product_uom" widget="selection"/>52 <field name="product_uom" widget="selection"/>
5253
5354
=== modified file 'project/project.py'
--- project/project.py 2010-08-27 12:05:25 +0000
+++ project/project.py 2010-09-07 06:36:14 +0000
@@ -416,8 +416,8 @@
416 help='If the task is created the state is \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\416 help='If the task is created the state is \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\
417 \n If the task is over, the states is set to \'Done\'.'),417 \n If the task is over, the states is set to \'Done\'.'),
418 'create_date': fields.datetime('Create Date', readonly=True),418 'create_date': fields.datetime('Create Date', readonly=True),
419 'date_start': fields.datetime('Starting Date'),419 'date_start': fields.datetime('Date Start'),
420 'date_end': fields.datetime('Ending Date'),420 'date_end': fields.datetime('Date End'),
421 'date_deadline': fields.date('Deadline'),421 'date_deadline': fields.date('Deadline'),
422 'project_id': fields.many2one('project.project', 'Project', ondelete='cascade',422 'project_id': fields.many2one('project.project', 'Project', ondelete='cascade',
423 help="If you have [?] in the project name, it means there are no analytic account linked to this project."),423 help="If you have [?] in the project name, it means there are no analytic account linked to this project."),
424424
=== modified file 'project/project_view.xml'
--- project/project_view.xml 2010-08-27 11:36:48 +0000
+++ project/project_view.xml 2010-09-07 06:36:14 +0000
@@ -17,13 +17,18 @@
17 <field name="type">form</field>17 <field name="type">form</field>
18 <field name="arch" type="xml">18 <field name="arch" type="xml">
19 <form string="Project">19 <form string="Project">
20 <group colspan="6" col="6">20 <group colspan="4" col="6">
21 <field name="name" string="Project Name" select="1"/>21 <field name="name" string="Project Name" select="1" colspan="4"/>
22 <field name="parent_id" string="Parent Project"/>22 <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
23 <field name="user_id" string="Project Manager" select="1" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>23 <field name="parent_id" string="Parent Project" colspan="4"/>
24 <field name="user_id" string="Project Manager" select="1" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}" colspan="2"/>
24 <field name="date_start" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>25 <field name="date_start" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>
25 <field name="date" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>26 <field name="date" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>
26 <field name="progress_rate" widget="progressbar"/>27 <field name="progress_rate" widget="progressbar" />
28 <field colspan="4" name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" />
29 <field name="warn_customer"/>
30 <field domain="[('partner_id','=',partner_id)]" name="contact_id" string="Contact Address" colspan="4"/>
31 <field name="warn_manager"/>
27 </group>32 </group>
28 <notebook colspan="4">33 <notebook colspan="4">
29 <page string="Administration">34 <page string="Administration">
@@ -39,8 +44,8 @@
39 </group>44 </group>
40 <group col="2" colspan="2" name="misc">45 <group col="2" colspan="2" name="misc">
41 <separator colspan="2" string="Miscelleanous"/>46 <separator colspan="2" string="Miscelleanous"/>
42 <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>47
43 <field name="warn_manager"/>48
44 </group>49 </group>
45 <newline/>50 <newline/>
46 <group col="9" colspan="8">51 <group col="9" colspan="8">
@@ -61,10 +66,6 @@
61 <field colspan="4" name="members" nolabel="1"/>66 <field colspan="4" name="members" nolabel="1"/>
62 </page>67 </page>
63 <page groups="base.group_extended" string="Partner Info">68 <page groups="base.group_extended" string="Partner Info">
64 <field colspan="4" name="partner_id" on_change="onchange_partner_id(partner_id)" select="1"/>
65 <field domain="[('partner_id','=',partner_id)]" name="contact_id" string="Contact Address"/>
66 <field name="warn_customer"/>
67 <newline/>
68 <separator colspan="2" string="Mail Header"/>69 <separator colspan="2" string="Mail Header"/>
69 <separator colspan="2" string="Mail Footer"/>70 <separator colspan="2" string="Mail Footer"/>
70 <field name="warn_header" nolabel="1" colspan="2"/>71 <field name="warn_header" nolabel="1" colspan="2"/>
@@ -197,31 +198,31 @@
197 <field eval="2" name="priority"/>198 <field eval="2" name="priority"/>
198 <field name="arch" type="xml">199 <field name="arch" type="xml">
199 <form string="Task edition">200 <form string="Task edition">
200 <group colspan="6" col="6">201 <group colspan="4" col="6">
201 <field name="name" select="1"/>202 <field name="project_id" required="1" select="1" domain="[('user_id','=',uid)]" colspan="4"/>
202 <field name="project_id" required="1" select="1" domain="[('user_id','=',uid)]"/>203 <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
203 <field name="total_hours" widget="float_time"/>204 <field name="name" select="1" colspan="4"/>
204 <field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
205 <field name="user_id" select="1" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>205 <field name="user_id" select="1" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
206 <field name="date_start" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
207 <field name="date_end" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
206 <field name="progress" widget="progressbar"/>208 <field name="progress" widget="progressbar"/>
209 <field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
210 <field name="total_hours" widget="float_time"/>
207 </group>211 </group>
208 <notebook colspan="4">212 <notebook colspan="4">
209 <page string="Information">213 <page string="Information">
210 <group col="2" colspan="2">214 <group colspan="4" col="6">
211 <field215 <field name="partner_id" colspan="6" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
212 name="planned_hours"216 <field name="planned_hours"
213 widget="float_time"217 widget="float_time"
214 attrs="{'readonly':[('state','!=','draft')]}"218 attrs="{'readonly':[('state','!=','draft')]}"
215 on_change="onchange_planned(planned_hours, effective_hours)"/>219 on_change="onchange_planned(planned_hours, effective_hours)"/>
216 <field name="effective_hours" widget="float_time"/>
217 </group>
218 <group col="3" colspan="2">
219 <field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" colspan="2"/>220 <field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" colspan="2"/>
220 <button name="%(action_project_task_reevaluate)d" string="Reevaluate" type="action" colspan="1" target="new" states="open,pending" icon="gtk-edit"/>221 <button name="%(action_project_task_reevaluate)d" string="Reevaluate" type="action" colspan="1" target="new" states="open,pending" icon="gtk-edit"/>
221222 <newline/>
223 <field name="effective_hours" widget="float_time"/>
222 <field name="delay_hours" widget="float_time"/>224 <field name="delay_hours" widget="float_time"/>
223 </group>225 </group>
224
225 <field colspan="4" name="description" nolabel="1" attrs="{'readonly':[('state','=','done')]}" widget="text_wiki"/>226 <field colspan="4" name="description" nolabel="1" attrs="{'readonly':[('state','=','done')]}" widget="text_wiki"/>
226 <field colspan="4" name="work_ids" nolabel="1" attrs="{'readonly':[('state','in',['draft','done'])]}">227 <field colspan="4" name="work_ids" nolabel="1" attrs="{'readonly':[('state','in',['draft','done'])]}">
227 <tree string="Task Work" editable="top">228 <tree string="Task Work" editable="top">
@@ -268,13 +269,9 @@
268 </group>269 </group>
269 <group colspan="2" col="2">270 <group colspan="2" col="2">
270 <separator string="Dates" colspan="2"/>271 <separator string="Dates" colspan="2"/>
271 <field name="date_start"/>
272 <field name="date_end"/>
273 <field name="create_date"/>272 <field name="create_date"/>
274 </group>273 </group>
275 <separator string="Miscelleanous" colspan="4"/>274 <separator string="Miscelleanous" colspan="4"/>
276 <field name="partner_id"/>
277 <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
278 <group col="4" colspan="2">275 <group col="4" colspan="2">
279 <field name="type_id" widget="selection" readonly="1"/>276 <field name="type_id" widget="selection" readonly="1"/>
280 <button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>277 <button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
281278
=== modified file 'purchase/partner.py'
--- purchase/partner.py 2010-06-29 09:13:12 +0000
+++ purchase/partner.py 2010-09-07 06:36:14 +0000
@@ -1,6 +1,6 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3# 3#
4# OpenERP, Open Source Management Solution4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#6#
@@ -15,7 +15,7 @@
15# GNU Affero General Public License for more details.15# GNU Affero General Public License for more details.
16#16#
17# You should have received a copy of the GNU Affero General Public License17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>. 18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#19#
20##############################################################################20##############################################################################
2121
@@ -27,13 +27,21 @@
27 _columns = {27 _columns = {
28 'property_product_pricelist_purchase': fields.property(28 'property_product_pricelist_purchase': fields.property(
29 'product.pricelist',29 'product.pricelist',
30 type='many2one', 30 type='many2one',
31 relation='product.pricelist', 31 relation='product.pricelist',
32 domain=[('type','=','purchase')],32 domain=[('type','=','purchase')],
33 string="Purchase Pricelist", 33 string="Purchase Pricelist",
34 method=True,34 method=True,
35 view_load=True,35 view_load=True,
36 help="This pricelist will be used, instead of the default one, for purchases from the current partner"),36 help="This pricelist will be used, instead of the default one, for purchases from the current partner"),
37 'property_purchase_payment_term': fields.property(
38 'account.payment.term',
39 type='many2one',
40 relation='account.payment.term',
41 string ='Purchase Payment Term',
42 method=True,
43 view_load=True,
44 help="This purchase payment term will be used instead of the default one for the current partner"),
37 }45 }
38res_partner()46res_partner()
3947
4048
=== modified file 'purchase/partner_view.xml'
--- purchase/partner_view.xml 2010-06-12 16:50:46 +0000
+++ purchase/partner_view.xml 2010-09-07 06:36:14 +0000
@@ -17,5 +17,19 @@
17 </field>17 </field>
18 </record>18 </record>
1919
20 <record id="view_partner_term_property_form" model="ir.ui.view">
21 <field name="name">res.partner.account.term.property.form.inherit</field>
22 <field name="model">res.partner</field>
23 <field name="type">form</field>
24 <field name="inherit_id" ref="account.view_partner_property_form"/>
25 <field name="priority">36</field>
26 <field name="arch" type="xml">
27 <field name="property_account_payable" position="after">
28 <field name="property_purchase_payment_term"/>
29 </field>
30 </field>
31 </record>
32
33
20 </data>34 </data>
21</openerp>35</openerp>
2236
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py 2010-09-03 09:38:12 +0000
+++ purchase/purchase.py 2010-09-07 06:36:14 +0000
@@ -208,6 +208,7 @@
208 'product_id': fields.related('order_line','product_id', type='many2one', relation='product.product', string='Product'),208 'product_id': fields.related('order_line','product_id', type='many2one', relation='product.product', string='Product'),
209 'create_uid': fields.many2one('res.users', 'Responsible'),209 'create_uid': fields.many2one('res.users', 'Responsible'),
210 'company_id': fields.many2one('res.company','Company',required=True,select=1),210 'company_id': fields.many2one('res.company','Company',required=True,select=1),
211 'payment_term': fields.many2one('account.payment.term', 'Payment Term'),
211 }212 }
212 _defaults = {213 _defaults = {
213 'date_order': time.strftime('%Y-%m-%d'),214 'date_order': time.strftime('%Y-%m-%d'),
@@ -260,12 +261,13 @@
260 def onchange_partner_id(self, cr, uid, ids, part):261 def onchange_partner_id(self, cr, uid, ids, part):
261262
262 if not part:263 if not part:
263 return {'value':{'partner_address_id': False, 'fiscal_position': False}}264 return {'value':{'partner_address_id': False, 'payment_term': False,'fiscal_position': False}}
264 addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['default'])265 addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['default'])
265 part = self.pool.get('res.partner').browse(cr, uid, part)266 part = self.pool.get('res.partner').browse(cr, uid, part)
266 pricelist = part.property_product_pricelist_purchase.id267 pricelist = part.property_product_pricelist_purchase.id
267 fiscal_position = part.property_account_position and part.property_account_position.id or False268 fiscal_position = part.property_account_position and part.property_account_position.id or False
268 return {'value':{'partner_address_id': addr['default'], 'pricelist_id': pricelist, 'fiscal_position': fiscal_position}}269 payment_term = part.property_purchase_payment_term and part.property_purchase_payment_term.id or False
270 return {'value':{'partner_address_id': addr['default'], 'pricelist_id': pricelist, 'payment_term': payment_term, 'fiscal_position': fiscal_position}}
269271
270 def wkf_approve_order(self, cr, uid, ids, context={}):272 def wkf_approve_order(self, cr, uid, ids, context={}):
271 self.write(cr, uid, ids, {'state': 'approved', 'date_approve': time.strftime('%Y-%m-%d')})273 self.write(cr, uid, ids, {'state': 'approved', 'date_approve': time.strftime('%Y-%m-%d')})
@@ -378,7 +380,7 @@
378 'origin': o.name,380 'origin': o.name,
379 'invoice_line': il,381 'invoice_line': il,
380 'fiscal_position': o.partner_id.property_account_position.id,382 'fiscal_position': o.partner_id.property_account_position.id,
381 'payment_term': o.partner_id.property_payment_term and o.partner_id.property_payment_term.id or False,383 'payment_term': o.payment_term.id,
382 'company_id': o.company_id.id,384 'company_id': o.company_id.id,
383 }385 }
384 inv_id = self.pool.get('account.invoice').create(cr, uid, inv, {'type':'in_invoice'})386 inv_id = self.pool.get('account.invoice').create(cr, uid, inv, {'type':'in_invoice'})
385387
=== modified file 'purchase/purchase_view.xml'
--- purchase/purchase_view.xml 2010-08-25 15:03:33 +0000
+++ purchase/purchase_view.xml 2010-09-07 06:36:14 +0000
@@ -87,24 +87,28 @@
87 <field name="model">purchase.order</field>87 <field name="model">purchase.order</field>
88 <field name="type">form</field>88 <field name="type">form</field>
89 <field name="arch" type="xml">89 <field name="arch" type="xml">
90 <form string="Purchase Order">90 <form string="Purchase Order">
91 <group col="6" colspan="4">91 <group col="6" colspan="4">
92 <field name="name"/>92 <field name="name"/>
93 <field name="date_order"/>93 <field name="date_order"/>
94 <field name="invoiced"/>94 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
95 <newline/>95 <field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('supplier','=', 1)]" colspan="4"/>
96 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
97 <field name="partner_ref"/>96 <field name="partner_ref"/>
98 <field name="shipped"/>97 <field name="partner_address_id" colspan="4"/>
99 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
100 </group>98 </group>
101 <notebook colspan="4">99 <notebook colspan="4">
102 <page string="Purchase Order">100 <page string="Purchase Order">
103 <field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('supplier','=', 1)]"/>101 <group col="6" colspan="4">
104 <field name="partner_address_id"/>102 <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)" colspan="4"/>
103 <field name="shipped"/>
104 <newline/>
105 <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
106 <field name="minimum_planned_date"/>
107 <field name="invoiced"/>
108 <newline/>
105 <field domain="[('type','=','purchase')]" name="pricelist_id" groups="base.group_extended"/>109 <field domain="[('type','=','purchase')]" name="pricelist_id" groups="base.group_extended"/>
106 <field name="origin" groups="base.group_extended"/>110 <field name="payment_term" widget="selection"/>
107 <newline/>111 </group>
108 <field colspan="4" name="order_line" nolabel="1" mode="tree,form">112 <field colspan="4" name="order_line" nolabel="1" mode="tree,form">
109 <tree colors="red:date_planned&lt;=current_date;black:date_planned&gt;current_date" string="Purchase Order Lines">113 <tree colors="red:date_planned&lt;=current_date;black:date_planned&gt;current_date" string="Purchase Order Lines">
110 <field name="date_planned"/>114 <field name="date_planned"/>
@@ -138,9 +142,8 @@
138 <page string="Delivery &amp; Invoices" groups="base.group_extended">142 <page string="Delivery &amp; Invoices" groups="base.group_extended">
139 <group colspan="2" col="2">143 <group colspan="2" col="2">
140 <separator string="Delivery" colspan="2"/>144 <separator string="Delivery" colspan="2"/>
141 <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
142 <field name="minimum_planned_date"/>
143 <field name="location_id"/>145 <field name="location_id"/>
146 <field name="origin" groups="base.group_extended"/>
144 </group>147 </group>
145 <group colspan="2" col="2">148 <group colspan="2" col="2">
146 <separator string="Invoice Control" colspan="2"/>149 <separator string="Invoice Control" colspan="2"/>
147150
=== modified file 'sale/sale.py'
--- sale/sale.py 2010-09-03 04:58:47 +0000
+++ sale/sale.py 2010-09-07 06:36:14 +0000
@@ -165,6 +165,7 @@
165 res[sale.id] = False165 res[sale.id] = False
166 return res166 return res
167167
168
168 def _invoiced_search(self, cursor, user, obj, name, args, context=None):169 def _invoiced_search(self, cursor, user, obj, name, args, context=None):
169 if context is None:170 if context is None:
170 context = {}171 context = {}
@@ -175,6 +176,92 @@
175 for arg in args:176 for arg in args:
176 if arg[1] == '=':177 if arg[1] == '=':
177 if arg[2]:178 if arg[2]:
179 clause += 'AND inv.state = \'open\''
180 else:
181 clause += 'AND inv.state <> \'open\''
182 no_invoiced = True
183 cursor.execute('SELECT rel.order_id ' \
184 'FROM sale_order_invoice_rel AS rel, account_invoice AS inv ' \
185 'WHERE rel.invoice_id = inv.id ' + clause)
186 res = cursor.fetchall()
187 if no_invoiced:
188 cursor.execute('SELECT sale.id ' \
189 'FROM sale_order AS sale ' \
190 'WHERE sale.id NOT IN ' \
191 '(SELECT rel.order_id ' \
192 'FROM sale_order_invoice_rel AS rel)')
193 res.extend(cursor.fetchall())
194 if not res:
195 return [('id', '=', 0)]
196 return [('id', 'in', [x[0] for x in res])]
197
198 def _paid(self, cursor, user, ids, name, arg, context=None):
199 if context is None:
200 context = {}
201 res = {}
202 for sale in self.browse(cursor, user, ids, context=context):
203 res[sale.id] = True
204 for invoice in sale.invoice_ids:
205 if invoice.reconciled != True:
206 res[sale.id] = False
207 break
208 if not sale.invoice_ids:
209 res[sale.id] = False
210 return res
211
212 def _paid_search(self, cursor, user, obj, name, args, context=None):
213 if context is None:
214 context = {}
215 if not len(args):
216 return []
217 clause = ''
218 no_invoiced = False
219 for arg in args:
220 if arg[1] == '=':
221 if arg[2]:
222 clause += 'AND inv.state = \'open\''
223 else:
224 clause += 'AND inv.state <> \'open\''
225 no_invoiced = True
226 cursor.execute('SELECT rel.order_id ' \
227 'FROM sale_order_invoice_rel AS rel, account_invoice AS inv ' \
228 'WHERE rel.invoice_id = inv.id ' + clause)
229 res = cursor.fetchall()
230 if no_invoiced:
231 cursor.execute('SELECT sale.id ' \
232 'FROM sale_order AS sale ' \
233 'WHERE sale.id NOT IN ' \
234 '(SELECT rel.order_id ' \
235 'FROM sale_order_invoice_rel AS rel)')
236 res.extend(cursor.fetchall())
237 if not res:
238 return [('id', '=', 0)]
239 return [('id', 'in', [x[0] for x in res])]
240
241 def _paid(self, cursor, user, ids, name, arg, context=None):
242 if context is None:
243 context = {}
244 res = {}
245 for sale in self.browse(cursor, user, ids, context=context):
246 res[sale.id] = True
247 for invoice in sale.invoice_ids:
248 if invoice.reconciled != True:
249 res[sale.id] = False
250 break
251 if not sale.invoice_ids:
252 res[sale.id] = False
253 return res
254
255 def _paid_search(self, cursor, user, obj, name, args, context=None):
256 if context is None:
257 context = {}
258 if not len(args):
259 return []
260 clause = ''
261 no_invoiced = False
262 for arg in args:
263 if arg[1] == '=':
264 if arg[2]:
178 clause += 'AND inv.state = \'paid\''265 clause += 'AND inv.state = \'paid\''
179 else:266 else:
180 clause += 'AND inv.state <> \'paid\''267 clause += 'AND inv.state <> \'paid\''
@@ -250,8 +337,10 @@
250 'shipped': fields.boolean('Picked', readonly=True, help="It indicates that a picking has been done. It will be set to True if the ordered quantities are available and the picking is done. If the ordered quantities are not available it generates a Purchase/Manufacturing order. Unless its Picking and Purchase/Manufacturing order are not in the done state it wont be set to True"),337 'shipped': fields.boolean('Picked', readonly=True, help="It indicates that a picking has been done. It will be set to True if the ordered quantities are available and the picking is done. If the ordered quantities are not available it generates a Purchase/Manufacturing order. Unless its Picking and Purchase/Manufacturing order are not in the done state it wont be set to True"),
251 'picked_rate': fields.function(_picked_rate, method=True, string='Picked', type='float'),338 'picked_rate': fields.function(_picked_rate, method=True, string='Picked', type='float'),
252 'invoiced_rate': fields.function(_invoiced_rate, method=True, string='Invoiced', type='float'),339 'invoiced_rate': fields.function(_invoiced_rate, method=True, string='Invoiced', type='float'),
253 'invoiced': fields.function(_invoiced, method=True, string='Paid',340 'invoiced': fields.function(_invoiced, method=True, string='Invoiced',
254 fnct_search=_invoiced_search, type='boolean', help="It indicates that an invoice has been paid"),341 fnct_search=_invoiced_search, type='boolean', help="It indicates that an invoice has been invoiced"),
342 'paid': fields.function(_invoiced, method=True, string='Paid',
343 fnct_search=_paid_search, type='boolean', help="It indicates that an invoice has been paid"),
255 'note': fields.text('Notes'),344 'note': fields.text('Notes'),
256345
257 'amount_untaxed': fields.function(_amount_all, method=True, digits_compute= dp.get_precision('Sale Price'), string='Untaxed Amount',346 'amount_untaxed': fields.function(_amount_all, method=True, digits_compute= dp.get_precision('Sale Price'), string='Untaxed Amount',
@@ -276,7 +365,7 @@
276 'invoice_quantity': fields.selection([('order', 'Ordered Quantities'), ('procurement', 'Shipped Quantities')], 'Invoice on', help="The sale order will automatically create the invoice proposition (draft invoice). Ordered and delivered quantities may not be the same. You have to choose if you invoice based on ordered or shipped quantities. If the product is a service, shipped quantities means hours spent on the associated tasks.", required=True),365 'invoice_quantity': fields.selection([('order', 'Ordered Quantities'), ('procurement', 'Shipped Quantities')], 'Invoice on', help="The sale order will automatically create the invoice proposition (draft invoice). Ordered and delivered quantities may not be the same. You have to choose if you invoice based on ordered or shipped quantities. If the product is a service, shipped quantities means hours spent on the associated tasks.", required=True),
277 'payment_term': fields.many2one('account.payment.term', 'Payment Term'),366 'payment_term': fields.many2one('account.payment.term', 'Payment Term'),
278 'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position'),367 'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position'),
279 'company_id': fields.related('shop_id','company_id',type='many2one',relation='res.company',string='Company',store=True)368 'company_id': fields.related('shop_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
280 }369 }
281 _defaults = {370 _defaults = {
282 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'sale.order', context=c),371 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'sale.order', context=c),
@@ -290,6 +379,8 @@
290 'partner_invoice_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['invoice'])['invoice'],379 'partner_invoice_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['invoice'])['invoice'],
291 'partner_order_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['contact'])['contact'],380 'partner_order_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['contact'])['contact'],
292 'partner_shipping_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['delivery'])['delivery'],381 'partner_shipping_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['delivery'])['delivery'],
382
383
293 }384 }
294 _order = 'name desc'385 _order = 'name desc'
295386
@@ -800,7 +891,7 @@
800 'order_id': fields.many2one('sale.order', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, states={'draft':[('readonly',False)]}),891 'order_id': fields.many2one('sale.order', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, states={'draft':[('readonly',False)]}),
801 'name': fields.char('Description', size=256, required=True, select=True, readonly=True, states={'draft':[('readonly',False)]}),892 'name': fields.char('Description', size=256, required=True, select=True, readonly=True, states={'draft':[('readonly',False)]}),
802 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of sale order lines."),893 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of sale order lines."),
803 'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the the shipping of the products to the customer", readonly=True, states={'draft':[('readonly',False)]}),894 'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation and the shipping of the products to the customer", readonly=True, states={'draft':[('readonly',False)]}),
804 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True),895 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True),
805 'invoice_lines': fields.many2many('account.invoice.line', 'sale_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),896 'invoice_lines': fields.many2many('account.invoice.line', 'sale_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),
806 'invoiced': fields.boolean('Invoiced', readonly=True),897 'invoiced': fields.boolean('Invoiced', readonly=True),
@@ -830,6 +921,7 @@
830 'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Customer'),921 'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Customer'),
831 'salesman_id':fields.related('order_id', 'user_id', type='many2one', relation='res.users', string='Salesman'),922 'salesman_id':fields.related('order_id', 'user_id', type='many2one', relation='res.users', string='Salesman'),
832 'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True, states={'draft':[('readonly',False)]}),923 'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True, states={'draft':[('readonly',False)]}),
924
833 }925 }
834 _order = 'sequence, id'926 _order = 'sequence, id'
835 _defaults = {927 _defaults = {
836928
=== modified file 'sale/sale_view.xml'
--- sale/sale_view.xml 2010-09-03 06:17:18 +0000
+++ sale/sale_view.xml 2010-09-07 06:36:14 +0000
@@ -102,21 +102,27 @@
102 <group col="6" colspan="4">102 <group col="6" colspan="4">
103 <field name="name"/>103 <field name="name"/>
104 <field name="date_order"/>104 <field name="date_order"/>
105 <field name="shipped"/>105 <field name="company_id" groups="base.group_multi_company" readonly="1"/>
106 <field name="partner_id" on_change="onchange_partner_id(partner_id)" required="1" colspan="4"/>
106 <field name="client_order_ref"/>107 <field name="client_order_ref"/>
107 <field name="shop_id" on_change="onchange_shop_id(shop_id)" widget="selection"/>108 <field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id" colspan="4"/>
108 <field name="invoiced"/>109 <newline/>
109 </group>110 </group>
110 <notebook colspan="5">111 <notebook colspan="5">
111 <page string="Sale Order">112 <page string="Sale Order">
112 <field name="partner_id" on_change="onchange_partner_id(partner_id)" required="1"/>113 <group col="6" colspan="4">
113 <field domain="[('partner_id','=',partner_id)]" name="partner_order_id"/>114 <field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id" colspan="4"/>
114 <field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id" groups="base.group_extended"/>115 <field name="shipped"/>
115 <field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id" groups="base.group_extended"/>116 <!-- FIXME here we should see the contact - base_contact issue? -->
117 <field domain="[('partner_id','=',partner_id)]" name="partner_order_id" colspan="4"/>
118 <field name="invoiced"/>
119 <field name="shop_id" on_change="onchange_shop_id(shop_id)" widget="selection"/>
120 <label align="0.0" string="(Expected date)" colspan="2"/>
121 <field name="paid"/>
116 <field domain="[('type','=','sale')]" name="pricelist_id" groups="base.group_extended"/>122 <field domain="[('type','=','sale')]" name="pricelist_id" groups="base.group_extended"/>
117 <field name="project_id"123 <field name="payment_term" widget="selection"/>
118 context="{'partner_id':partner_id, 'contact_id':partner_order_id, 'pricelist_id':pricelist_id, 'default_name':name}"124 <label align="0.0" string="backorder" colspan="2"/>
119 groups="base.group_extended" domain="[('parent_id','!=',False)]" />125 </group>
120 <newline/>126 <newline/>
121 <field colspan="4" mode="tree,form,graph" name="order_line" nolabel="1" widget="one2many_list">127 <field colspan="4" mode="tree,form,graph" name="order_line" nolabel="1" widget="one2many_list">
122 <form string="Sale Order Lines">128 <form string="Sale Order Lines">
@@ -143,11 +149,11 @@
143 domain="[('product_id','=',product_id)]"149 domain="[('product_id','=',product_id)]"
144 groups="base.group_extended"/>150 groups="base.group_extended"/>
145151
146 <field name="company_id" groups="base.group_multi_company" readonly="1"/>152
147 <field colspan="4" name="name"/>153 <field colspan="4" name="name"/>
148 <field name="price_unit"/>154 <field name="price_unit"/>
149 <field name="discount"/>155 <field name="discount"/>
150 <field name="type" groups="base.group_extended"/>156 <field name="type" groups="base.group_extended"/>
151 <field name="delay" groups="base.group_extended"/>157 <field name="delay" groups="base.group_extended"/>
152 <newline/>158 <newline/>
153 <separator colspan="5" string="Taxes"/>159 <separator colspan="5" string="Taxes"/>
@@ -228,9 +234,10 @@
228 </group>234 </group>
229 <group colspan="2" col="2" groups="base.group_extended">235 <group colspan="2" col="2" groups="base.group_extended">
230 <separator string="Conditions" colspan="2"/>236 <separator string="Conditions" colspan="2"/>
231 <field name="payment_term" widget="selection"/>237 <field name="project_id"
238 context="{'partner_id':partner_id, 'contact_id':partner_order_id, 'pricelist_id':pricelist_id, 'default_name':name}"
239 groups="base.group_extended" domain="[('parent_id','!=',False)]" />
232 <field name="fiscal_position" widget="selection"/>240 <field name="fiscal_position" widget="selection"/>
233 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
234 </group>241 </group>
235 <group colspan="2" col="2" groups="base.group_extended">242 <group colspan="2" col="2" groups="base.group_extended">
236 <separator string="Dates" colspan="2"/>243 <separator string="Dates" colspan="2"/>
237244
=== modified file 'sale/stock_view.xml'
--- sale/stock_view.xml 2010-08-25 19:07:01 +0000
+++ sale/stock_view.xml 2010-09-07 06:36:14 +0000
@@ -7,25 +7,37 @@
7 <field name="type">form</field>7 <field name="type">form</field>
8 <field name="inherit_id" ref="stock.view_picking_form"/>8 <field name="inherit_id" ref="stock.view_picking_form"/>
9 <field name="arch" type="xml">9 <field name="arch" type="xml">
10 <field name="active" position="after">10 <field name="backorder_id" position="after">
11 <field name="sale_id"/>11 <field name="sale_id"/>
12 </field>12 </field>
13 </field>13 </field>
14 </record>14 </record>
15 15
16 <!-- Adding Sale Order Reference to outgoing picking -->16 <!-- Adding Sale Order Reference to outgoing picking -->
17 17
18 <record id="stock_picking_out_inherit_sale" model="ir.ui.view">18 <record id="stock_picking_out_inherit_sale" model="ir.ui.view">
19 <field name="name">Outgoing picking Inherited</field>19 <field name="name">Outgoing picking Inherited</field>
20 <field name="model">stock.picking</field>20 <field name="model">stock.picking</field>
21 <field name="type">form</field>21 <field name="type">form</field>
22 <field name="inherit_id" ref="stock.view_picking_out_form"/>22 <field name="inherit_id" ref="stock.view_picking_out_form"/>
23 <field name="arch" type="xml">23 <field name="arch" type="xml">
24 <field name="move_type" position="after">24 <field name="backorder_id" position="after">
25 <field name="sale_id"/>25 <field name="sale_id"/>
26 </field>26 </field>
27 </field>27 </field>
28 </record>28 </record>
2929
30 <!--
31 see https://bugs.launchpad.net/openobject-server/+bug/601480
32 -->
33 <act_window
34 domain="[('sale_id', '=', active_id),('type','=','out')]"
35 id="act_purchase_order_2_stock_picking"
36 view_id="view.picking.out.tree"
37 name="Outgoing Orders"
38 res_model="stock.picking"
39 src_model="sale.order"
40 context="{'contact_display': 'partner'}" />
41
30 </data>42 </data>
31</openerp>43</openerp>
3244
=== modified file 'sale_order_dates/sale_order_dates_view.xml'
--- sale_order_dates/sale_order_dates_view.xml 2010-06-30 10:31:08 +0000
+++ sale_order_dates/sale_order_dates_view.xml 2010-09-07 06:36:14 +0000
@@ -11,11 +11,21 @@
11 <field name="date_confirm" position="after">11 <field name="date_confirm" position="after">
12 <field name="commitment_date"/>12 <field name="commitment_date"/>
13 <field name="effective_date"/>13 <field name="effective_date"/>
14 </field>
15 </field>
16 </record>
17
18 <record id="view_sale_orderfor_a" model="ir.ui.view">
19 <field name="name">sale.order.form.inherit5a</field>
20 <field name="model">sale.order</field>
21 <field name="type">form</field>
22 <field name="inherit_id" ref="view_sale_orderfor"/>
23 <field name="arch" type="xml">
24 <field name="partner_invoice_id" position="after">
14 <field name="requested_date"/>25 <field name="requested_date"/>
15 </field>26 </field>
16 </field>27 </field>
17 </record>28 </record>
1829
19
20 </data>30 </data>
21</openerp>31</openerp>
2232
=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml 2010-09-03 06:17:18 +0000
+++ stock/stock_view.xml 2010-09-07 06:36:14 +0000
@@ -564,17 +564,21 @@
564 <field name="name">stock.picking.form</field>564 <field name="name">stock.picking.form</field>
565 <field name="model">stock.picking</field>565 <field name="model">stock.picking</field>
566 <field name="type">form</field>566 <field name="type">form</field>
567 <field eval="12" name="priority"/>
567 <field name="arch" type="xml">568 <field name="arch" type="xml">
568 <form string="Picking list">569 <form string="Picking list">
569 <group colspan="4" col="6">570 <group colspan="4" col="6">
570 <field name="name" readonly="1"/>571 <field name="name" readonly="1"/>
572 <field name="date"/>
573 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
574 <field name="address_id" required="1" colspan="4"/>
571 <field name="origin"/>575 <field name="origin"/>
576 <newline/>
577 <field name="min_date"/>
572 <field name="backorder_id" groups="base.group_extended" readonly="1"/>578 <field name="backorder_id" groups="base.group_extended" readonly="1"/>
573 <field name="date"/>579 <newline/>
574 <field name="min_date"/>580 <field name="type" readonly="1"/>
575 <field name="type"/>
576 <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>581 <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
577 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
578 </group>582 </group>
579 <notebook colspan="4">583 <notebook colspan="4">
580 <page string="General Information">584 <page string="General Information">
@@ -741,14 +745,15 @@
741 <form string="Picking list">745 <form string="Picking list">
742 <group col="6" colspan="4" attrs="{'readonly': [('state','not in',['draft','auto'])]}">746 <group col="6" colspan="4" attrs="{'readonly': [('state','not in',['draft','auto'])]}">
743 <field name="name" readonly="1"/>747 <field name="name" readonly="1"/>
744 <field name="address_id" required="1"/>748 <field name="date"/>
749 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
750 <field name="address_id" required="1" colspan="4"/>
745 <field name="origin"/>751 <field name="origin"/>
752 <field name="min_date"/>
746 <field name="backorder_id" groups="base.group_extended" readonly="1"/>753 <field name="backorder_id" groups="base.group_extended" readonly="1"/>
747 <field name="date" />754 <newline/>
748 <field name="min_date"/>755 <field name="type" readonly="1"/>
749 <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>756 <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
750 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
751 <field name="type" invisible="1"/>
752 </group>757 </group>
753 <notebook colspan="4">758 <notebook colspan="4">
754 <page string="General Information">759 <page string="General Information">
@@ -830,7 +835,7 @@
830 </page>835 </page>
831 <page string="Return Picking History">836 <page string="Return Picking History">
832 <field name="move_stock_return_history" nolabel="1"/>837 <field name="move_stock_return_history" nolabel="1"/>
833 </page> 838 </page>
834 </notebook>839 </notebook>
835 </form>840 </form>
836 </field>841 </field>
@@ -944,16 +949,18 @@
944 <field name="type">form</field>949 <field name="type">form</field>
945 <field name="arch" type="xml">950 <field name="arch" type="xml">
946 <form string="Picking list">951 <form string="Picking list">
947 <group col="6" colspan="4">952 <group col="6" colspan="4">
948 <field name="address_id" required="1" />953 <field name="name" readonly="1"/>
954 <field name="date"/>
955 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
956 <field name="address_id" required="1" colspan="4"/>
957 <field name="origin" readonly="1"/>
949 <field name="min_date"/>958 <field name="min_date"/>
950 <field name="name" readonly="1"/>959 <field name="backorder_id" readonly="1"/>
960 <newline/>
961 <field name="type" readonly="1"/>
962 <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
951 <field name="invoice_state"/>963 <field name="invoice_state"/>
952 <field name="backorder_id" readonly="1"/>
953 <field name="origin" readonly="1"/>
954 <field name="type" invisible="1"/>
955 <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
956 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
957 </group>964 </group>
958 <notebook colspan="4">965 <notebook colspan="4">
959 <page string="General Information">966 <page string="General Information">
@@ -1143,15 +1150,15 @@
1143 <form string="Input Picking List">1150 <form string="Input Picking List">
1144 <group colspan="4" col="6">1151 <group colspan="4" col="6">
1145 <field name="name" readonly="1"/>1152 <field name="name" readonly="1"/>
1146 <field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" required="1" />1153 <field name="date"/>
1154 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
1155 <field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" required="1" colspan="4"/>
1147 <field name="origin"/>1156 <field name="origin"/>
1157 <field name="min_date" readonly="1"/>
1148 <field name="backorder_id" readonly="1" groups="base.group_extended"/>1158 <field name="backorder_id" readonly="1" groups="base.group_extended"/>
1149 <field name="date"/>1159 <field name="type" readonly="1"/>
1150 <field name="type"/>1160 <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
1151 <field name="min_date" readonly="1"/>
1152 <field name="invoice_state" string="Invoice Control"/>1161 <field name="invoice_state" string="Invoice Control"/>
1153 <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
1154 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
1155 </group>1162 </group>
1156 <notebook colspan="4">1163 <notebook colspan="4">
1157 <page string="General Information">1164 <page string="General Information">
@@ -1221,7 +1228,7 @@
1221 <page string="Return Picking History">1228 <page string="Return Picking History">
1222 <field name="move_stock_return_history" nolabel="1"/>1229 <field name="move_stock_return_history" nolabel="1"/>
1223 </page>1230 </page>
1224 1231
1225 </notebook>1232 </notebook>
1226 </form>1233 </form>
1227 </field>1234 </field>
@@ -1444,7 +1451,7 @@
1444 </page>1451 </page>
1445 <page string="Return Picking History">1452 <page string="Return Picking History">
1446 <field name="move_stock_return_history" nolabel="1"/>1453 <field name="move_stock_return_history" nolabel="1"/>
1447 </page> 1454 </page>
1448 </notebook>1455 </notebook>
1449 <group col="6" colspan="4">1456 <group col="6" colspan="4">
1450 <field name="state"/>1457 <field name="state"/>
@@ -1604,7 +1611,7 @@
1604 </page>1611 </page>
1605 <page string="Return Picking History">1612 <page string="Return Picking History">
1606 <field name="move_stock_return_history" nolabel="1"/>1613 <field name="move_stock_return_history" nolabel="1"/>
1607 </page> 1614 </page>
1608 </notebook>1615 </notebook>
1609 </form>1616 </form>
1610 </field>1617 </field>
@@ -1744,7 +1751,7 @@
1744 <field name="name">Products</field>1751 <field name="name">Products</field>
1745 <field eval="'ir.actions.act_window,%d'%act_product_location_open" name="value"/>1752 <field eval="'ir.actions.act_window,%d'%act_product_location_open" name="value"/>
1746 <field eval="True" name="object"/>1753 <field eval="True" name="object"/>
1747 </record>    1754 </record>
17481755
17491756
1750 <record id="ir_act_product_location_open" model="ir.values">1757 <record id="ir_act_product_location_open" model="ir.values">
@@ -1753,7 +1760,7 @@
1753 <field name="name">Open Products</field>1760 <field name="name">Open Products</field>
1754 <field eval="'ir.actions.act_window,%d'%action_view_stock_location_product" name="value"/>1761 <field eval="'ir.actions.act_window,%d'%action_view_stock_location_product" name="value"/>
1755 <field eval="True" name="object"/>1762 <field eval="True" name="object"/>
1756 </record>  1763 </record>
17571764
1758 <!-- Graph Views -->1765 <!-- Graph Views -->
1759 <!-- Products To Received Vs Planned -->1766 <!-- Products To Received Vs Planned -->

Subscribers

People subscribed via source and target branches

to all changes: