bzr revid: fp@tinyerp.com-20080825222048-dfz0h2fx1ooofavq
This commit is contained in:
Fabien Pinckaers 2008-08-26 00:20:48 +02:00
parent 7f51b40014
commit 97dd8d1a25
20 changed files with 275 additions and 233 deletions

View File

@ -488,6 +488,11 @@ class account_move_line(osv.osv):
return r_id return r_id
def view_header_get(self, cr, user, view_id, view_type, context): def view_header_get(self, cr, user, view_id, view_type, context):
if context.get('account_id', False):
cr.execute('select code from account_account where id=%d', (context['account_id'],))
res = cr.fetchone()
res = _('Entries: ')+ (res[0] or '')
return res
if (not context.get('journal_id', False)) or (not context.get('period_id', False)): if (not context.get('journal_id', False)) or (not context.get('period_id', False)):
return False return False
cr.execute('select code from account_journal where id=%d', (context['journal_id'],)) cr.execute('select code from account_journal where id=%d', (context['journal_id'],))
@ -495,8 +500,8 @@ class account_move_line(osv.osv):
cr.execute('select code from account_period where id=%d', (context['period_id'],)) cr.execute('select code from account_period where id=%d', (context['period_id'],))
p = cr.fetchone()[0] or '' p = cr.fetchone()[0] or ''
if j or p: if j or p:
return j+':'+p return j+(p and (':'+p) or '')
return 'Journal' return False
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False): def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False):
result = super(osv.osv, self).fields_view_get(cr, uid, view_id,view_type,context) result = super(osv.osv, self).fields_view_get(cr, uid, view_id,view_type,context)
@ -709,7 +714,6 @@ class account_move_line(osv.osv):
tax_id=tax_obj.browse(cr,uid,vals['account_tax_id']) tax_id=tax_obj.browse(cr,uid,vals['account_tax_id'])
total = vals['credit'] or (-vals['debit']) total = vals['credit'] or (-vals['debit'])
for tax in tax_obj.compute(cr,uid,[tax_id],total,1.00): for tax in tax_obj.compute(cr,uid,[tax_id],total,1.00):
print 'Processing Tax', tax
self.write(cr, uid,[result], { self.write(cr, uid,[result], {
'tax_code_id': tax['base_code_id'], 'tax_code_id': tax['base_code_id'],
'tax_amount': tax['base_sign'] * total 'tax_amount': tax['base_sign'] * total
@ -729,7 +733,6 @@ class account_move_line(osv.osv):
'credit': tax['amount']>0 and tax['amount'] or 0.0, 'credit': tax['amount']>0 and tax['amount'] or 0.0,
'debit': tax['amount']<0 and -tax['amount'] or 0.0, 'debit': tax['amount']<0 and -tax['amount'] or 0.0,
} }
print data
self.create(cr, uid, data, context) self.create(cr, uid, data, context)
if check: if check:
self.pool.get('account.move').validate(cr, uid, [vals['move_id']], context) self.pool.get('account.move').validate(cr, uid, [vals['move_id']], context)

View File

@ -887,7 +887,7 @@
<menuitem action="action_move_line_search" id="menu_action_move_line_search" parent="account.next_id_29"/> <menuitem action="action_move_line_search" id="menu_action_move_line_search" parent="account.next_id_29"/>
<menuitem id="menu_finance_charts" name="Charts" parent="account.menu_finance" sequence="7"/> <menuitem id="menu_finance_charts" name="Charts" parent="account.menu_finance" sequence="7"/>
<wizard id="wizard_account_chart" menu="False" model="account.account" name="account.chart" string="Accounts Charts"/> <wizard id="wizard_account_chart" menu="False" model="account.account" name="account.chart" string="Chart of Accounts"/>
<menuitem action="wizard_account_chart" id="menu_action_account_tree2" parent="account.menu_finance_charts" type="wizard"/> <menuitem action="wizard_account_chart" id="menu_action_account_tree2" parent="account.menu_finance_charts" type="wizard"/>
@ -1318,17 +1318,18 @@
</record> </record>
<record id="action_move_line_tree1" model="ir.actions.act_window"> <record id="action_move_line_tree1" model="ir.actions.act_window">
<field name="name">Move line select</field> <field name="name">Entries</field>
<field name="res_model">account.move.line</field> <field name="res_model">account.move.line</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="domain">[('account_id','child_of', [active_id]),('state','&lt;&gt;','draft')]</field> <field name="domain">[('account_id','child_of', [active_id]),('state','&lt;&gt;','draft')]</field>
<field name="context">{'account_id':active_id}</field>
</record> </record>
<wizard id="wizard_move_line_select" menu="False" model="account.move.line" name="account.move.line.select" string="Move line select"/> <wizard id="wizard_move_line_select" menu="False" model="account.move.line" name="account.move.line.select" string="Move line select"/>
<record id="ir_open_account_account" model="ir.values"> <record id="ir_open_account_account" model="ir.values">
<field eval="'tree_but_open'" name="key2"/> <field eval="'tree_but_open'" name="key2"/>
<field eval="'account.account'" name="model"/> <field eval="'account.account'" name="model"/>
<field name="name">Open all entries lines</field> <field name="name">Account Entries</field>
<field eval="'ir.actions.wizard,%d'%wizard_move_line_select" name="value"/> <field eval="'ir.actions.wizard,%d'%wizard_move_line_select" name="value"/>
<field eval="True" name="object"/> <field eval="True" name="object"/>
</record> </record>
@ -1513,14 +1514,14 @@
<menuitem id="account_account_template_menu" name="Templates" parent="account.menu_finance_configuration"/> <menuitem id="account_account_template_menu" name="Templates" parent="account.menu_finance_configuration"/>
<menuitem action="action_account_template_form" id="menu_action_account_template_form" parent="account_account_template_menu"/> <menuitem action="action_account_template_form" id="menu_action_account_template_form" parent="account_account_template_menu"/>
<!-- Account Chart Templates --> <!-- Chart of Accounts Templates -->
<record id="view_account_chart_template_form" model="ir.ui.view"> <record id="view_account_chart_template_form" model="ir.ui.view">
<field name="name">account.chart.template.form</field> <field name="name">account.chart.template.form</field>
<field name="model">account.chart.template</field> <field name="model">account.chart.template</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Account Chart Template"> <form string="Chart of Accounts Template">
<field colspan="4" name="name" select="1"/> <field colspan="4" name="name" select="1"/>
<newline/> <newline/>
<field name="account_root_id" select="1"/> <field name="account_root_id" select="1"/>
@ -1537,7 +1538,7 @@
<field name="model">account.chart.template</field> <field name="model">account.chart.template</field>
<field name="type">tree</field> <field name="type">tree</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Account Chart Template"> <tree string="Chart of Accounts Template">
<field name="name"/> <field name="name"/>
<field name="account_root_id"/> <field name="account_root_id"/>
<field name="bank_account_view_id"/> <field name="bank_account_view_id"/>
@ -1545,7 +1546,7 @@
</field> </field>
</record> </record>
<record id="action_account_chart_template_form" model="ir.actions.act_window"> <record id="action_account_chart_template_form" model="ir.actions.act_window">
<field name="name">Account Chart Templates</field> <field name="name">Chart of Accounts Templates</field>
<field name="res_model">account.chart.template</field> <field name="res_model">account.chart.template</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
@ -1597,7 +1598,7 @@
<field name="model">wizard.account.chart.duplicate</field> <field name="model">wizard.account.chart.duplicate</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Duplicate Account Chart"> <form string="Duplicate Chart of Accounts">
<field name="account_id"/> <field name="account_id"/>
<field name="company_id"/> <field name="company_id"/>
<newline/> <newline/>
@ -1610,7 +1611,7 @@
</record> </record>
<record id="action_wizard_account_duplicate_chart_form" model="ir.actions.act_window"> <record id="action_wizard_account_duplicate_chart_form" model="ir.actions.act_window">
<field name="name">Duplicate Account Chart</field> <field name="name">Duplicate Chart of Accounts</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">wizard.account.chart.duplicate</field> <field name="res_model">wizard.account.chart.duplicate</field>
<field name="view_type">form</field> <field name="view_type">form</field>

View File

@ -5,20 +5,6 @@
Partners Extension Partners Extension
--> -->
<record id="view_partner_form" model="ir.ui.view">
<field name="name">res.partner.form.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="credit_limit" position="after">
<field name="credit" select="2"/>
<field name="debit" select="2"/>
<newline/>
</field>
</field>
</record>
<record id="view_partner_property_form" model="ir.ui.view"> <record id="view_partner_property_form" model="ir.ui.view">
<field name="name">res.partner.property.form.inherit</field> <field name="name">res.partner.property.form.inherit</field>
<field name="model">res.partner</field> <field name="model">res.partner</field>
@ -26,16 +12,56 @@
<field name="priority">2</field> <field name="priority">2</field>
<field name="inherit_id" ref="base.view_partner_form"/> <field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<page string="Properties" position="inside"> <notebook>
<newline/> <page string="Accounting" position="inside">
<group col="2" colspan="2">
<separator string="Customer Accounting Properties" colspan="2"/> <separator string="Customer Accounting Properties" colspan="2"/>
<separator string="Supplier Accounting Properties" colspan="2"/>
<field name="property_account_receivable"/> <field name="property_account_receivable"/>
<field name="property_account_payable"/>
<field name="property_account_tax"/> <field name="property_account_tax"/>
<field name="property_account_supplier_tax"/>
<field name="property_payment_term"/> <field name="property_payment_term"/>
</group>
<group col="2" colspan="2">
<separator string="Supplier Accounting Properties" colspan="2"/>
<field name="property_account_payable"/>
<field name="property_account_supplier_tax"/>
</group>
<group col="2" colspan="2">
<separator string="Customer Credit" colspan="2"/>
<field name="credit" select="2"/>
<field name="credit_limit" select="2"/>
</group>
<group col="2" colspan="2">
<separator string="Supplier Debit" colspan="2"/>
<field name="debit" select="2"/>
</group>
<field colspan="4" context="address=address" name="bank_ids" nolabel="1">
<form string="Bank account">
<field name="state" select="2"/>
<newline/>
<field name="acc_number" select="1"/>
<newline/>
<field name="bank"/>
<newline/>
<field name="sequence"/>
<field colspan="4" name="name" select="2"/>
<separator colspan="4" string="Bank account owner"/>
<field colspan="4" name="owner_name"/>
<field colspan="4" name="street"/>
<newline/>
<field name="zip"/>
<field name="city"/>
<newline/>
<field completion="1" name="country_id"/>
<field name="state_id"/>
</form>
<tree string="Bank Details">
<field name="state"/>
<field name="owner_name"/>
<field name="acc_number"/>
</tree>
</field>
</page> </page>
</notebook>
</field> </field>
</record> </record>

View File

@ -50,10 +50,13 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="product.product_category_form_view"/> <field name="inherit_id" ref="product.product_category_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<group string="Properties" position="inside"> <form position="inside">
<group col="2" colspan="2">
<separator string="Accounting Properties" colspan="2"/>
<field name="property_account_income_categ"/> <field name="property_account_income_categ"/>
<field name="property_account_expense_categ"/> <field name="property_account_expense_categ"/>
</group> </group>
</form>
</field> </field>
</record> </record>

View File

@ -78,7 +78,7 @@
<menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" parent="next_id_39"/> <menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" parent="next_id_39"/>
<record id="action_account_analytic_account_tree2" model="ir.actions.act_window"> <record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
<field name="name">Analytic Charts of Accounts</field> <field name="name">Analytic Chart of Accounts</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.account</field> <field name="res_model">account.analytic.account</field>
<field name="domain">[('parent_id','=',False)]</field> <field name="domain">[('parent_id','=',False)]</field>

View File

@ -52,7 +52,10 @@ class wizard_move_line_select(wizard.interface):
result = mod_obj._get_id(cr, uid, 'account', 'action_move_line_tree1') result = mod_obj._get_id(cr, uid, 'account', 'action_move_line_tree1')
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id'] id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
result = act_obj.read(cr, uid, [id])[0] result = act_obj.read(cr, uid, [id])[0]
result['context'] = str({'fiscalyear': context.get('fiscalyear', False)}) result['context'] = {
'fiscalyear': context.get('fiscalyear', False),
'account_id': data['id']
}
result['domain']=result['domain'][0:-1]+','+domain+result['domain'][-1] result['domain']=result['domain'][0:-1]+','+domain+result['domain'][-1]
return result return result

View File

@ -124,10 +124,9 @@
<field name="model">sale.order</field> <field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/> <field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="client_order_ref" position="after"> <separator string="Notes" position="before">
<field name="carrier_id"/> <field name="carrier_id"/>
</separator>
</field>
</field> </field>
</record> </record>

View File

@ -318,7 +318,7 @@
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/> <field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<page string="Extra Info" position="after"> <notebook position="inside">
<page string="Membership"> <page string="Membership">
<field name="membership_state" select="2"/> <field name="membership_state" select="2"/>
<field name="membership_amount" select="2"/> <field name="membership_amount" select="2"/>
@ -341,7 +341,7 @@
</form> </form>
</field> </field>
</page> </page>
</page> </notebook>
</field> </field>
</record> </record>

View File

@ -7,9 +7,12 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/> <field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<page string="Properties" position="inside"> <page string="Sales &amp; Purchases" position="inside">
<separator string="Sales" colspan="4"/> <newline/>
<group col="2" colspan="2">
<separator string="Sales" colspan="2"/>
<field name="property_product_pricelist"/> <field name="property_product_pricelist"/>
</group>
</page> </page>
</field> </field>
</record> </record>

View File

@ -328,6 +328,13 @@ class product_template(osv.osv):
product_template() product_template()
class product_product(osv.osv): class product_product(osv.osv):
def view_header_get(self, cr, uid, view_id, view_type, context):
res = super(product_product, self).view_header_get(cr, uid, view_id, view_type, context)
if res: return res
if (not context.get('categ_id', False)):
return False
return _('Products: ')+self.pool.get('product.category').browse(cr, uid, context['categ_id'], context).name
def _product_price(self, cr, uid, ids, name, arg, context={}): def _product_price(self, cr, uid, ids, name, arg, context={}):
res = {} res = {}
quantity = context.get('quantity', 1) quantity = context.get('quantity', 1)

View File

@ -162,8 +162,7 @@
<field name="name" select="1"/> <field name="name" select="1"/>
<field name="parent_id"/> <field name="parent_id"/>
<field name="sequence"/> <field name="sequence"/>
<group string="Properties" colspan="4" groups="base.group_extended"> <newline/>
</group>
</form> </form>
</field> </field>
</record> </record>
@ -199,12 +198,13 @@
<record id="product_normal_action_tree" model="ir.actions.act_window"> <record id="product_normal_action_tree" model="ir.actions.act_window">
<field name="name">product.normal.action.tree</field> <field name="name" eval="False"/>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">product.product</field> <field name="res_model">product.product</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="domain">[('categ_id','child_of',[active_id])]</field> <field name="domain">[('categ_id','child_of',[active_id])]</field>
<field name="context">{'categ_id':active_id}</field>
</record> </record>
<record id="ir_product_category_open" model="ir.values"> <record id="ir_product_category_open" model="ir.values">
<field eval="'tree_but_open'" name="key2"/> <field eval="'tree_but_open'" name="key2"/>

View File

@ -7,9 +7,11 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/> <field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<page string="Properties" position="inside"> <page string="Sales &amp; Purchases" position="inside">
<separator string="Purchases" colspan="4"/> <group colspan="2" col="2">
<separator string="Purchases" colspan="2"/>
<field name="property_product_pricelist_purchase"/> <field name="property_product_pricelist_purchase"/>
</group>
</page> </page>
</field> </field>
</record> </record>

View File

@ -99,10 +99,10 @@ class purchase_order(osv.osv):
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', states={'posted':[('readonly',True)]}), 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', states={'posted':[('readonly',True)]}),
'location_id': fields.many2one('stock.location', 'Delivery destination', required=True), 'location_id': fields.many2one('stock.location', 'Delivery destination', required=True),
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}), 'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}, help="The pricelist sets the currency used for this purchase order. It also computes the supplier price for the selected products/quantities."),
'state': fields.selection([('draft', 'Request for Quotation'), ('wait', 'Waiting'), ('confirmed', 'Confirmed'), ('approved', 'Approved'),('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Order State', readonly=True, help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.", select=True), 'state': fields.selection([('draft', 'Request for Quotation'), ('wait', 'Waiting'), ('confirmed', 'Confirmed'), ('approved', 'Approved'),('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Order State', readonly=True, help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.", select=True),
'order_line': fields.one2many('purchase.order.line', 'order_id', 'Order State', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}), 'order_line': fields.one2many('purchase.order.line', 'order_id', 'Order Lines', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}),
'validator' : fields.many2one('res.users', 'Validated by', readonly=True), 'validator' : fields.many2one('res.users', 'Validated by', readonly=True),
'notes': fields.text('Notes'), 'notes': fields.text('Notes'),
'invoice_id': fields.many2one('account.invoice', 'Invoice', readonly=True), 'invoice_id': fields.many2one('account.invoice', 'Invoice', readonly=True),
@ -331,7 +331,7 @@ class purchase_order_line(osv.osv):
} }
_table = 'purchase_order_line' _table = 'purchase_order_line'
_name = 'purchase.order.line' _name = 'purchase.order.line'
_description = 'Purchase Order line' _description = 'Purchase Order lines'
def copy(self, cr, uid, id, default=None,context={}): def copy(self, cr, uid, id, default=None,context={}):
if not default: if not default:
default = {} default = {}

View File

@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<terp> <terp>
<data> <data>
<record id="category_supplier" model="res.partner.category">
<field name="name">Suppliers</field>
</record>
<menuitem icon="terp-purchase" id="menu_purchase_root" name="Purchase Management"/> <menuitem icon="terp-purchase" id="menu_purchase_root" name="Purchase Management"/>
<record id="purchase_order_form" model="ir.ui.view"> <record id="purchase_order_form" model="ir.ui.view">
@ -13,23 +9,23 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Purchase Order"> <form string="Purchase Order">
<notebook> <group col="6" colspan="4">
<page string="Purchase Order">
<field name="name" select="1"/> <field name="name" select="1"/>
<group col="4" colspan="2">
<field name="shipped" select="2"/> <field name="shipped" select="2"/>
<field name="invoiced" select="2"/> <field name="invoiced" select="2"/>
</group>
<newline/> <newline/>
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)"/> <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)"/>
<field name="origin" select="2"/>
<field name="date_order" select="2"/> <field name="date_order" select="2"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" domain="[('category_id','child_of', [%(category_supplier)d])]"/> </group>
<notebook colspan="4">
<page string="Purchase Order">
<field name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" domain="[('supplier','=', 1)]"/>
<field name="partner_address_id"/> <field name="partner_address_id"/>
<field domain="[('type','=','purchase')]" name="pricelist_id"/> <field domain="[('type','=','purchase')]" name="pricelist_id"/>
<field name="partner_ref" select="2"/> <field name="partner_ref" select="2"/>
<newline/> <newline/>
<field colspan="4" name="order_line" nolabel="1" widget="one2many_list"/> <field colspan="4" name="order_line" nolabel="1" widget="one2many_list"/>
<separator colspan="4" select="2" string="Document State"/>
<group col="7" colspan="4"> <group col="7" colspan="4">
<field name="amount_untaxed" sum="Untaxed amount"/> <field name="amount_untaxed" sum="Untaxed amount"/>
<field name="amount_tax"/> <field name="amount_tax"/>
@ -53,7 +49,6 @@
<field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/> <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
<field name="location_id"/> <field name="location_id"/>
<field name="invoice_method"/> <field name="invoice_method"/>
<field name="origin" select="2"/>
<newline/> <newline/>
<field name="validator"/> <field name="validator"/>
<field name="date_approve"/> <field name="date_approve"/>

View File

@ -51,7 +51,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Sales orders"> <tree string="Sales orders">
<field name="date_order"/> <field name="date_order"/>
<field name="name"/> <field name="name" string="Reference"/>
<field name="partner_id"/> <field name="partner_id"/>
<field name="partner_shipping_id"/> <field name="partner_shipping_id"/>
<field name="picked_rate" widget="progressbar"/> <field name="picked_rate" widget="progressbar"/>
@ -68,16 +68,17 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Sales order"> <form string="Sales order">
<notebook> <group col="6" colspan="4">
<page string="Sale Order">
<field name="name" select="1"/> <field name="name" select="1"/>
<group col="4" colspan="2"> <field name="client_order_ref"/>
<field name="shipped" select="2"/> <field name="shipped" select="2"/>
<field name="shop_id" on_change="onchange_shop_id(shop_id)" select="2"/>
<field name="date_order" select="1"/>
<field name="invoiced" select="2"/> <field name="invoiced" select="2"/>
</group> </group>
<newline/> <notebook colspan="4">
<field name="date_order" select="1"/> <page string="Sale Order">
<field name="shop_id" on_change="onchange_shop_id(shop_id)" select="2"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)" required="1" select="1"/> <field name="partner_id" on_change="onchange_partner_id(partner_id)" required="1" select="1"/>
<field domain="[('partner_id','=',partner_id)]" name="partner_order_id"/> <field domain="[('partner_id','=',partner_id)]" name="partner_order_id"/>
<field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id"/> <field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id"/>
@ -166,7 +167,6 @@
<field name="order_policy"/> <field name="order_policy"/>
<field groups="base.group_extended" name="origin"/> <field groups="base.group_extended" name="origin"/>
<field groups="base.group_extended" name="invoice_quantity" attrs="{'readonly':[('order_policy','=','picking')]}"/> <field groups="base.group_extended" name="invoice_quantity" attrs="{'readonly':[('order_policy','=','picking')]}"/>
<field name="client_order_ref"/>
<separator colspan="4" string="Notes"/> <separator colspan="4" string="Notes"/>
<field colspan="4" name="note" nolabel="1"/> <field colspan="4" name="note" nolabel="1"/>
</page> </page>

View File

@ -43,7 +43,8 @@
"stock_report.xml", "stock_report.xml",
"stock_sequence.xml", "stock_sequence.xml",
"product_data.xml", "product_data.xml",
"product_view.xml" "product_view.xml",
"partner_view.xml"
], ],
"active": False, "active": False,
"installable": True "installable": True

View File

@ -11,10 +11,12 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/> <field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<page string="Properties" position="inside"> <page string="Sales &amp; Purchases" position="inside">
<group colspan="2" col="2">
<separator string="Stock Properties" colspan="2"/> <separator string="Stock Properties" colspan="2"/>
<field name="property_stock_customer"/> <field name="property_stock_customer"/>
<field name="property_stock_supplier"/> <field name="property_stock_supplier"/>
</group>
</page> </page>
</field> </field>
</record> </record>

View File

@ -8,12 +8,14 @@
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="product.product_category_form_view"/> <field name="inherit_id" ref="product.product_category_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<group string="Properties" position="inside"> <form position="inside">
<separator string="Stock Accounting" colspan="4"/> <group col="2" colspan="2">
<separator string="Accounting Stock Properties" colspan="2"/>
<field name="property_stock_account_input_categ"/> <field name="property_stock_account_input_categ"/>
<field name="property_stock_account_output_categ"/> <field name="property_stock_account_output_categ"/>
<field name="property_stock_journal"/> <field name="property_stock_journal"/>
</group> </group>
</form>
</field> </field>
</record> </record>

View File

@ -1136,6 +1136,8 @@ class product_product(osv.osv):
# Utiliser browse pour limiter les queries ! # Utiliser browse pour limiter les queries !
# #
def view_header_get(self, cr, user, view_id, view_type, context): def view_header_get(self, cr, user, view_id, view_type, context):
res = super(product_product, self).view_header_get(cr, user, view_id, view_type, context)
if res: return res
if (not context.get('location', False)): if (not context.get('location', False)):
return False return False
cr.execute('select name from stock_location where id=%d', (context['location'],)) cr.execute('select name from stock_location where id=%d', (context['location'],))

View File

@ -55,20 +55,19 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Lot Inventory"> <form string="Lot Inventory">
<notebook>
<page string="General Informations">
<field name="name" select="1"/> <field name="name" select="1"/>
<field name="date" select="1"/> <field name="date" select="1"/>
<notebook colspan="4">
<page string="General Informations">
<field colspan="4" name="inventory_line_id" nolabel="1" widget="one2many_list"/> <field colspan="4" name="inventory_line_id" nolabel="1" widget="one2many_list"/>
</page><page string="Posted Inventory">
<field colspan="4" name="move_ids" nolabel="1"/>
<field name="state" select="1"/> <field name="state" select="1"/>
<group col="2" colspan="2"> <group col="2" colspan="2">
<button name="action_done" states="draft" string="Confirm Inventory" type="object"/> <button name="action_done" states="draft" string="Confirm Inventory" type="object"/>
<button name="action_cancel" states="done" string="Cancel Inventory" type="object"/> <button name="action_cancel" states="done" string="Cancel Inventory" type="object"/>
</group> </group>
</page> </page>
<page string="Posted Inventory">
<field colspan="4" name="move_ids" nolabel="1"/>
</page>
</notebook> </notebook>
</form> </form>
</field> </field>
@ -185,7 +184,6 @@
<field name="name" select="1"/> <field name="name" select="1"/>
<field name="ref" select="1"/> <field name="ref" select="1"/>
<field name="date" select="1"/> <field name="date" select="1"/>
<separator colspan="4" string="Revisions"/>
<field colspan="4" name="revisions" nolabel="1" widget="one2many_list"/> <field colspan="4" name="revisions" nolabel="1" widget="one2many_list"/>
</form> </form>
</field> </field>
@ -310,27 +308,27 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Stock location"> <form string="Stock location">
<notebook>
<page string="General Informations">
<field name="name" select="1"/> <field name="name" select="1"/>
<field name="active" select="2"/> <field name="active" select="2"/>
<field name="usage" select="1"/> <field name="usage" select="1"/>
<field name="account_id" select="1"/> <field name="account_id" select="1"/>
<field name="location_id"/> <field name="location_id"/>
<field name="address_id"/> <field name="address_id"/>
<group col="2" colspan="2">
<separator string="Chained Locations" colspan="2"/>
<field name="chained_location_type"/> <field name="chained_location_type"/>
<field name="chained_location_id"/> <field name="chained_location_id"/>
<field name="chained_auto_packing"/> <field name="chained_auto_packing"/>
<field name="chained_delay"/> <field name="chained_delay"/>
<newline/> </group>
<field colspan="4" name="comment"/> <group col="2" colspan="2">
</page> <separator string="Localisation" colspan="2"/>>
<page string="Localisation">
<field name="posx"/> <field name="posx"/>
<field name="posy"/> <field name="posy"/>
<field name="posz"/> <field name="posz"/>
</page> </group>
</notebook> <separator string="Additional Information" colspan="4"/>
<field colspan="4" name="comment" nolabel="1"/>
</form> </form>
</field> </field>
</record> </record>
@ -538,12 +536,12 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Packing list"> <form string="Packing list">
<notebook>
<page string="General Information">
<field name="name" select="1"/> <field name="name" select="1"/>
<field name="date" select="1"/> <field name="date" select="1"/>
<newline/> <newline/>
<field name="address_id" select="2"/> <field name="address_id" select="2"/>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list"> <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list">
<form string="Stock Moves"> <form string="Stock Moves">
<separator colspan="4" string="Move Information"/> <separator colspan="4" string="Move Information"/>
@ -693,12 +691,12 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Packing list"> <form string="Packing list">
<notebook>
<page string="General Information">
<field name="name" select="1"/> <field name="name" select="1"/>
<field name="date" select="1"/> <field name="date" select="1"/>
<newline/> <newline/>
<field name="address_id" select="2"/> <field name="address_id" select="2"/>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list"> <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list">
<form string="Stock Moves"> <form string="Stock Moves">
<separator colspan="4" string="Move Information"/> <separator colspan="4" string="Move Information"/>
@ -845,15 +843,14 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Input Packing List"> <form string="Input Packing List">
<notebook>
<page string="General Information">
<field name="address_id" on_change="onchange_partner_in(address_id)" select="2"/> <field name="address_id" on_change="onchange_partner_in(address_id)" select="2"/>
<field name="name" readonly="1" select="1"/> <field name="name" readonly="1" select="1"/>
<field name="location_id"/> <field name="location_id"/>
<field domain="[('usage','=','internal')]" name="location_dest_id"/> <field domain="[('usage','=','internal')]" name="location_dest_id"/>
<field name="invoice_state" select="2" string="Supplier Invoice Control"/> <field name="invoice_state" select="2" string="Supplier Invoice Control"/>
<field name="origin" select="2"/> <field name="origin" select="2"/>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list"> <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list">
<tree string="Stock Moves"> <tree string="Stock Moves">
<field name="product_id"/> <field name="product_id"/>
@ -884,7 +881,6 @@
<newline/> <newline/>
<label/> <label/>
<button groups="base.group_extended" name="%(track_line)d" string="Split in production lots" type="action"/> <button groups="base.group_extended" name="%(track_line)d" string="Split in production lots" type="action"/>
<separator colspan="4" string="Move State"/> <separator colspan="4" string="Move State"/>
<field name="state" select="1"/> <field name="state" select="1"/>
<group> <group>
@ -896,7 +892,6 @@
<group col="7" colspan="4"> <group col="7" colspan="4">
<label colspan="5"/> <label colspan="5"/>
<button name="llk" string="Fill From Unreceived Products" type="action"/> <button name="llk" string="Fill From Unreceived Products" type="action"/>
<button groups="base.group_extended" name="%(move_split)d" string="Split move lines in two" type="action"/>
</group> </group>
<group col="8" colspan="4"> <group col="8" colspan="4">
<field name="state" readonly="1"/> <field name="state" readonly="1"/>
@ -1211,7 +1206,5 @@
target="new" target="new"
id="act_stock_picking_move_wizard"/> id="act_stock_picking_move_wizard"/>
</data> </data>
</terp> </terp>