parent
7f51b40014
commit
97dd8d1a25
|
@ -488,6 +488,11 @@ class account_move_line(osv.osv):
|
|||
return r_id
|
||||
|
||||
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)):
|
||||
return False
|
||||
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'],))
|
||||
p = cr.fetchone()[0] or ''
|
||||
if j or p:
|
||||
return j+':'+p
|
||||
return 'Journal'
|
||||
return j+(p and (':'+p) or '')
|
||||
return 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)
|
||||
|
@ -709,7 +714,6 @@ class account_move_line(osv.osv):
|
|||
tax_id=tax_obj.browse(cr,uid,vals['account_tax_id'])
|
||||
total = vals['credit'] or (-vals['debit'])
|
||||
for tax in tax_obj.compute(cr,uid,[tax_id],total,1.00):
|
||||
print 'Processing Tax', tax
|
||||
self.write(cr, uid,[result], {
|
||||
'tax_code_id': tax['base_code_id'],
|
||||
'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,
|
||||
'debit': tax['amount']<0 and -tax['amount'] or 0.0,
|
||||
}
|
||||
print data
|
||||
self.create(cr, uid, data, context)
|
||||
if check:
|
||||
self.pool.get('account.move').validate(cr, uid, [vals['move_id']], context)
|
||||
|
|
|
@ -887,7 +887,7 @@
|
|||
<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"/>
|
||||
<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"/>
|
||||
|
||||
|
||||
|
@ -1318,17 +1318,18 @@
|
|||
</record>
|
||||
|
||||
<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="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('account_id','child_of', [active_id]),('state','<>','draft')]</field>
|
||||
<field name="context">{'account_id':active_id}</field>
|
||||
</record>
|
||||
<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">
|
||||
<field eval="'tree_but_open'" name="key2"/>
|
||||
<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="True" name="object"/>
|
||||
</record>
|
||||
|
@ -1513,14 +1514,14 @@
|
|||
<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"/>
|
||||
|
||||
<!-- Account Chart Templates -->
|
||||
<!-- Chart of Accounts Templates -->
|
||||
|
||||
<record id="view_account_chart_template_form" model="ir.ui.view">
|
||||
<field name="name">account.chart.template.form</field>
|
||||
<field name="model">account.chart.template</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Chart Template">
|
||||
<form string="Chart of Accounts Template">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<newline/>
|
||||
<field name="account_root_id" select="1"/>
|
||||
|
@ -1537,7 +1538,7 @@
|
|||
<field name="model">account.chart.template</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Account Chart Template">
|
||||
<tree string="Chart of Accounts Template">
|
||||
<field name="name"/>
|
||||
<field name="account_root_id"/>
|
||||
<field name="bank_account_view_id"/>
|
||||
|
@ -1545,7 +1546,7 @@
|
|||
</field>
|
||||
</record>
|
||||
<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="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
@ -1597,7 +1598,7 @@
|
|||
<field name="model">wizard.account.chart.duplicate</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Duplicate Account Chart">
|
||||
<form string="Duplicate Chart of Accounts">
|
||||
<field name="account_id"/>
|
||||
<field name="company_id"/>
|
||||
<newline/>
|
||||
|
@ -1610,7 +1611,7 @@
|
|||
</record>
|
||||
|
||||
<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="res_model">wizard.account.chart.duplicate</field>
|
||||
<field name="view_type">form</field>
|
||||
|
|
|
@ -5,20 +5,6 @@
|
|||
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">
|
||||
<field name="name">res.partner.property.form.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
|
@ -26,16 +12,56 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Properties" position="inside">
|
||||
<newline/>
|
||||
<separator string="Customer Accounting Properties" colspan="2"/>
|
||||
<separator string="Supplier Accounting Properties" colspan="2"/>
|
||||
<field name="property_account_receivable"/>
|
||||
<field name="property_account_payable"/>
|
||||
<field name="property_account_tax"/>
|
||||
<field name="property_account_supplier_tax"/>
|
||||
<field name="property_payment_term"/>
|
||||
</page>
|
||||
<notebook>
|
||||
<page string="Accounting" position="inside">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Customer Accounting Properties" colspan="2"/>
|
||||
<field name="property_account_receivable"/>
|
||||
<field name="property_account_tax"/>
|
||||
<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>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -50,10 +50,13 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="product.product_category_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<group string="Properties" position="inside">
|
||||
<field name="property_account_income_categ"/>
|
||||
<field name="property_account_expense_categ"/>
|
||||
</group>
|
||||
<form position="inside">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Accounting Properties" colspan="2"/>
|
||||
<field name="property_account_income_categ"/>
|
||||
<field name="property_account_expense_categ"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<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">
|
||||
<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="res_model">account.analytic.account</field>
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
|
|
|
@ -52,7 +52,10 @@ class wizard_move_line_select(wizard.interface):
|
|||
result = mod_obj._get_id(cr, uid, 'account', 'action_move_line_tree1')
|
||||
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
|
||||
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]
|
||||
return result
|
||||
|
||||
|
|
|
@ -124,10 +124,9 @@
|
|||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="client_order_ref" position="after">
|
||||
<separator string="Notes" position="before">
|
||||
<field name="carrier_id"/>
|
||||
|
||||
</field>
|
||||
</separator>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
@ -195,4 +194,4 @@
|
|||
|
||||
|
||||
</data>
|
||||
</terp>
|
||||
</terp>
|
||||
|
|
|
@ -318,7 +318,7 @@
|
|||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Extra Info" position="after">
|
||||
<notebook position="inside">
|
||||
<page string="Membership">
|
||||
<field name="membership_state" select="2"/>
|
||||
<field name="membership_amount" select="2"/>
|
||||
|
@ -341,7 +341,7 @@
|
|||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -7,9 +7,12 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Properties" position="inside">
|
||||
<separator string="Sales" colspan="4"/>
|
||||
<field name="property_product_pricelist"/>
|
||||
<page string="Sales & Purchases" position="inside">
|
||||
<newline/>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Sales" colspan="2"/>
|
||||
<field name="property_product_pricelist"/>
|
||||
</group>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -328,6 +328,13 @@ class product_template(osv.osv):
|
|||
product_template()
|
||||
|
||||
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={}):
|
||||
res = {}
|
||||
quantity = context.get('quantity', 1)
|
||||
|
|
|
@ -46,64 +46,64 @@
|
|||
</group>
|
||||
<notebook>
|
||||
<page string="Information">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Procurement" colspan="2"/>
|
||||
<field name="type" select="2"/>
|
||||
<field name="procure_method"/>
|
||||
<field name="supply_method"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Procurement" colspan="2"/>
|
||||
<field name="type" select="2"/>
|
||||
<field name="procure_method"/>
|
||||
<field name="supply_method"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Weigths" colspan="2"/>
|
||||
<field digits="(14, 3)" groups="base.group_extended" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
|
||||
<field digits="(14, 3)" groups="base.group_extended" name="weight" attrs="{'readonly':[('type','=','service')]}"/>
|
||||
<field digits="(14, 3)" groups="base.group_extended" name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Weigths" colspan="2"/>
|
||||
<field digits="(14, 3)" groups="base.group_extended" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
|
||||
<field digits="(14, 3)" groups="base.group_extended" name="weight" attrs="{'readonly':[('type','=','service')]}"/>
|
||||
<field digits="(14, 3)" groups="base.group_extended" name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2" name="status">
|
||||
<separator string="Status" colspan="2"/>
|
||||
<field name="categ_id" select="1"/>
|
||||
<field name="state" select="2"/>
|
||||
<field groups="base.group_extended" name="product_manager" select="2"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" name="status">
|
||||
<separator string="Status" colspan="2"/>
|
||||
<field name="categ_id" select="1"/>
|
||||
<field name="state" select="2"/>
|
||||
<field groups="base.group_extended" name="product_manager" select="2"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2" name="uom">
|
||||
<separator string="Lots" colspan="2"/>
|
||||
<field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)"/>
|
||||
<field name="uom_po_id"/>
|
||||
<field name="tracking"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" name="uom">
|
||||
<separator string="Lots" colspan="2"/>
|
||||
<field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)"/>
|
||||
<field name="uom_po_id"/>
|
||||
<field name="tracking"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2" name="uom">
|
||||
<separator string="Second UoM" colspan="2"/>
|
||||
<field name="uos_id"/>
|
||||
<field name="uos_coeff"/>
|
||||
<field name="mes_type"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" name="uom">
|
||||
<separator string="Second UoM" colspan="2"/>
|
||||
<field name="uos_id"/>
|
||||
<field name="uos_coeff"/>
|
||||
<field name="mes_type"/>
|
||||
</group>
|
||||
|
||||
</page>
|
||||
<page string="Procurement & Locations">
|
||||
<group colspan="2" col="2" name="delay">
|
||||
<separator string="Delays" colspan="2"/>
|
||||
<field name="sale_delay" attrs="{'readonly':[('sale_ok','=',0)]}"/>
|
||||
<field name="produce_delay"/>
|
||||
<field name="warranty"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" name="store">
|
||||
<separator string="Storage Localisation" colspan="2"/>
|
||||
<field name="loc_rack"/>
|
||||
<field name="loc_row"/>
|
||||
<field name="loc_case"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" name="delay">
|
||||
<separator string="Delays" colspan="2"/>
|
||||
<field name="sale_delay" attrs="{'readonly':[('sale_ok','=',0)]}"/>
|
||||
<field name="produce_delay"/>
|
||||
<field name="warranty"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" name="store">
|
||||
<separator string="Storage Localisation" colspan="2"/>
|
||||
<field name="loc_rack"/>
|
||||
<field name="loc_row"/>
|
||||
<field name="loc_case"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2" name="misc">
|
||||
<separator string="Miscelleanous" colspan="2"/>
|
||||
<field name="active" select="2"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" name="misc">
|
||||
<separator string="Miscelleanous" colspan="2"/>
|
||||
<field name="active" select="2"/>
|
||||
</group>
|
||||
|
||||
</page>
|
||||
<page string="Prices">
|
||||
<separator string="Base Prices" colspan="4"/>
|
||||
<separator string="Base Prices" colspan="4"/>
|
||||
<field name="standard_price"/>
|
||||
<field name="list_price"/>
|
||||
<field groups="base.group_extended" name="cost_method"/>
|
||||
|
@ -162,8 +162,7 @@
|
|||
<field name="name" select="1"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="sequence"/>
|
||||
<group string="Properties" colspan="4" groups="base.group_extended">
|
||||
</group>
|
||||
<newline/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -199,12 +198,13 @@
|
|||
|
||||
|
||||
<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="res_model">product.product</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('categ_id','child_of',[active_id])]</field>
|
||||
<field name="context">{'categ_id':active_id}</field>
|
||||
</record>
|
||||
<record id="ir_product_category_open" model="ir.values">
|
||||
<field eval="'tree_but_open'" name="key2"/>
|
||||
|
|
|
@ -7,9 +7,11 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Properties" position="inside">
|
||||
<separator string="Purchases" colspan="4"/>
|
||||
<field name="property_product_pricelist_purchase"/>
|
||||
<page string="Sales & Purchases" position="inside">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Purchases" colspan="2"/>
|
||||
<field name="property_product_pricelist_purchase"/>
|
||||
</group>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -99,10 +99,10 @@ class purchase_order(osv.osv):
|
|||
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', states={'posted':[('readonly',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),
|
||||
'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),
|
||||
'notes': fields.text('Notes'),
|
||||
'invoice_id': fields.many2one('account.invoice', 'Invoice', readonly=True),
|
||||
|
@ -331,7 +331,7 @@ class purchase_order_line(osv.osv):
|
|||
}
|
||||
_table = 'purchase_order_line'
|
||||
_name = 'purchase.order.line'
|
||||
_description = 'Purchase Order line'
|
||||
_description = 'Purchase Order lines'
|
||||
def copy(self, cr, uid, id, default=None,context={}):
|
||||
if not default:
|
||||
default = {}
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<terp>
|
||||
<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"/>
|
||||
|
||||
<record id="purchase_order_form" model="ir.ui.view">
|
||||
|
@ -13,23 +9,23 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Purchase Order">
|
||||
<notebook>
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="shipped" select="2"/>
|
||||
<field name="invoiced" select="2"/>
|
||||
<newline/>
|
||||
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)"/>
|
||||
<field name="origin" select="2"/>
|
||||
<field name="date_order" select="2"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Purchase Order">
|
||||
<field name="name" select="1"/>
|
||||
<group col="4" colspan="2">
|
||||
<field name="shipped" select="2"/>
|
||||
<field name="invoiced" select="2"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)"/>
|
||||
<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])]"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" domain="[('supplier','=', 1)]"/>
|
||||
<field name="partner_address_id"/>
|
||||
<field domain="[('type','=','purchase')]" name="pricelist_id"/>
|
||||
<field name="partner_ref" select="2"/>
|
||||
<newline/>
|
||||
<field colspan="4" name="order_line" nolabel="1" widget="one2many_list"/>
|
||||
<separator colspan="4" select="2" string="Document State"/>
|
||||
<group col="7" colspan="4">
|
||||
<field name="amount_untaxed" sum="Untaxed amount"/>
|
||||
<field name="amount_tax"/>
|
||||
|
@ -53,7 +49,6 @@
|
|||
<field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
|
||||
<field name="location_id"/>
|
||||
<field name="invoice_method"/>
|
||||
<field name="origin" select="2"/>
|
||||
<newline/>
|
||||
<field name="validator"/>
|
||||
<field name="date_approve"/>
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<tree string="Sales orders">
|
||||
<field name="date_order"/>
|
||||
<field name="name"/>
|
||||
<field name="name" string="Reference"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="partner_shipping_id"/>
|
||||
<field name="picked_rate" widget="progressbar"/>
|
||||
|
@ -68,16 +68,17 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sales order">
|
||||
<notebook>
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="client_order_ref"/>
|
||||
<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"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Sale Order">
|
||||
<field name="name" select="1"/>
|
||||
<group col="4" colspan="2">
|
||||
<field name="shipped" select="2"/>
|
||||
<field name="invoiced" select="2"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<field name="date_order" select="1"/>
|
||||
<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 domain="[('partner_id','=',partner_id)]" name="partner_order_id"/>
|
||||
<field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id"/>
|
||||
|
@ -166,7 +167,6 @@
|
|||
<field name="order_policy"/>
|
||||
<field groups="base.group_extended" name="origin"/>
|
||||
<field groups="base.group_extended" name="invoice_quantity" attrs="{'readonly':[('order_policy','=','picking')]}"/>
|
||||
<field name="client_order_ref"/>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
</page>
|
||||
|
|
|
@ -43,7 +43,8 @@
|
|||
"stock_report.xml",
|
||||
"stock_sequence.xml",
|
||||
"product_data.xml",
|
||||
"product_view.xml"
|
||||
"product_view.xml",
|
||||
"partner_view.xml"
|
||||
],
|
||||
"active": False,
|
||||
"installable": True
|
||||
|
|
|
@ -11,10 +11,12 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Properties" position="inside">
|
||||
<separator string="Stock Properties" colspan="2"/>
|
||||
<field name="property_stock_customer"/>
|
||||
<field name="property_stock_supplier"/>
|
||||
<page string="Sales & Purchases" position="inside">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Stock Properties" colspan="2"/>
|
||||
<field name="property_stock_customer"/>
|
||||
<field name="property_stock_supplier"/>
|
||||
</group>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -8,12 +8,14 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="product.product_category_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<group string="Properties" position="inside">
|
||||
<separator string="Stock Accounting" colspan="4"/>
|
||||
<field name="property_stock_account_input_categ"/>
|
||||
<field name="property_stock_account_output_categ"/>
|
||||
<field name="property_stock_journal"/>
|
||||
</group>
|
||||
<form position="inside">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Accounting Stock Properties" colspan="2"/>
|
||||
<field name="property_stock_account_input_categ"/>
|
||||
<field name="property_stock_account_output_categ"/>
|
||||
<field name="property_stock_journal"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
@ -48,8 +50,8 @@
|
|||
<field name="property_stock_account_input"/>
|
||||
<field name="property_stock_account_output"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_normal_stock_property_form" model="ir.ui.view">
|
||||
<field name="name">product.normal.stock.form.inherit</field>
|
||||
|
@ -58,13 +60,13 @@
|
|||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="status" position="after">
|
||||
<group colspan="2" col="2">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Stocks" colspan="4"/>
|
||||
<field name="qty_available"/>
|
||||
<field name="virtual_available"/>
|
||||
<field name="incoming_qty"/>
|
||||
<field name="outgoing_qty"/>
|
||||
</group>
|
||||
<field name="qty_available"/>
|
||||
<field name="virtual_available"/>
|
||||
<field name="incoming_qty"/>
|
||||
<field name="outgoing_qty"/>
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -76,12 +78,12 @@
|
|||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="store" position="after">
|
||||
<group col="2" colspan="2" name="store">
|
||||
<separator string="Counter-Part Locations" colspan="2"/>
|
||||
<field name="property_stock_procurement"/>
|
||||
<field name="property_stock_production"/>
|
||||
<field name="property_stock_inventory"/>
|
||||
</group>
|
||||
<group col="2" colspan="2" name="store">
|
||||
<separator string="Counter-Part Locations" colspan="2"/>
|
||||
<field name="property_stock_procurement"/>
|
||||
<field name="property_stock_production"/>
|
||||
<field name="property_stock_inventory"/>
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -1136,6 +1136,8 @@ class product_product(osv.osv):
|
|||
# Utiliser browse pour limiter les queries !
|
||||
#
|
||||
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)):
|
||||
return False
|
||||
cr.execute('select name from stock_location where id=%d', (context['location'],))
|
||||
|
|
|
@ -55,20 +55,19 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Lot Inventory">
|
||||
<notebook>
|
||||
<page string="General Informations">
|
||||
<field name="name" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<field colspan="4" name="inventory_line_id" nolabel="1" widget="one2many_list"/>
|
||||
<field name="state" select="1"/>
|
||||
<group col="2" colspan="2">
|
||||
<button name="action_done" states="draft" string="Confirm Inventory" type="object"/>
|
||||
<button name="action_cancel" states="done" string="Cancel Inventory" type="object"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Posted Inventory">
|
||||
<field colspan="4" name="move_ids" nolabel="1"/>
|
||||
</page>
|
||||
<field name="name" 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"/>
|
||||
</page><page string="Posted Inventory">
|
||||
<field colspan="4" name="move_ids" nolabel="1"/>
|
||||
<field name="state" select="1"/>
|
||||
<group col="2" colspan="2">
|
||||
<button name="action_done" states="draft" string="Confirm Inventory" type="object"/>
|
||||
<button name="action_cancel" states="done" string="Cancel Inventory" type="object"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -185,7 +184,6 @@
|
|||
<field name="name" select="1"/>
|
||||
<field name="ref" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<separator colspan="4" string="Revisions"/>
|
||||
<field colspan="4" name="revisions" nolabel="1" widget="one2many_list"/>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -310,27 +308,27 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock location">
|
||||
<notebook>
|
||||
<page string="General Informations">
|
||||
<field name="name" select="1"/>
|
||||
<field name="active" select="2"/>
|
||||
<field name="usage" select="1"/>
|
||||
<field name="account_id" select="1"/>
|
||||
<field name="location_id"/>
|
||||
<field name="address_id"/>
|
||||
<field name="chained_location_type"/>
|
||||
<field name="chained_location_id"/>
|
||||
<field name="chained_auto_packing"/>
|
||||
<field name="chained_delay"/>
|
||||
<newline/>
|
||||
<field colspan="4" name="comment"/>
|
||||
</page>
|
||||
<page string="Localisation">
|
||||
<field name="posx"/>
|
||||
<field name="posy"/>
|
||||
<field name="posz"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<field name="name" select="1"/>
|
||||
<field name="active" select="2"/>
|
||||
<field name="usage" select="1"/>
|
||||
<field name="account_id" select="1"/>
|
||||
<field name="location_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_id"/>
|
||||
<field name="chained_auto_packing"/>
|
||||
<field name="chained_delay"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Localisation" colspan="2"/>>
|
||||
<field name="posx"/>
|
||||
<field name="posy"/>
|
||||
<field name="posz"/>
|
||||
</group>
|
||||
<separator string="Additional Information" colspan="4"/>
|
||||
<field colspan="4" name="comment" nolabel="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -538,12 +536,12 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Packing list">
|
||||
<notebook>
|
||||
<field name="name" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<newline/>
|
||||
<field name="address_id" select="2"/>
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
<field name="name" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<newline/>
|
||||
<field name="address_id" select="2"/>
|
||||
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list">
|
||||
<form string="Stock Moves">
|
||||
<separator colspan="4" string="Move Information"/>
|
||||
|
@ -693,12 +691,12 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Packing list">
|
||||
<notebook>
|
||||
<field name="name" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<newline/>
|
||||
<field name="address_id" select="2"/>
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
<field name="name" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<newline/>
|
||||
<field name="address_id" select="2"/>
|
||||
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list">
|
||||
<form string="Stock Moves">
|
||||
<separator colspan="4" string="Move Information"/>
|
||||
|
@ -845,15 +843,14 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Input Packing List">
|
||||
<notebook>
|
||||
<field name="address_id" on_change="onchange_partner_in(address_id)" select="2"/>
|
||||
<field name="name" readonly="1" select="1"/>
|
||||
<field name="location_id"/>
|
||||
<field domain="[('usage','=','internal')]" name="location_dest_id"/>
|
||||
<field name="invoice_state" select="2" string="Supplier Invoice Control"/>
|
||||
<field name="origin" select="2"/>
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
<field name="address_id" on_change="onchange_partner_in(address_id)" select="2"/>
|
||||
<field name="name" readonly="1" select="1"/>
|
||||
<field name="location_id"/>
|
||||
<field domain="[('usage','=','internal')]" name="location_dest_id"/>
|
||||
<field name="invoice_state" select="2" string="Supplier Invoice Control"/>
|
||||
<field name="origin" select="2"/>
|
||||
|
||||
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list">
|
||||
<tree string="Stock Moves">
|
||||
<field name="product_id"/>
|
||||
|
@ -884,7 +881,6 @@
|
|||
<newline/>
|
||||
<label/>
|
||||
<button groups="base.group_extended" name="%(track_line)d" string="Split in production lots" type="action"/>
|
||||
|
||||
<separator colspan="4" string="Move State"/>
|
||||
<field name="state" select="1"/>
|
||||
<group>
|
||||
|
@ -896,7 +892,6 @@
|
|||
<group col="7" colspan="4">
|
||||
<label colspan="5"/>
|
||||
<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 col="8" colspan="4">
|
||||
<field name="state" readonly="1"/>
|
||||
|
@ -1186,32 +1181,30 @@
|
|||
<field eval="True" name="object"/>
|
||||
</record>
|
||||
|
||||
<record id="stock_picking_move_wizard_form" model="ir.ui.view">
|
||||
<record id="stock_picking_move_wizard_form" model="ir.ui.view">
|
||||
<field name="name">stock.picking.move.wizard.form</field>
|
||||
<field name="model">stock.picking.move.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Move Lines">
|
||||
<form string="Move Lines">
|
||||
<field name="address_id" invisible="True"/>
|
||||
<field name="picking_id" invisible="True"/>
|
||||
<field name="picking_id" invisible="True"/>
|
||||
<field domain="[('picking_id','<>',picking_id),('address_id','=',address_id),('state','in',['confirmed','assigned'])]" name="move_ids" select="1"/><newline/>
|
||||
<group colspan="4">
|
||||
<button special="cancel" string="Cancel"/>
|
||||
<button name="action_move" string="Add" type="object"/>
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<button special="cancel" string="Cancel"/>
|
||||
<button name="action_move" string="Add" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Get move lines"
|
||||
context="{'action_id': active_id}"
|
||||
res_model="stock.picking.move.wizard"
|
||||
src_model="stock.picking"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
id="act_stock_picking_move_wizard"/>
|
||||
|
||||
|
||||
|
||||
<act_window name="Get move lines"
|
||||
context="{'action_id': active_id}"
|
||||
res_model="stock.picking.move.wizard"
|
||||
src_model="stock.picking"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
id="act_stock_picking_move_wizard"/>
|
||||
|
||||
</data>
|
||||
</terp>
|
||||
|
|
Loading…
Reference in New Issue