[REF] sale_stock: removing of dead code and correction of documentation (process) linked to the invoicing after delivery of a sale order

bzr revid: qdp-launchpad@openerp.com-20130404151451-7fesb178mpijlv29
This commit is contained in:
Quentin (OpenERP) 2013-04-04 17:14:51 +02:00
parent c5cde2a6a3
commit 4bdd8252ba
3 changed files with 2 additions and 19 deletions

View File

@ -212,8 +212,7 @@ class sale_order(osv.osv):
'order_policy': fields.selection([
('manual', 'On Demand'),
], 'Create Invoice', required=True, readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]},
help="""This field controls how invoice and delivery operations are synchronized.
- With 'Before Delivery', a draft invoice is created, and it must be paid before delivery."""),
help="""This field controls how invoice and delivery operations are synchronized."""),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Pricelist for current sales order."),
'currency_id': fields.related('pricelist_id', 'currency_id', type="many2one", relation="res.currency", string="Currency", readonly=True, required=True),
'project_id': fields.many2one('account.analytic.account', 'Contract / Analytic', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="The analytic account related to a sales order."),

View File

@ -64,17 +64,6 @@
</record>
<!--
Process Condition
-->
<record id="process_condition_conditionafterdelivery0" model="process.condition">
<field name="model_id" ref="sale.model_sale_order"/>
<field name="node_id" ref="process_node_invoiceafterdelivery0"/>
<field eval="&quot;&quot;&quot;object.order_policy=='postpaid'&quot;&quot;&quot;" name="model_states"/>
<field eval="&quot;&quot;&quot;condition_after_delivery&quot;&quot;&quot;" name="name"/>
</record>
<!--
Process Transition
-->
@ -106,7 +95,7 @@
<record id="process_transition_invoiceafterdelivery0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Create Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The invoice is created automatically if the shipping policy is 'Invoice from pick' or 'Invoice on order after delivery'.&quot;&quot;&quot;" name="note"/>
<field eval="&quot;&quot;&quot;If the sale order was set to create the invoice 'On Delivery Order', then an invoice is automatically created based on what you delivered. If you rather want to create your invoice based on your sale order, you can set the sale order to create invoice 'On Demand', then track and process the sales order that have been fully delivered and invoice them from there.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_invoiceafterdelivery0"/>
<field model="process.node" name="source_node_id" ref="process_node_packinglist0"/>
</record>

View File

@ -610,11 +610,6 @@ class sale_advance_payment_inv(osv.osv_memory):
sale_line_obj = self.pool.get('sale.order.line')
wizard = self.browse(cr, uid, [result], context)
sale = sale_obj.browse(cr, uid, sale_id, context=context)
if sale.order_policy == 'postpaid':
raise osv.except_osv(
_('Error!'),
_("You cannot make an advance on a sales order \
that is defined as 'Automatic Invoice after delivery'."))
# If invoice on picking: add the cost on the SO
# If not, the advance will be deduced when generating the final invoice