[MERGE] sale delivery invoice address

bzr revid: fp@openerp.com-20121010195811-tqsqxdjpapj8sbpd
This commit is contained in:
Fabien Pinckaers 2012-10-10 21:58:11 +02:00
commit c78ffc04e8
7 changed files with 66 additions and 12 deletions

View File

@ -48,9 +48,6 @@ class sale_configuration(osv.osv_memory):
'group_uom':fields.boolean("Allow using different units of measures",
implied_group='product.group_uom',
help="""Allows you to select and maintain different units of measure for products."""),
'group_sale_delivery_address': fields.boolean("Allow a different address for delivery and invoicing ",
implied_group='sale.group_delivery_invoice_address',
help="Allows you to specify different delivery and invoice addresses on a sale order."),
'group_discount_per_so_line': fields.boolean("Allow setting a discount on the sale order lines",
implied_group='sale.group_discount_per_so_line',
help="Allows you to apply some discount per sale order line."),

View File

@ -12,6 +12,10 @@
<group>
<label for="id" string="Invoicing Process"/>
<div>
<div name="group_invoice_so_lines">
<field name="group_invoice_so_lines" class="oe_inline"/>
<label for="group_invoice_so_lines"/>
</div>
<div name="timesheet">
<field name="timesheet" class="oe_inline" on_change="onchange_timesheet(timesheet)"/>
<label for="timesheet"/>
@ -29,10 +33,6 @@
</group>
</div>
<div name="Customer Features" position="inside">
<div>
<field name="group_sale_delivery_address" class="oe_inline"/>
<label for="group_sale_delivery_address"/>
</div>
<div>
<field name="group_sale_pricelist" class="oe_inline"/>
<label for="group_sale_pricelist"/>

View File

@ -174,9 +174,9 @@
</h1>
<group>
<group>
<field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}"/>
<field name="partner_invoice_id" groups="sale.group_delivery_invoice_address"/>
<field name="partner_shipping_id" groups="sale.group_delivery_invoice_address"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1, 'show_address': 1}" options='{"always_reload": true}'/>
<field name="partner_invoice_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'invoice'}"/>
<field name="partner_shipping_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'delivery'}"/>
<field name="project_id" context="{'partner_id':partner_id, 'pricelist_id':pricelist_id, 'default_name':name}" groups="sale.group_analytic_accounting" domain="[('type','in',['view','normal','contract'])]"/>
</group>
<group>

View File

@ -32,7 +32,7 @@ Price and Cost Price.
'author':'OpenERP SA',
'images':['images/sale_margin.jpeg'],
'depends':['sale_stock'],
'demo':[],
'demo':['sale_margin_demo.xml'],
'test': ['test/sale_margin.yml'],
'data':['security/ir.model.access.csv','sale_margin_view.xml'],
'auto_install': False,

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="sale.sale_order_line_1" model="sale.order.line">
<field name="purchase_price">2870.00</field>
</record>
<record id="sale.sale_order_line_2" model="sale.order.line">
<field name="purchase_price">126.00</field>
</record>
<record id="sale.sale_order_line_3" model="sale.order.line">
<field name="purchase_price">60.00</field>
</record>
<record id="sale.sale_order_line_12" model="sale.order.line">
<field name="purchase_price">390.00</field>
</record>
<record id="sale.sale_order_line_13" model="sale.order.line">
<field name="purchase_price">21.60</field>
</record>
<record id="sale.sale_order_line_14" model="sale.order.line">
<field name="purchase_price">4258.00</field>
</record>
<record id="sale.sale_order_line_16" model="sale.order.line">
<field name="purchase_price">2870.00</field>
</record>
<record id="sale.sale_order_line_17" model="sale.order.line">
<field name="purchase_price">155.00</field>
</record>
<record id="sale.sale_order_line_18" model="sale.order.line">
<field name="purchase_price">35.00</field>
</record>
<record id="sale.sale_order_line_19" model="sale.order.line">
<field name="purchase_price">13.00</field>
</record>
</data>
</openerp>

View File

@ -27,6 +27,9 @@ class sale_configuration(osv.osv_memory):
_inherit = 'sale.config.settings'
_columns = {
'group_sale_delivery_address': fields.boolean("Allow a different address for delivery and invoicing ",
implied_group='sale.group_delivery_invoice_address',
help="Allows you to specify different delivery and invoice addresses on a sale order."),
'group_invoice_deli_orders': fields.boolean('Generate invoices after and based on delivery orders',
implied_group='sale_stock.group_invoice_deli_orders',
help="To allow your salesman to make invoices for Delivery Orders using the menu 'Deliveries to Invoice'."),

View File

@ -9,11 +9,19 @@
<field name="inherit_id" ref="sale.view_sales_config"/>
<field name="arch" type="xml">
<data>
<xpath expr="//div[@name='timesheet']" position="before">
<xpath expr="//div[@name='Customer Features']" position="inside">
<div>
<field name="group_sale_delivery_address" class="oe_inline"/>
<label for="group_sale_delivery_address"/>
</div>
</xpath>
<xpath expr="//div[@name='group_invoice_so_lines']" position="replace">
<div>
<field name="group_invoice_so_lines" on_change="onchange_invoice_methods(group_invoice_so_lines, group_invoice_deli_orders)" class="oe_inline"/>
<label for="group_invoice_so_lines"/>
</div>
</xpath>
<xpath expr="//div[@name='timesheet']" position="before">
<div>
<field name="group_invoice_deli_orders" class="oe_inline" on_change="onchange_invoice_methods(group_invoice_so_lines, group_invoice_deli_orders)"/>
<label for="group_invoice_deli_orders"/>