[MERGE] Merge with lp:openobject-addons

bzr revid: sbh@tinyerp.com-20120516043048-pkd9klih8jdszhni
This commit is contained in:
Sbh (Openerp) 2012-05-16 10:00:48 +05:30
commit e51ed975f3
131 changed files with 1312 additions and 1175 deletions

View File

@ -106,6 +106,7 @@ module named account_voucher.
'partner_view.xml',
'data/account_data.xml',
'data/data_account_type.xml',
'data/configurable_account_chart.xml',
'account_invoice_workflow.xml',
'project/project_view.xml',
'project/project_report.xml',

View File

@ -27,7 +27,7 @@ class account_analytic_line(osv.osv):
_inherit = 'account.analytic.line'
_description = 'Analytic Line'
_columns = {
'product_uom_id': fields.many2one('product.uom', 'UoM'),
'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),
'product_id': fields.many2one('product.product', 'Product'),
'general_account_id': fields.many2one('account.account', 'General Account', required=True, ondelete='restrict'),
'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='cascade', select=True),

View File

@ -474,7 +474,7 @@ class account_move_line(osv.osv):
_columns = {
'name': fields.char('Name', size=64, required=True),
'quantity': fields.float('Quantity', digits=(16,2), help="The optional quantity expressed by this line, eg: number of product sold. The quantity is not a legal requirement but is very useful for some reports."),
'product_uom_id': fields.many2one('product.uom', 'UoM'),
'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),
'product_id': fields.many2one('product.product', 'Product'),
'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),
'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),

View File

@ -123,11 +123,6 @@ class account_installer(osv.osv_memory):
context = {}
fy_obj = self.pool.get('account.fiscalyear')
for res in self.read(cr, uid, ids, context=context):
if 'charts' in res and res['charts'] == 'configurable':
#load generic chart of account
fp = tools.file_open(opj('account', 'configurable_account_chart.xml'))
tools.convert_xml_import(cr, 'account', fp, {}, 'init', True, None)
fp.close()
if 'date_start' in res and 'date_stop' in res:
f_ids = fy_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id', '=', res['company_id'][0])], context=context)
if not f_ids:

View File

@ -43,7 +43,7 @@ class analytic_entries_report(osv.osv):
'journal_id': fields.many2one('account.analytic.journal', 'Journal', required=True),
'move_id': fields.many2one('account.move.line', 'Move', required=True),
'product_id': fields.many2one('product.product', 'Product', required=True),
'product_uom_id': fields.many2one('product.uom', 'Product UOM', required=True),
'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'amount': fields.float('Amount', readonly=True),
'unit_amount': fields.float('Quantity', readonly=True),
'nbr': fields.integer('#Entries', readonly=True),

View File

@ -76,7 +76,7 @@
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<filter string="Product UOM" icon="terp-mrp" context="{'group_by':'product_uom_id'}"/>
<filter string="Product Unit of Measure" icon="terp-mrp" context="{'group_by':'product_uom_id'}"/>
<separator orientation="vertical" groups="base.group_multi_company"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>

View File

@ -50,7 +50,7 @@ class account_entries_report(osv.osv):
'journal_id': fields.many2one('account.journal', 'Journal', readonly=True),
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_uom_id': fields.many2one('product.uom', 'Product UOM', readonly=True),
'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure', readonly=True),
'move_state': fields.selection([('draft','Unposted'), ('posted','Posted')], 'State', readonly=True),
'move_line_state': fields.selection([('draft','Unbalanced'), ('valid','Valid')], 'State of Move Line', readonly=True),
'reconcile_id': fields.many2one('account.move.reconcile', readonly=True),

View File

@ -36,7 +36,7 @@ class account_invoice_report(osv.osv):
('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_qty':fields.float('Qty', readonly=True),
'uom_name': fields.char('Reference UoM', size=128, readonly=True),
'uom_name': fields.char('Reference Unit of Measure', size=128, readonly=True),
'payment_term': fields.many2one('account.payment.term', 'Payment Term', readonly=True),
'period_id': fields.many2one('account.period', 'Force Period', domain=[('state','<>','done')], readonly=True),
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position', readonly=True),

View File

@ -36,11 +36,11 @@ class account_config_settings(osv.osv_memory):
_columns = {
'company_id': fields.many2one('res.company', 'Company', required=True),
'has_default_company': fields.boolean('Has default company', readonly=True),
'expects_chart_of_accounts': fields.related('company_id', 'expects_chart_of_accounts', type='boolean',
string='Chart of Accounts for this Company'),
string='Chart of Accounts for this Company',
help="""Check this box if this company is a legal entity."""),
'currency_id': fields.related('company_id', 'currency_id', type='many2one', relation='res.currency', required=True,
string='Main currency', help="Main currency of the company."),
string='Default Company Currency', help="Main currency of the company."),
'paypal_account': fields.related('company_id', 'paypal_account', type='char', size=128,
string='Paypal Account', help="Paypal account (email) for receiving online payments (credit card, etc.)"),
'company_footer': fields.related('company_id', 'rml_footer2', type='char', size=250, readonly=True,
@ -65,31 +65,31 @@ class account_config_settings(osv.osv_memory):
'sale_sequence_prefix': fields.related('sale_journal_id', 'sequence_id', 'prefix', type='char', string='Invoice Sequence'),
'sale_sequence_next': fields.related('sale_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Invoice Number'),
'sale_refund_journal_id': fields.many2one('account.journal', 'Sale Refund Journal'),
'sale_refund_sequence_prefix': fields.related('sale_refund_journal_id', 'sequence_id', 'prefix', type='char', string='Refund Sequence'),
'sale_refund_sequence_next': fields.related('sale_refund_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Refund Number'),
'sale_refund_sequence_prefix': fields.related('sale_refund_journal_id', 'sequence_id', 'prefix', type='char', string='Credit Note Sequence'),
'sale_refund_sequence_next': fields.related('sale_refund_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Credit Note Number'),
'purchase_journal_id': fields.many2one('account.journal', 'Purchase Journal'),
'purchase_sequence_prefix': fields.related('purchase_journal_id', 'sequence_id', 'prefix', type='char', string='Supplier Invoice Sequence'),
'purchase_sequence_next': fields.related('purchase_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Supplier Invoice Number'),
'purchase_refund_journal_id': fields.many2one('account.journal', 'Purchase Refund Journal'),
'purchase_refund_sequence_prefix': fields.related('purchase_refund_journal_id', 'sequence_id', 'prefix', type='char', string='Supplier Refund Sequence'),
'purchase_refund_sequence_next': fields.related('purchase_refund_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Supplier Refund Number'),
'purchase_refund_sequence_prefix': fields.related('purchase_refund_journal_id', 'sequence_id', 'prefix', type='char', string='Supplier Credit Note Sequence'),
'purchase_refund_sequence_next': fields.related('purchase_refund_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Supplier Credit Note Number'),
'module_account_check_writing': fields.boolean('Support Check Writings',
'module_account_check_writing': fields.boolean('Check Writing',
help="""This allows you to check writing and printing.
This installs the module account_check_writing."""),
'module_account_accountant': fields.boolean('Accountant Features',
help="""This allows you to access all the accounting features, like the journal items and the chart of accounts.
This installs the module account_accountant."""),
help="""If you do not check this box, you will be able to do Invoicing & Payments, but not accounting (Journal Items, Chart of Accounts, ...)."""),
'module_account_asset': fields.boolean('Assets Management',
help="""This allows you to manage the assets owned by a company or a person.
It keeps track of the depreciation occurred on those assets, and creates account move for those depreciation lines.
This installs the module account_asset."""),
'module_account_budget': fields.boolean('Budgets Management',
This installs the module account_asset. If you do not check this box, you will be able to do invoicing & payments,
but not accounting (Journal Items, Chart of Accounts, ...) """),
'module_account_budget': fields.boolean('Budget Management',
help="""This allows accountants to manage analytic and crossovered budgets.
Once the master budgets and the budgets are defined,
the project managers can set the planned amount on each analytic account.
This installs the module account_budget."""),
'module_account_payment': fields.boolean('Supplier Payment Orders',
'module_account_payment': fields.boolean('Manage Payment Orders',
help="""This allows you to create and manage your payment orders, with purposes to
* serve as base for an easy plug-in of various automated payment mechanisms, and
* provide a more efficient way to manage invoice payments.
@ -97,17 +97,10 @@ class account_config_settings(osv.osv_memory):
'module_account_voucher': fields.boolean('Manage Customer Payments',
help="""This includes all the basic requirements of voucher entries for bank, cash, sales, purchase, expense, contra, etc.
This installs the module account_voucher."""),
'module_account_followup': fields.boolean('Customer Follow-Ups',
'module_account_followup': fields.boolean('Manage Customer Payment Follow-Ups',
help="""This allows to automate letters for unpaid invoices, with multi-level recalls.
This installs the module account_followup."""),
'module_account_analytic_plans': fields.boolean('Support Multiple Analytic Plans',
help="""This allows to use several analytic plans, according to the general journal.
This installs the module account_analytic_plans."""),
'module_account_analytic_default': fields.boolean('Rules for Analytic Assignation',
help="""Set default values for your analytic accounts.
Allows to automatically select analytic accounts based on criteria like product, partner, user, company, date.
This installs the module account_analytic_default."""),
'module_account_invoice_layout': fields.boolean('Allow notes and subtotals',
'module_account_invoice_layout': fields.boolean('Allow Notes and Subtotals',
help="""This provides some features to improve the layout of invoices.
It gives you the possibility to:
* order all the lines of an invoice
@ -118,9 +111,10 @@ class account_config_settings(osv.osv_memory):
'group_proforma_invoices': fields.boolean('Allow Pro-forma Invoices',
implied_group='account.group_proforma_invoices',
help="Allows you to put invoices in pro-forma state."),
'default_sale_tax': fields.many2one('account.tax', 'Default Sale Tax'),
'default_purchase_tax': fields.many2one('account.tax', 'Default Purchase Tax'),
'decimal_precision': fields.integer('Decimal Precision',
help="""Set the decimal precision for rounding results in accounting."""),
}
def _default_company(self, cr, uid, context=None):
@ -279,4 +273,13 @@ class account_config_settings(osv.osv_memory):
elif config.period == '3months':
fiscalyear.create_period3(cr, uid, [fiscalyear_id])
def get_default_dp(self, cr, uid, fields, context=None):
dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
return {'decimal_precision': dp.digits}
def set_default_dp(self, cr, uid, ids, context=None):
config = self.browse(cr, uid, ids[0], context)
dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
dp.write({'digits': config.decimal_precision})
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -22,16 +22,17 @@
</div>
<sheet layout="auto">
<field name="has_default_company" invisible="1" />
<field name="has_chart_of_accounts" invisible="1"/>
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"
attrs="{'invisible': [('has_default_company', '=', True)]}"/>
<field name="expects_chart_of_accounts"/>
<field name="has_chart_of_accounts" invisible="1"/>
<group string="No Chart of Accounts exists for this Company" colspan="4" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
<label string="Please select a chart template to install a chart of accounts." colspan="4"/>
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
<button string="Install More Chart Templates" icon="gtk-go-forward"
name="%(open_account_charts_modules)d" type="action"/>
<newline/>
<field name ="code_digits" groups="account.group_account_user"/>
<field name ="seq_journal"/>
<newline/>
@ -56,22 +57,31 @@
<field name ="complete_tax_set" invisible="1"/>
<newline/>
<group colspan="2" col="2">
<field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]"/>
<field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]" attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
<field name="module_account_accountant"/>
<field name="module_account_asset"/>
</group>
<group colspan="2" col="2">
<field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]"/>
<field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]" attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
<field name="currency_id" widget="selection"/>
<field name="module_account_budget"/>
<field name="decimal_precision"/>
</group>
</group>
<group colspan="2" col="2">
<separator string="Customer Invoices" colspan="2"/>
<field name="sale_journal_id" invisible="1"/>
<field name="sale_sequence_next" attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
<label string="Invoice Sequence" for="sale_sequence_prefix"/>
<group colspan="1" col="2">
<field name="sale_sequence_prefix" nolabel="1"/>
<field name="sale_sequence_next" nolabel="1" attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
</group>
<field name="sale_refund_journal_id" invisible="1"/>
<field name="sale_refund_sequence_next" attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
<label string="Credit Note Sequence" for="sale_refund_sequence_prefix"/>
<group colspan="1" col="2">
<field name="sale_refund_sequence_prefix" nolabel="1"/>
<field name="sale_refund_sequence_next" nolabel="1" attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
</group>
<field name="module_account_invoice_layout"/>
<field name="module_account_voucher"/>
<field name="module_account_followup"/>
@ -80,9 +90,17 @@
<group colspan="2" col="2">
<separator string="Supplier Invoices" colspan="2"/>
<field name="purchase_journal_id" invisible="1"/>
<field name="purchase_sequence_next" attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
<label string="Supplier Invoice Sequence" for="purchase_sequence_prefix"/>
<group colspan="1" col="2">
<field name="purchase_sequence_prefix" nolabel="1"/>
<field name="purchase_sequence_next" nolabel="1" attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
</group>
<field name="purchase_refund_journal_id" invisible="1"/>
<field name="purchase_refund_sequence_next" attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}"/>
<label string="Supplier Credit Note Sequence" for="purchase_refund_sequence_prefix"/>
<group colspan="1" col="2">
<field name="purchase_refund_sequence_prefix" nolabel="1"/>
<field name="purchase_refund_sequence_next" nolabel="1" attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}"/>
</group>
<field name="module_account_payment"/>
</group>
<group colspan="2" col="2">
@ -96,11 +114,8 @@
<field name="company_footer"/>
<field name="module_account_check_writing"/>
</group>
<group colspan="2" col="2">
<separator string="Analytic Accounting" colspan="2"/>
<group name="analytic_accounting" colspan="2"/>
<field name="module_account_analytic_plans"/>
<field name="module_account_analytic_default"/>
<group name="analytic_accounting" colspan="4" invisible="1">
<separator string="Analytic Accounting" colspan="4"/>
</group>
</sheet>
</form>
@ -116,7 +131,7 @@
</record>
<menuitem id="menu_account_config" name="Accounting" parent="base.menu_config"
sequence="6" action="action_account_config"/>
sequence="14" action="action_account_config"/>
</data>
</openerp>

View File

@ -32,11 +32,11 @@ class account_invoice_refund(osv.osv_memory):
_name = "account.invoice.refund"
_description = "Invoice Refund"
_columns = {
'date': fields.date('Operation date', help='This date will be used as the invoice date for Refund Invoice and Period will be chosen accordingly!'),
'date': fields.date('Operation Date', help='This date will be used as the invoice date for credit note and period will be chosen accordingly!'),
'period': fields.many2one('account.period', 'Force period'),
'journal_id': fields.many2one('account.journal', 'Refund Journal', help='You can select here the journal to use for the refund invoice that will be created. If you leave that field empty, it will use the same journal as the current invoice.'),
'journal_id': fields.many2one('account.journal', 'Refund Journal', help='You can select here the journal to use for the credit note that will be created. If you leave that field empty, it will use the same journal as the current invoice.'),
'description': fields.char('Description', size=128, required=True),
'filter_refund': fields.selection([('refund', 'Create a draft Refund'), ('cancel', 'Cancel: refund invoice and reconcile'),('modify', 'Modify: refund invoice, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Refund invoice base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
'filter_refund': fields.selection([('refund', 'Create a draft refund'), ('cancel', 'Cancel: create credit note and reconcile'),('modify', 'Modify: create credit note, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Credit note base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
}
def _get_journal(self, cr, uid, context=None):

View File

@ -7,8 +7,8 @@
<field name="model">account.invoice.refund</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Refund Invoice">
<separator string="Refund Invoice Options" colspan="4"/>
<form string="Credit Note">
<separator string="Credit Note Options" colspan="4"/>
<group colspan="4" >
<field name="description"/>
<field name="journal_id" widget='selection'/>
@ -19,8 +19,8 @@
<separator colspan="4"/>
<group col="4" colspan="4" fill="1">
<label align="0.0" width="550" colspan="4" string="Modify Invoice: Cancels the current invoice and creates a new copy of it ready for editing."/>
<label align="0.0" width="300" string="Refund Invoice: Creates the refund invoice, ready for editing."/>
<label align="0.0" width="500" colspan="4" string="Cancel Invoice: Creates the refund invoice, validate and reconcile it to cancel the current invoice."/>
<label align="0.0" width="300" string="Credit Note: Creates the credit note, ready for editing."/>
<label align="0.0" width="500" colspan="4" string="Cancel Invoice: Creates the credit note, validate and reconcile it to cancel the current invoice."/>
</group>
<separator colspan="4"/>
<group colspan="4" col="6">

View File

@ -37,7 +37,7 @@ user rights to Demo user.
""",
'website': 'http://www.openerp.com',
'init_xml': [],
"depends" : ["account"],
"depends" : ["account_voucher"],
'update_xml': [
'security/account_security.xml',
'account_accountant_data.xml'

View File

@ -17,6 +17,6 @@
<record id="group_analytic_accounting" model="res.groups">
<field name="name">Analytic Accounting</field>
<field name="category_id" ref="base.module_category_usability"/>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
</data></openerp>

View File

@ -20,5 +20,6 @@
##############################################################################
import base_setup
import res_config
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -36,7 +36,7 @@ Shows you a list of applications features to install from.
'website': 'http://www.openerp.com',
'depends': ['base'],
'init_xml': [],
'update_xml': ['security/ir.model.access.csv', 'base_setup_views.xml' ],
'update_xml': ['security/ir.model.access.csv', 'base_setup_views.xml', 'res_config_view.xml'],
'demo_xml': [],
'installable': True,
'auto_install': True,

View File

@ -18,7 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import pytz
import simplejson
import cgi
@ -28,60 +27,6 @@ from osv import fields, osv
from tools.translate import _
from lxml import etree
# Define users preferences for new users (ir.values)
def _lang_get(self, cr, uid, context=None):
obj = self.pool.get('res.lang')
ids = obj.search(cr, uid, [('translatable','=',True)])
res = obj.read(cr, uid, ids, ['code', 'name'], context=context)
res = [(r['code'], r['name']) for r in res]
return res
def _tz_get(self,cr,uid, context=None):
return [(x, x) for x in pytz.all_timezones]
class user_preferences_config(osv.osv_memory):
_name = 'user.preferences.config'
_inherit = 'res.config'
_columns = {
'context_tz': fields.selection(_tz_get, 'Timezone', size=64,
help="Set default for new user's timezone, used to perform timezone conversions "
"between the server and the client."),
'context_lang': fields.selection(_lang_get, 'Language', required=True,
help="Sets default language for the all user interface, when UI "
"translations are available. If you want to Add new Language, you can add it from 'Load an Official Translation' wizard from 'Administration' menu."),
'view': fields.selection([('simple','Simplified'),
('extended','Extended')],
'Interface', required=True, help= "If you use OpenERP for the first time we strongly advise you to select the simplified interface, which has less features but is easier. You can always switch later from the user preferences." ),
'menu_tips': fields.boolean('Display Tips', help="Check out this box if you want to always display tips on each menu action"),
}
_defaults={
'view' : lambda self,cr,uid,*args: self.pool.get('res.users').browse(cr, uid, uid).view or 'simple',
'context_lang' : 'en_US',
'menu_tips' : True
}
def default_get(self, cr, uid, fields, context=None):
if context is None:
context = {}
res = super(user_preferences_config, self).default_get(cr, uid, fields, context=context)
res_default = self.pool.get('ir.values').get(cr, uid, 'default', False, ['res.users'])
for id, field, value in res_default:
res.update({field: value})
return res
def execute(self, cr, uid, ids, context=None):
user_obj = self.pool.get('res.users')
user_ids = user_obj.search(cr, uid, [], context=context)
for o in self.browse(cr, uid, ids, context=context):
user_obj.write(cr , uid, user_ids ,{'context_tz' : o.context_tz, 'context_lang' : o.context_lang, 'view' : o.view, 'menu_tips' : o.menu_tips}, context=context)
ir_values_obj = self.pool.get('ir.values')
ir_values_obj.set(cr, uid, 'default', False, 'context_tz', ['res.users'], o.context_tz)
ir_values_obj.set(cr, uid, 'default', False, 'context_lang', ['res.users'], o.context_lang)
ir_values_obj.set(cr, uid, 'default', False, 'view', ['res.users'], o.view)
ir_values_obj.set(cr, uid, 'default', False, 'menu_tips', ['res.users'], o.menu_tips)
return {}
# Specify Your Terminology will move to 'partner' module
class specify_partner_terminology(osv.osv_memory):
_name = 'base.setup.terminology'

View File

@ -1,51 +1,5 @@
<openerp>
<data>
<!-- Define default users preferences-->
<record id="view_user_preferences_config_form" model="ir.ui.view">
<field name="name">Set default users preferences</field>
<field name="model">user.preferences.config</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Define Users's Preferences</attribute>
</form>
<xpath expr="//separator[@string=&quot;title&quot;]" position="attributes">
<attribute name="string">Define Users's Preferences</attribute>
</xpath>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">This will set the default preferences for new users and update all existing ones. Afterwards, users are free to change those values on their own user preference form.</attribute>
</xpath>
<xpath expr="//separator[@string=&quot;vsep&quot;]" position="attributes">
<attribute name="string"/>
<attribute name="rowspan">12</attribute>
</xpath>
<group string="res_config_contents" position="replace">
<group colspan="4">
<field colspan="4" name="view"/>
<field colspan="4" name="context_lang"/>
<field colspan="4" name="context_tz"/>
<field colspan="4" name="menu_tips"/>
</group>
</group>
</data>
</field>
</record>
<record id="action_user_preferences_config_form" model="ir.actions.act_window">
<field name="name">Define default users preferences</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">user.preferences.config</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_user_preferences_config_form"/>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="config_action_user_preferences_config_form" model="ir.actions.todo">
<field name="action_id" ref="action_user_preferences_config_form"/>
<field name="category_id" ref="base.category_administration_config"/>
<field name="type">once</field>
</record>
<!-- Specify Your Terminology Config Wiz-->
<record id="base_setup_terminology_form" model="ir.ui.view">
@ -86,23 +40,6 @@
<field name="target">new</field>
</record>
<!-- Company config -->
<record id="action_base_setup_company" model="ir.actions.act_window">
<field name="name">Set Company Header and Footer</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.company</field>
<field name="view_id" ref="base.view_company_form"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="context">{'res_id': user.company_id.id}</field>
<field name="help">Fill in your company data (address, logo, bank accounts) so that it's printed on your reports. You can click on the button 'Preview Header' in order to check the header/footer of PDF documents.</field>
</record>
<record id="base_setup_company_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_setup_company"/>
<field name="category_id" ref="base.category_administration_config"/>
<field name="sequence">1</field>
</record>
<record id="base.view_sale_config_settings" model="ir.ui.view">
<field name="name">sale settings</field>
<field name="model">sale.config.settings</field>
@ -116,6 +53,7 @@
<sheet layout="auto">
<group>
<group name="config_sale" colspan="4"/>
<!-- this part is necessary to allow the plugins to extend the view -->
<field name="module_crm" invisible="1"/>
<group name="config_fetchmail" colspan="4" attrs="{'invisible': [('module_crm','=',False)]}">

View File

@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
class base_config_settings(osv.osv_memory):
_name = 'base.config.settings'
_inherit = 'res.config.settings'
_columns = {
'module_multi_company': fields.boolean('Multi Company',
help="""Work in multi-company environments, with appropriate security access between companies.
This installs the module multi_company."""),
'module_portal': fields.boolean('Portal',
help="""Define a portal for your customers or suppliers. The portal is a group of
external users that has specific access rights and rules.
This installs the module portal."""),
'module_share': fields.boolean('Share',
help="""Share OpenERP documents (records) with external users.
This installs the module share."""),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,41 @@
<openerp>
<data>
<record id="view_general_configuration" model="ir.ui.view">
<field name="name">General Settings</field>
<field name="model">base.config.settings</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="General Settings" layout="manual">
<div class="oe_form_topbar">
<button string="Apply" type="object" name="execute"/>
<button string="Cancel" special="cancel"/>
</div>
<sheet layout="auto">
<separator string="Company Settings" colspan="4"/>
<field name="module_multi_company"/>
<separator string="Others" colspan="4"/>
<label string="Outgoing Mail Servers"/>
<button type="action" name="%(base.action_ir_mail_server_list)d"
string="Configure" icon="gtk-execute"/>
<newline/>
<field name="module_share"/>
<newline/>
<field name="module_portal"/>
</sheet>
</form>
</field>
</record>
<record id="action_general_configuration" model="ir.actions.act_window">
<field name="name">General Settings</field>
<field name="res_model">base.config.settings</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
</record>
<menuitem id="menu_general_configuration" parent="base.menu_config"
sequence="100" action="action_general_configuration"/>
</data>
</openerp>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem id="synch_config" name="Synchronization" parent="base.menu_config" sequence="30"/>
<menuitem id="synch_config" name="Synchronization" parent="base.menu_config" sequence="60"/>
<record id="view_transfer_line_tree" model="ir.ui.view">
<field name="name">base.synchro.obj.line.tree</field>
<field name="model">base.synchro.obj.line</field>

View File

@ -26,23 +26,12 @@ class crm_configuration(osv.osv_memory):
_inherit = ['sale.config.settings', 'fetchmail.config.settings']
_columns = {
'fetchmail_lead': fields.boolean("Create Leads from Incoming Mails", readonly=True,
fetchmail_model='crm.lead', fetchmail_name='Incoming Leads',
help="""Allows you to configure your incoming mail server, and create leads from incoming emails."""),
'module_crm_caldav': fields.boolean("Caldav Synchronization",
help="""Use protocol caldav to synchronize meetings with other calendar applications (like Sunbird).
This installs the module crm_caldav."""),
'fetchmail_lead': fields.boolean("Create Leads from an E-mail Account",
fetchmail_model='crm.lead', fetchmail_name='Incoming leads',
help="""Allows you to configure your incoming mail server, and create leads from incoming emails."""),
'lead_server': fields.char('Server', size=256),
'lead_port': fields.integer('Port'),
'lead_type': fields.selection([
('pop', 'POP Server'),
('imap', 'IMAP Server'),
('local', 'Local Server'),
], 'Type'),
'lead_is_ssl': fields.boolean('SSL/TLS',
help="Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP=995)"),
'lead_user': fields.char('Username', size=256),
'lead_password': fields.char('Password', size=1024),
'module_import_sugarcrm': fields.boolean("SugarCRM Import",
help="""Import SugarCRM leads, opportunities, users, accounts, contacts, employees, meetings, phonecalls, emails, project and project tasks data.
This installs the module import_sugarcrm."""),
@ -57,8 +46,4 @@ class crm_configuration(osv.osv_memory):
This installs the module google_map."""),
}
_defaults = {
'lead_type': 'pop',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -10,15 +10,7 @@
<field name="arch" type="xml">
<group name="config_fetchmail" position="after">
<field name="fetchmail_lead"/>
<group colspan="2" attrs="{'invisible': [('fetchmail_lead','=',False)]}">
<field name="lead_server" attrs="{'required': [('fetchmail_lead','=',True)]}"/>
<field name="lead_type" on_change="onchange_fetchmail('lead', lead_type, lead_is_ssl)" attrs="{'required': [('fetchmail_lead','=',True)]}"/>
<field name="lead_port" attrs="{'required': [('fetchmail_lead','=',True)]}"/>
<field name="lead_is_ssl" on_change="onchange_fetchmail('lead', lead_type, lead_is_ssl)"/>
<field name="lead_user" attrs="{'required': [('fetchmail_lead','=',True)]}"/>
<field name="lead_password" password="True" attrs="{'required': [('fetchmail_lead','=',True)]}"/>
</group>
<newline/>
<button colspan="2" type="object" name="configure_fetchmail_lead" string="Configure" icon="gtk-execute"/>
</group>
<group name="config_crm" position="after">
@ -36,7 +28,8 @@
</field>
</record>
<menuitem id="base.menu_sale_config" name="Sales" parent="base.menu_config" sequence="1" action="base.action_sale_config"/>
<menuitem id="base.menu_sale_config" name="Sales" parent="base.menu_config"
sequence="1" action="base.action_sale_config"/>
</data>
</openerp>

View File

@ -26,21 +26,7 @@ class crm_claim_settings(osv.osv_memory):
_inherit = ['sale.config.settings', 'fetchmail.config.settings']
_columns = {
'fetchmail_claim': fields.boolean("Create Claims from an E-mail Account",
fetchmail_model='crm.claim', fetchmail_name='Incoming claims',
'fetchmail_claim': fields.boolean("Create Claims from Incoming Mails", readonly=True,
fetchmail_model='crm.claim', fetchmail_name='Incoming Claims',
help="""Allows you to configure your incoming mail server, and create claims from incoming emails."""),
'claim_server' : fields.char('Server', size=256),
'claim_port' : fields.integer('Port'),
'claim_type': fields.selection([
('pop', 'POP Server'),
('imap', 'IMAP Server'),
('local', 'Local Server'),
], 'Type'),
'claim_is_ssl': fields.boolean('SSL/TLS', help="Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP=995)"),
'claim_user' : fields.char('Username', size=256),
'claim_password' : fields.char('Password', size=1024),
}
_defaults = {
'claim_type': 'pop',
}

View File

@ -11,15 +11,7 @@
<field name="arch" type="xml">
<group name="config_fetchmail" position="after">
<field name="fetchmail_claim"/>
<group colspan="2" attrs="{'invisible': [('fetchmail_claim','=',False)]}">
<field name="claim_server" attrs="{'required': [('fetchmail_claim','=',True)]}"/>
<field name="claim_type" on_change="onchange_fetchmail('claim', claim_type, claim_is_ssl)" attrs="{'required': [('fetchmail_claim','=',True)]}"/>
<field name="claim_port" attrs="{'required': [('fetchmail_claim','=',True)]}"/>
<field name="claim_is_ssl" on_change="onchange_fetchmail('claim', claim_type, claim_is_ssl)"/>
<field name="claim_user" attrs="{'required': [('fetchmail_claim','=',True)]}"/>
<field name="claim_password" password="True" attrs="{'required': [('fetchmail_claim','=',True)]}"/>
</group>
<newline/>
<button colspan="2" type="object" name="configure_fetchmail_claim" string="Configure" icon="gtk-execute"/>
</group>
</field>
</record>

View File

@ -177,28 +177,13 @@
<record id="view_picking_withcarrier_out_form" model="ir.ui.view">
<field name="name">delivery.stock.picking_withcarrier.out.form.view</field>
<field name="type">form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_out_form"/>
<field name="model">stock.picking.out</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="carrier_id"/>
<field name="carrier_tracking_ref"/>
<field name="number_of_packages"/>
<field name="weight"/>
<field name="weight_net"/>
</field>
</field>
</record>
<record id="view_picking_withweight_in_form" model="ir.ui.view">
<field name="name">stock.picking_withweight.in.form.view</field>
<field name="type">form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_in_form"/>
<field name="arch" type="xml">
<field name="type" position="after">
<field name="weight"/>
<field name="weight_net"/>
</field>
</field>
</record>
@ -218,7 +203,7 @@
<record id="action_picking_tree4" model="ir.actions.act_window">
<field name="name">Picking to be invoiced</field>
<field name="res_model">stock.picking</field>
<field name="res_model">stock.picking.out</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@ -228,39 +213,13 @@
<field name="search_view_id" ref="stock.view_picking_out_search"/>
</record>
<record id="view_picking_withcarrier_out_move_form" model="ir.ui.view">
<field name="name">delivery.stock.picking_withcarrier.out.move.form.view</field>
<field name="type">form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_out_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='move_lines']/tree/field[@name='product_uom']" position="after">
<field name="weight"/>
<field name="weight_net"/>
</xpath>
</field>
</record>
<record id="view_picking_withweight_in_move_form" model="ir.ui.view">
<field name="name">stock.picking_withweight.in.move.form.view</field>
<field name="type">form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_in_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='move_lines']/tree/field[@name='product_uom']" position="after">
<field name="weight"/>
<field name="weight_net"/>
</xpath>
</field>
</record>
<record id="view_picking_withweight_internal_move_form" model="ir.ui.view">
<field name="name">stock.picking_withweight.internal.move.form.view</field>
<field name="type">form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='move_lines']/tree/field[@name='product_uom']" position="after">
<xpath expr="/form/sheet/notebook/page/field[@name='move_lines']/tree/field[@name='product_uom']" position="after">
<field name="weight"/>
<field name="weight_net"/>
</xpath>
@ -316,7 +275,7 @@
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_out_form"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page[@string='Products']/group/button[@string='Create Invoice']" position="after">
<xpath expr="/form/div[@class='oe_form_topbar']/button[@string='Create Invoice']" position="after">
<button name="%(report_shipping)d" string="Delivery Order" states="done" type="action" icon="gtk-print"/>
</xpath>
</field>

View File

@ -173,5 +173,34 @@ class stock_move(osv.osv):
stock_move()
# Redefinition of the new fields in order to update the model stock.picking.out in the orm
# FIXME: this is a temporary workaround because of a framework bug (ref: lp996816). It should be removed as soon as
# the bug is fixed
class stock_picking_out(osv.osv):
_inherit = 'stock.picking.out'
def _cal_weight(self, cr, uid, ids, name, args, context=None):
return self.pool.get('stock.picking')._cal_weight(cr, uid, ids, name, args, context=context)
def _get_picking_line(self, cr, uid, ids, context=None):
return self.pool.get('stock.picking')._get_picking_line(cr, uid, ids, context=context)
_columns = {
'carrier_id':fields.many2one("delivery.carrier","Carrier"),
'volume': fields.float('Volume'),
'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
store={
'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
}),
'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
store={
'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
}),
'carrier_tracking_ref': fields.char('Carrier Tracking Ref', size=32),
'number_of_packages': fields.integer('Number of Packages'),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -18,8 +18,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import ftpserver
import wizard
import res_config
post_load = ftpserver.start_server

View File

@ -40,7 +40,8 @@ FTP client.
'update_xml': [
'wizard/ftp_configuration_view.xml',
'wizard/ftp_browse_view.xml',
'security/ir.model.access.csv'
'security/ir.model.access.csv',
'res_config_view.xml',
],
'demo_xml': [],
'test': [

View File

@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools import config
class documnet_ftp_setting(osv.osv_memory):
_name = 'knowledge.config.settings'
_inherit = 'knowledge.config.settings'
_columns = {
'document_ftp_url': fields.char('Browse Documents', size=128,
help ="""Click the url to browse the documents""", readonly=True),
}
def get_default_ftp_config(self, cr, uid, fields, context=None):
action = self.pool.get('ir.model.data').get_object(cr, uid, 'document_ftp', 'action_document_browse')
return {'document_ftp_url': action.url}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,15 @@
<openerp>
<data>
<record id="view_document_ftp_configuration" model="ir.ui.view">
<field name="name">Knowledge Application</field>
<field name="model">knowledge.config.settings</field>
<field name="type">form</field>
<field name="inherit_id" ref="base_setup.view_knowledge_configuration"/>
<field name="arch" type="xml">
<field name="module_document_ftp" position="after">
<field name="document_ftp_url" widget="url"/>
</field>
</field>
</record>
</data>
</openerp>

View File

@ -25,99 +25,72 @@ class fetchmail_config_settings(osv.osv_memory):
""" This wizard can be inherited in conjunction with 'res.config.settings', in order to
define fields that configure a fetchmail server.
It relies on the following convention on a set of fields::
It relies on the following convention on the object::
class my_config_wizard(osv.osv_memory):
class my_config_settings(osv.osv_memory):
_name = 'my.settings'
_inherits = ['res.config.settings', 'fetchmail.config.settings']
_inherit = ['res.config.settings', 'fetchmail.config.settings']
_columns = {
'fetchmail_X': fields.boolean(..., fetchmail_model='my.model', fetchmail_name='Blah'),
'X_server': fields.char('Server Name', size=256),
'X_port': fields.integer('Port'),
'X_type': fields.selection(
[('pop', 'POP Server'), ('imap', 'IMAP Server'), ('local', 'Local Server')],
'Server Type'),
'X_is_ssl': fields.boolean('SSL/TLS'),
'X_user': fields.char('Username', size=256),
'X_password': fields.char('Password', size=1024),
'fetchmail_stuff': fields.boolean(..., readonly=True,
fetchmail_model='my.stuff', fetchmail_name='Incoming Stuff'),
}
The method ``get_default_fetchmail_servers`` retrieves the current fetchmail configuration
for all fields that start with 'fetchmail_'. It looks up configurations that match the
given model name (``fetchmail_model``). The method ``set_fetchmail_servers`` updates the
fetchmail configurations by following the same conventions. Both methods are called
automatically by the methods of the model 'res.config.settings'.
def configure_fetchmail_stuff(self, cr, uid, ids, context=None):
return self.configure_fetchmail(cr, uid, 'fetchmail_stuff', context)
The onchange method ``onchange_fetchmail`` can be used to react on changes on the fields
'X_type' and 'X_is_ssl'. Its first parameter is the fields' prefix (here 'X').
and in the form view::
<field name="fetchmail_stuff"/>
<button type="object" name="configure_fetchmail_stuff"/>
The method ``get_default_fetchmail`` determines the value of all fields that start
with 'fetchmail_'. It looks up fetchmail server configurations that match the given
model name (``fetchmail_model``) and are active.
The button action ``configure_fetchmail_stuff`` is caught by the object, and calls
automatically the method ``configure_fetchmail``; it opens the fetchmail server
configuration form for the corresponding field.
"""
_name = 'fetchmail.config.settings'
def get_default_fetchmail_servers(self, cr, uid, fields, context=None):
def get_default_fetchmail(self, cr, uid, fields, context=None):
""" determine the value of all fields like 'fetchmail_XXX' """
ir_model = self.pool.get('ir.model')
fetchmail_server = self.pool.get('fetchmail.server')
fetchmail_fields = [f for f in self._columns if f.startswith('fetchmail_')]
fetchmail_fields = [f for f in fields if f.startswith('fetchmail_')]
res = {}
for field in fetchmail_fields:
model_name = self._columns[field].fetchmail_model
for f in fetchmail_fields:
model_name = self._columns[f].fetchmail_model
model_id = ir_model.search(cr, uid, [('model', '=', model_name)])[0]
server_ids = fetchmail_server.search(cr, uid, [('object_id', '=', model_id), ('state', '=', 'done')])
if server_ids:
server = fetchmail_server.browse(cr, uid, server_ids[0], context)
prefix = field[10:]
res.update({
field: True,
prefix + '_server': server.server,
prefix + '_port': server.port,
prefix + '_type': server.type,
prefix + '_is_ssl': server.is_ssl,
prefix + '_user': server.user,
prefix + '_password': server.password,
})
res[f] = bool(server_ids)
return res
def set_fetchmail_servers(self, cr, uid, ids, context):
ir_model = self.pool.get('ir.model')
fetchmail_server = self.pool.get('fetchmail.server')
fetchmail_fields = [f for f in self._columns if f.startswith('fetchmail_')]
config = self.browse(cr, uid, ids[0], context)
for field in fetchmail_fields:
model_name = self._columns[field].fetchmail_model
model_id = ir_model.search(cr, uid, [('model', '=', model_name)])[0]
server_ids = fetchmail_server.search(cr, uid, [('object_id', '=', model_id), ('state', '=', 'done')])
if config[field]:
prefix = field[10:]
values = {
'server': config[prefix + '_server'],
'port': config[prefix + '_port'],
'type': config[prefix + '_type'],
'is_ssl': config[prefix + '_is_ssl'],
'user': config[prefix + '_user'],
'password': config[prefix + '_password'],
}
if not server_ids:
values.update({
'name': getattr(self._columns[field], 'fetchmail_name', model_name),
'object_id': model_id,
})
server_ids = [fetchmail_server.create(cr, uid, values, context=context)]
else:
server_ids = fetchmail_server.search(cr, uid, [('object_id', '=', model_id)], context=context)
fetchmail_server.write(cr, uid, server_ids, values, context=context)
fetchmail_server.button_confirm_login(cr, uid, server_ids, context)
else:
fetchmail_server.set_draft(cr, uid, server_ids, context)
def onchange_fetchmail(self, cr, uid, ids, prefix, server_type, ssl, context=None):
values = {}
if server_type == 'pop':
values[prefix + '_port'] = ssl and 995 or 110
elif server_type == 'imap':
values[prefix + '_port'] = ssl and 993 or 143
def configure_fetchmail(self, cr, uid, field, context=None):
""" open the form view of the fetchmail.server to configure """
action = {
'type': 'ir.actions.act_window',
'res_model': 'fetchmail.server',
'view_mode': 'form',
}
model_name = self._columns[field].fetchmail_model
model_id = self.pool.get('ir.model').search(cr, uid, [('model', '=', model_name)])[0]
server_ids = self.pool.get('fetchmail.server').search(cr, uid, [('object_id', '=', model_id)])
if server_ids:
action['res_id'] = server_ids[0]
else:
values[prefix + '_server'] = False
values[prefix + '_port'] = 0
return {'value': values}
action['context'] = {
'default_name': self._columns[field].fetchmail_name,
'default_object_id': model_id,
}
return action
def __getattr__(self, name):
""" catch calls to 'configure_fetchmail_XXX' """
if name.startswith('configure_fetchmail_'):
return (lambda cr, uid, ids, context=None:
self.configure_fetchmail(cr, uid, name[10:], context))
return super(fetchmail_config_settings, self).__getattr__(name)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -26,18 +26,24 @@ class hr_config_settings(osv.osv_memory):
_inherit = 'res.config.settings'
_columns = {
'module_hr_timesheet_sheet': fields.boolean('Manage Timesheets and Attendances',
'module_hr_timesheet_sheet': fields.boolean('Timesheet Validation by Manager',
help ="""This installs the module hr_timesheet_sheet."""),
'module_hr_holidays': fields.boolean('Manage Holidays',
'module_hr_attendance': fields.boolean('Track Attendances',
help ="""This installs the module hr_attendance."""),
'module_hr_timesheet': fields.boolean('Manage Timesheets',
help ="""This installs the module hr_timesheet."""),
'module_hr_holidays': fields.boolean('Leaves & Holidays',
help ="""This installs the module hr_holidays."""),
'module_hr_expense': fields.boolean('Manage Employees Expenses',
'module_hr_expense': fields.boolean('Expenses',
help ="""This installs the module hr_expense."""),
'module_hr_recruitment': fields.boolean('Manage Recruitment Process',
'module_hr_recruitment': fields.boolean('Recruitment',
help ="""This installs the module hr_recruitment."""),
'module_hr_contract': fields.boolean('Manage Employees Contracts',
'module_hr_contract': fields.boolean('Employees Contracts',
help ="""This installs the module hr_contract."""),
'module_hr_evaluation': fields.boolean('Manage Appraisals Process',
'module_hr_evaluation': fields.boolean('Periodic Appraisals',
help ="""This installs the module hr_evaluation."""),
'module_hr_payroll': fields.boolean('Payroll',
help ="""This installs the module hr_payroll."""),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,11 +1,12 @@
<openerp>
<data>
<record id="open_payroll1_modules" model="ir.actions.act_window">
<record id="open_payroll_modules" model="ir.actions.act_window">
<field name="name">Payroll</field>
<field name="res_model">ir.module.module</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">[('state','=','uninstalled'), ('name','ilike','payroll'), ('name','!=','hr_payroll_account')]</field>
<field name="context" eval="{'search_default_category_id': ref('base.module_category_localization'), 'search_default_name': 'payroll'}"/>
<field name="search_view_id" ref="base.view_module_filter"/>
</record>
<record id="view_human_resources_configuration" model="ir.ui.view">
@ -19,22 +20,22 @@
<button string="Cancel" special="cancel"/>
</div>
<sheet layout="auto">
<separator string="Human Resources" colspan="4"/>
<field name="module_hr_timesheet_sheet"/>
<newline/>
<field name="module_hr_holidays"/>
<separator string="Additional Features" colspan="4"/>
<field name="module_hr_expense"/>
<newline/>
<field name="module_hr_recruitment"/>
<newline/>
<field name="module_hr_evaluation"/>
<newline/>
<field name="module_hr_contract"/>
<field name="module_hr_holidays"/>
<newline/>
<field name="module_hr_payroll"/>
<button colspan="2" name="%(open_payroll_modules)d" type="action"
string="Install Country-Specific Payroll" icon="gtk-go-forward"/>
<separator string="Timesheets" colspan="4"/>
<field name="module_hr_attendance"/>
<field name="module_hr_timesheet"/>
<field name="module_hr_timesheet_sheet"/>
<group name="config_timesheets" colspan="4"/>
<group name="config_payroll" colspan="4"/>
<group name="config_recruitment" colspan="4"/>
</sheet>
</form>
@ -49,7 +50,8 @@
<field name="target">inline</field>
</record>
<menuitem id="menu_human_resources_configuration" name="Human Resources" parent="base.menu_config" sequence="8" action="action_human_resources_configuration"/>
<menuitem id="menu_human_resources_configuration" name="Human Resources" parent="base.menu_config"
sequence="15" action="action_human_resources_configuration"/>
</data>
</openerp>

View File

@ -260,7 +260,7 @@ class hr_expense_line(osv.osv):
'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Account')),
'unit_quantity': fields.float('Quantities' ),
'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),
'uom_id': fields.many2one('product.uom', 'UoM'),
'uom_id': fields.many2one('product.uom', 'Unit of Measure'),
'description': fields.text('Description'),
'analytic_account': fields.many2one('account.analytic.account','Analytic account'),
'ref': fields.char('Reference', size=32),

View File

@ -10,7 +10,7 @@
<field name="name"/>
<field name="standard_price"/>
<field name="list_price"/>
<field name="uom_id" string="UoM"/>
<field name="uom_id" string="Unit of Measure"/>
</tree>
</field>
</record>

View File

@ -4,7 +4,7 @@
<!-- Casual leave -->
<record model="hr.holidays.status" id="holiday_status_cl">
<field name="name">Legal Leaves</field>
<field name="name" eval="'Legal Leaves '+time.strftime('%Y')"/>
<field name="color_name">black</field>
</record>

View File

@ -7,10 +7,9 @@
<field name="type">form</field>
<field name="inherit_id" ref="hr.view_human_resources_configuration"/>
<field name="arch" type="xml">
<group name="config_payroll" position="after">
<separator string="Account Payroll" colspan="4"/>
<field name="module_hr_holidays" position="after">
<field name="module_hr_payroll_account"/>
</group>
</field>
</field>
</record>
</data>

View File

@ -26,27 +26,12 @@ class hr_applicant_settings(osv.osv_memory):
_inherit = ['hr.config.settings', 'fetchmail.config.settings']
_columns = {
'module_document_ftp': fields.boolean('Index & Track Documents',
'module_document_ftp': fields.boolean('Automatic Indexation of Resumes',
help="""Manage your CV's and motivation letter related to all applicants.
This installs the module document_ftp."""),
'fetchmail_applicants': fields.boolean('Create Applicants from an Email Account',
'fetchmail_applicants': fields.boolean('Create Applicants from Incoming Mails', readonly=True,
fetchmail_model='hr.applicant', fetchmail_name='Incoming HR Applications',
help ="""Allow applicants to send their job application to an email address (jobs@mycompany.com),
and create automatically application documents in the system."""),
'applicants_server': fields.char('Server', size=256),
'applicants_port': fields.integer('Port'),
'applicants_type': fields.selection([
('pop', 'POP Server'),
('imap', 'IMAP Server'),
('local', 'Local Server'),
], 'Type'),
'applicants_is_ssl': fields.boolean('SSL/TLS',
help="Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP=995)"),
'applicants_user': fields.char('Username', size=256),
'applicants_password': fields.char('Password', size=1024),
}
_defaults = {
'applicants_type': 'pop',
}

View File

@ -12,16 +12,7 @@
<field name="module_document_ftp"/>
<newline/>
<field name="fetchmail_applicants"/>
<group colspan="2" attrs="{'invisible': [('fetchmail_applicants','=',False)]}">
<field name="applicants_server" attrs="{'required': [('fetchmail_applicants','=',True)]}"/>
<field name="applicants_type" attrs="{'required': [('fetchmail_applicants','=',True)]}"
on_change="onchange_fetchmail('applicants', applicants_type, applicants_is_ssl)"/>
<field name="applicants_port" attrs="{'required': [('fetchmail_applicants','=',True)]}"/>
<field name="applicants_is_ssl" attrs="{'required': [('fetchmail_applicants','=',True)]}"
on_change="onchange_fetchmail('applicants', applicants_type, applicants_is_ssl)"/>
<field name="applicants_user" attrs="{'required': [('fetchmail_applicants','=',True)]}"/>
<field name="applicants_password" password="True" attrs="{'required': [('fetchmail_applicants','=',True)]}"/>
</group>
<button colspan="2" type="object" name="configure_fetchmail_applicants" string="Configure" icon="gtk-execute"/>
</group>
</field>
</record>

View File

@ -31,7 +31,7 @@ class hr_employee(osv.osv):
_columns = {
'product_id': fields.many2one('product.product', 'Product', help="Specifies employee's designation as a product with type 'service'."),
'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal'),
'uom_id': fields.related('product_id', 'uom_id', type='many2one', relation='product.uom', string='UoM', store=True, readonly=True)
'uom_id': fields.related('product_id', 'uom_id', type='many2one', relation='product.uom', string='Unit of Measure', store=True, readonly=True)
}
def _getAnalyticJournal(self, cr, uid, context=None):

View File

@ -70,7 +70,7 @@ class report_account_analytic_line_to_invoice(osv.osv):
'name': fields.char('Year',size=64,required=False, readonly=True),
'product_id':fields.many2one('product.product', 'Product', readonly=True),
'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
'product_uom_id':fields.many2one('product.uom', 'UoM', readonly=True),
'product_uom_id':fields.many2one('product.uom', 'Unit of Measure', readonly=True),
'unit_amount': fields.float('Units', readonly=True),
'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Sale Price')),
'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Account')),

View File

@ -26,7 +26,7 @@ class hr_timesheet_settings(osv.osv_memory):
_columns = {
'timesheet_range': fields.selection([('day','Day'),('week','Week'),('month','Month')],
'Timesheet Range', help="Periodicity on which you validate your timesheets."),
'Validate Timesheets Every', help="Periodicity on which you validate your timesheets."),
'timesheet_max_difference': fields.float('Timesheet Allowed Difference (Hours)',
help="""Allowed difference in hours between the sign in/out and the timesheet
computation for one sheet. Set this to 0 if you do not want any control."""),

View File

@ -7,11 +7,11 @@
<field name="type">form</field>
<field name="inherit_id" ref="hr.view_human_resources_configuration"/>
<field name="arch" type="xml">
<group name="config_timesheets" position="after">
<separator string="Timesheets" colspan="4"/>
<field name="timesheet_range"/>
<field name="timesheet_max_difference"/>
</group>
<field name="module_hr_timesheet_sheet" position="after">
<newline/>
<field name="timesheet_range" attrs="{'invisible':[('module_hr_timesheet_sheet','=',False)],'required': [('module_hr_timesheet_sheet','=',True)]}"/>
<field name="timesheet_max_difference" attrs="{'invisible':[('module_hr_timesheet_sheet','=',False)],'required': [('module_hr_timesheet_sheet','=',True)]}"/>
</field>
</field>
</record>
</data>

View File

@ -19,5 +19,6 @@
#
##############################################################################
import res_config
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -40,6 +40,7 @@ document and Wiki based Hidden.
'security/knowledge_security.xml',
'security/ir.model.access.csv',
'knowledge_view.xml',
'res_config_view.xml',
],
'demo_xml': ['knowledge_demo.xml'],
'installable': True,

View File

@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
class knowledge_config_settings(osv.osv_memory):
_name = 'knowledge.config.settings'
_inherit = 'res.config.settings'
_columns = {
'module_wiki_faq': fields.boolean('Internal FAQ as a Wiki',
help="""This installs the module wiki_faq."""),
'module_wiki_quality_manual': fields.boolean('Quality Manual as a Wiki',
help="""This installs the module wiki_quality_manual."""),
'module_document': fields.boolean('Document Management',
help="""This is a complete document management system, with: user authentication,
full document search (but pptx and docx are not supported), and a document dashboard.
This installs the module document."""),
'module_document_ftp': fields.boolean('Share repositories (FTP)',
help="""Access your documents in OpenERP through an FTP interface.
This installs the module document_ftp."""),
'module_document_webdav': fields.boolean('Share Repositories (WebDAV)',
help="""Access your documents in OpenERP through WebDAV.
This installs the module document_webdav."""),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,41 @@
<openerp>
<data>
<record id="view_knowledge_configuration" model="ir.ui.view">
<field name="name">Configure Knowledge</field>
<field name="model">knowledge.config.settings</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Configure Knowledge" layout="manual">
<div class="oe_form_topbar">
<button string="Apply" type="object" name="execute"/>
<button string="Cancel" special="cancel"/>
</div>
<sheet layout="auto">
<separator string="Wiki" colspan="4"/>
<field name="module_wiki_faq"/>
<newline/>
<field name="module_wiki_quality_manual"/>
<separator string="Documents" colspan="4"/>
<field name="module_document"/>
<newline/>
<field name="module_document_ftp"/>
<newline/>
<field name="module_document_webdav"/>
</sheet>
</form>
</field>
</record>
<record id="action_knowledge_configuration" model="ir.actions.act_window">
<field name="name">Configure Knowledge</field>
<field name="res_model">knowledge.config.settings</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
</record>
<menuitem id="menu_knowledge_configuration" name="Knowledge" parent="base.menu_config"
sequence="19" action="action_knowledge_configuration"/>
</data>
</openerp>

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

View File

@ -19,6 +19,6 @@
#
##############################################################################
import res_config
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -38,7 +38,8 @@ Contains the installer for marketing-related modules.
'update_xml': [
'security/marketing_security.xml',
'security/ir.model.access.csv',
'marketing_view.xml'
'marketing_view.xml',
'res_config_view.xml',
],
'demo_xml': ['marketing_demo.xml'],
'installable': True,

View File

@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
class marketing_config_settings(osv.osv_memory):
_name = 'marketing.config.settings'
_inherit = 'res.config.settings'
_columns = {
'module_marketing_campaign': fields.boolean('Marketing Campaigns',
help="""Provides leads automation through marketing campaigns.
Campaigns can in fact be defined on any resource, not just CRM leads.
This installs the module marketing_campaign."""),
'module_marketing_campaign_crm_demo': fields.boolean('Demo Data for Marketing Campaigns',
help="""Installs demo data like leads, campaigns and segments for Marketing Campaigns.
This installs the module marketing_campaign_crm_demo."""),
'module_crm_profiling': fields.boolean('Track Customer Profile to Focus your Campaigns',
help="""Allows users to perform segmentation within partners.
This installs the module crm_profiling."""),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,36 @@
<openerp>
<data>
<record id="view_marketing_configuration" model="ir.ui.view">
<field name="name">Configure Marketing</field>
<field name="model">marketing.config.settings</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Configure Marketing" layout="manual">
<div class="oe_form_topbar">
<button string="Apply" type="object" name="execute"/>
<button string="Cancel" special="cancel"/>
</div>
<sheet layout="auto">
<separator string="Campaigns" colspan="4"/>
<field name="module_marketing_campaign"/>
<field name="module_marketing_campaign_crm_demo"/>
<newline/>
<field name="module_crm_profiling"/>
</sheet>
</form>
</field>
</record>
<record id="action_marketing_configuration" model="ir.actions.act_window">
<field name="name">Configure Marketing</field>
<field name="res_model">marketing.config.settings</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
</record>
<menuitem id="menu_marketing_configuration" name="Marketing" parent="base.menu_config"
sequence="17" action="action_marketing_configuration"/>
</data>
</openerp>

View File

@ -206,8 +206,8 @@ class mrp_bom(osv.osv):
'product_id': fields.many2one('product.product', 'Product', required=True),
'product_uos_qty': fields.float('Product UOS Qty'),
'product_uos': fields.many2one('product.uom', 'Product UOS', help="Product UOS (Unit of Sale) is the unit of measurement for the invoicing and promotion of stock."),
'product_qty': fields.float('Product Qty', required=True, digits_compute=dp.get_precision('Product UoM')),
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True, help="UoM (Unit of Measure) is the unit of measurement for the inventory control"),
'product_qty': fields.float('Product Qty', required=True, digits_compute=dp.get_precision('Product Unit of Measure')),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for the inventory control"),
'product_rounding': fields.float('Product Rounding', help="Rounding applied on the product quantity."),
'product_efficiency': fields.float('Manufacturing Efficiency', required=True, help="A factor of 0.9 means a loss of 10% within the production process."),
'bom_lines': fields.one2many('mrp.bom', 'bom_id', 'BoM Lines'),
@ -454,8 +454,8 @@ class mrp_production(osv.osv):
'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', select=True),
'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product UoM'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_uos_qty': fields.float('Product UoS Qty', states={'draft':[('readonly',False)]}, readonly=True),
'product_uos': fields.many2one('product.uom', 'Product UoS', states={'draft':[('readonly',False)]}, readonly=True),
@ -1112,8 +1112,8 @@ class mrp_production_product_line(osv.osv):
_columns = {
'name': fields.char('Name', size=64, required=True),
'product_id': fields.many2one('product.product', 'Product', required=True),
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product UoM'), required=True),
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True),
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'product_uos_qty': fields.float('Product UOS Qty'),
'product_uos': fields.many2one('product.uom', 'Product UOS'),
'production_id': fields.many2one('mrp.production', 'Production Order', select=True),

View File

@ -432,7 +432,7 @@
<newline/>
<group expand="0" string="Group By...">
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
<filter string='Default UOM' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}" />
<filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}" />
<separator orientation="vertical"/>
<filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
<filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}" />
@ -663,7 +663,7 @@
<tree colors="blue:state == 'draft';black:state in ('picking_except','confirmed','ready','in_production');gray:state in ('cancel','done') " string="Products to Consume">
<field name="product_id" />
<field name="product_qty" string="Qty"/>
<field name="product_uom" string="UOM"/>
<field name="product_uom" string="Unit of Measure"/>
<field name="location_id" string="Source Loc."/>
<field name="state" invisible="1"/>
<button name="%(stock.move_consume)d"
@ -672,7 +672,7 @@
states="draft,waiting,confirmed,assigned" />
<button
name="%(stock.track_line)d"
string="Split in production lots"
string="Split in Serial Numbers"
type="action" icon="gtk-justify-fill"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
@ -687,7 +687,7 @@
<tree colors="red:scrapped==True;blue:state == 'draft';black:state in('picking_except','confirmed','ready','in_production');gray:state == 'cancel' " string="Consumed Products" editable="bottom">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
<field name="product_uom" readonly="1" string="UOM"/>
<field name="product_uom" readonly="1" string="Unit of Measure"/>
<field name="prodlot_id" context="{'product_id': product_id}"/>
<field name="state" invisible="1"/>
<field name="scrapped" invisible="1"/>
@ -716,7 +716,7 @@
<tree string="Products to Finish">
<field name="product_id" />
<field name="product_qty" string="Qty"/>
<field name="product_uom" string="UOM"/>
<field name="product_uom" string="Unit of Measure"/>
<field name="state" invisible="1"/>
<button name="%(stock.action_partial_move_server)d"
string="Partial"
@ -734,13 +734,13 @@
<tree colors="red:scrapped==True;blue:state == 'draft';black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') " string="Finished Products">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
<field name="product_uom" readonly="1" string="UOM"/>
<field name="product_uom" readonly="1" string="Unit of Measure"/>
<field name="location_dest_id" readonly="1" string="Destination Loc." widget="selection"/>
<field name="prodlot_id" context="{'product_id': product_id}"/>
<field name="scrapped" invisible="1"/>
<field name="state" invisible="1"/>
<button name="%(stock.track_line)d"
string="Split in production lots" type="action" icon="gtk-justify-fill" states="done,cancel"/>
string="Split in Serial Numbers" type="action" icon="gtk-justify-fill" states="done,cancel"/>
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action" icon="gtk-convert"
states="done,cancel" />

View File

@ -136,7 +136,7 @@ class report_custom(report_rml):
<col t='yes'>%s</col>
<col t='yes'>%s</col>
</row>
""" % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Uom'), _('Supplier Price per Uom'))
""" % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Unit of Measure'), _('Supplier Price per Unit of Measure'))
purchase_price_digits = rml_obj.get_digits(dp='Purchase Price')

View File

@ -28,7 +28,7 @@ class mrp_config_settings(osv.osv_memory):
_inherit = 'res.config.settings'
_columns = {
'module_stock_planning': fields.boolean('Master Production Schedule',
'module_stock_planning': fields.boolean('Master Manufacturing Order Schedule',
help ="""This allows to create a manual procurement plan apart of the normal MRP scheduling,
which works automatically based on minimum stock rules.
This installs the module stock_planning."""),
@ -41,27 +41,33 @@ class mrp_config_settings(osv.osv_memory):
* Repair quotation report
* Notes for the technician and for the final customer.
This installs the module mrp_repair."""),
'module_mrp_operations': fields.boolean("Track Dates in Work Order Operations",
'module_mrp_operations': fields.boolean("Detailed Planning of Work Orders",
help="""This allows to add state, date_start,date_stop in production order operation lines (in the "Work Centers" tab).
This installs the module mrp_operations."""),
'module_mrp_subproduct': fields.boolean("Produce Different Products from one Production",
'module_mrp_subproduct': fields.boolean("Produce Several Products from One Manufacturing Order",
help="""You can configure sub-products in the bill of material.
Without this module: A + B + C -> D.
With this module: A + B + C -> D + E.
This installs the module mrp_subproduct."""),
'module_mrp_jit': fields.boolean("Just in Time Scheduling",
'module_mrp_jit': fields.boolean("Real-Time Scheduling",
help="""This allows Just In Time computation of procurement orders.
All procurement orders will be processed immediately, which could in some
cases entail a small performance impact.
This installs the module mrp_jit."""),
'module_stock_no_autopicking': fields.boolean("Manual Picking to Fulfill Manufacturing Orders",
help="""This module allows an intermediate picking process to provide raw materials to production orders.
For example to manage production made by your suppliers (sub-contracting).
To achieve this, set the assembled product which is sub-contracted to "No Auto-Picking"
and put the location of the supplier in the routing of the assembly operation.
This installs the module stock_no_autopicking."""),
'group_mrp_routings': fields.boolean("Manage Routings and Work Orders",
implied_group='mrp.group_mrp_routings',
help="""Routings allow you to create and manage the manufacturing operations that should be followed
within your work centers in order to produce a product. They are attached to bills of materials
that will define the required raw materials."""),
'group_mrp_properties': fields.boolean("Manage Properties",
'group_mrp_properties': fields.boolean("Allow Several BoMs per Product",
implied_group='product.group_mrp_properties',
help="""Allows to define specific property that can be assigned to your bill of materials."""),
help="""The selection of the right Bill of Material to use will depend on the properties specified on the sale order and the Bill of Material."""),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -20,7 +20,7 @@
<separator string="Logistics" colspan="4"/>
<field name="module_mrp_jit"/>
<field name="module_stock_no_autopicking"/>
<separator string="Bill Of Material" colspan="4"/>
<field name="group_mrp_routings"/>
<field name="group_mrp_properties"/>
@ -38,7 +38,7 @@
</record>
<menuitem id="base.menu_mrp_config" name="Manufacturing" parent="base.menu_config"
sequence="4" action="action_mrp_configuration"/>
sequence="8" action="action_mrp_configuration"/>
</data>
</openerp>

View File

@ -28,7 +28,7 @@ class change_production_qty(osv.osv_memory):
_description = 'Change Quantity of Products'
_columns = {
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product UoM'), required=True),
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
}
def default_get(self, cr, uid, fields, context=None):

View File

@ -27,7 +27,7 @@ class mrp_product_produce(osv.osv_memory):
_description = "Product Produce"
_columns = {
'product_qty': fields.float('Select Quantity', digits_compute=dp.get_precision('Product UoM'), required=True),
'product_qty': fields.float('Select Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
'mode': fields.selection([('consume_produce', 'Consume & Produce'),
('consume', 'Consume Only')], 'Mode', required=True,
help="'Consume only' mode will only consume the products with the quantity selected.\n"

View File

@ -105,7 +105,7 @@ class mrp_production_workcenter_line(osv.osv):
'product':fields.related('production_id','product_id',type='many2one',relation='product.product',string='Product',
readonly=True),
'qty':fields.related('production_id','product_qty',type='float',string='Qty',readonly=True, store=True),
'uom':fields.related('production_id','product_uom',type='many2one',relation='product.uom',string='UOM',readonly=True),
'uom':fields.related('production_id','product_uom',type='many2one',relation='product.uom',string='Unit of Measure',readonly=True),
}
_defaults = {

View File

@ -35,7 +35,7 @@ class mrp_workorder(osv.osv):
'nbr': fields.integer('# of Lines', readonly=True),
'date': fields.date('Date', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product UoM'), readonly=True),
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), readonly=True),
'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Cancelled'),('done','Finished')],'State', readonly=True),
'total_hours': fields.float('Total Hours', readonly=True),
'total_cycles': fields.float('Total Cycles', readonly=True),

View File

@ -268,9 +268,9 @@ class mrp_repair(osv.osv):
}
def onchange_lot_id(self, cr, uid, ids, lot, product_id):
""" On change of production lot sets the values of source location,
""" On change of Serial Number sets the values of source location,
destination location, move and guarantee limit.
@param lot: Changed id of production lot.
@param lot: Changed id of Serial Number.
@param product_id: Product id from current record.
@return: Dictionary of values.
"""
@ -334,7 +334,7 @@ class mrp_repair(osv.osv):
raise osv.except_osv(_('Error !'),_('You cannot confirm a repair order which has no line.'))
for line in o.operations:
if line.product_id.track_production and not line.prodlot_id:
raise osv.except_osv(_('Warning'), _("Production lot is required for opration line with product '%s'") % (line.product_id.name))
raise osv.except_osv(_('Warning'), _("Serial number is required for operation line with product '%s'") % (line.product_id.name))
mrp_line_obj.write(cr, uid, [l.id for l in o.operations], {'state': 'confirmed'})
return True
@ -644,8 +644,8 @@ class mrp_repair_line(osv.osv, ProductChangeMixin):
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price')),
'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Sale Price')),
'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'),
'product_uom_qty': fields.float('Quantity (UoM)', digits=(16,2), required=True),
'product_uom': fields.many2one('product.uom', 'Product UoM', required=True),
'product_uom_qty': fields.float('Quantity (Unit of Measure)', digits=(16,2), required=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number',domain="[('product_id','=',product_id)]"),
'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
'location_id': fields.many2one('stock.location', 'Source Location', required=True, select=True),
@ -735,7 +735,7 @@ class mrp_repair_fee(osv.osv, ProductChangeMixin):
'product_id': fields.many2one('product.product', 'Product'),
'product_uom_qty': fields.float('Quantity', digits=(16,2), required=True),
'price_unit': fields.float('Unit Price', required=True),
'product_uom': fields.many2one('product.uom', 'Product UoM', required=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Sale Price')),
'tax_id': fields.many2many('account.tax', 'repair_fee_line_tax', 'repair_fee_line_id', 'tax_id', 'Taxes'),
'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),

View File

@ -53,7 +53,7 @@
<field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
<field name='prodlot_id'/>
<field name="product_uom_qty" string="Qty" />
<field name="product_uom" string="UoM"/>
<field name="product_uom" string="Unit of Measure"/>
<field name="price_unit"/>
<field name="price_subtotal"/>
<field name="location_id"/>
@ -85,7 +85,7 @@
<field name="location_id"/>
<field name="location_dest_id"/>
<field name="product_uom_qty" string="Qty"/>
<field name="product_uom" string="UoM"/>
<field name="product_uom" string="Unit of Measure"/>
<field name="price_unit"/>
<field name="tax_id"/>
<field name="to_invoice"/>
@ -129,7 +129,7 @@
<field name='name'/>
<field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id,parent.guarantee_limit)" colspan="4"/>
<field name="product_uom_qty" string="Qty"/>
<field name="product_uom" string="UoM" />
<field name="product_uom" string="Unit of Measure" />
<field name="price_unit"/>
<field name="price_subtotal"/>
<newline/>
@ -150,7 +150,7 @@
<field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id,parent.guarantee_limit)"/>
<field name='name'/>
<field name="product_uom_qty" string="Qty"/>
<field name="product_uom" string="UoM"/>
<field name="product_uom" string="Unit of Measure"/>
<field name="price_unit"/>
<field name="to_invoice"/>
<field name="price_subtotal"/>
@ -219,7 +219,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_repair_order_form_filter"/>
<field name="help">Repair orders allow you to organize your product repairs. In a repair order, you can detail the components you remove, add or replace and record the time you spent on the different operations. The repair order uses the warranty date on the production lot in order to know if whether the repair should be invoiced to the customer or not.</field>
<field name="help">Repair orders allow you to organize your product repairs. In a repair order, you can detail the components you remove, add or replace and record the time you spent on the different operations. The repair order uses the warranty date on the Serial Number in order to know if whether the repair should be invoiced to the customer or not.</field>
</record>
<menuitem action="action_repair_order_tree" id="menu_repair_order" parent="mrp.menu_mrp_manufacturing" groups="mrp.group_mrp_user" name="Repair Orders" sequence="50"/>

View File

@ -28,8 +28,8 @@ class mrp_subproduct(osv.osv):
_description = 'Sub Product'
_columns={
'product_id': fields.many2one('product.product', 'Product', required=True),
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product UoM'), required=True),
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True),
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'subproduct_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Quantity Type', required=True, help="Define how the quantity of subproducts will be set on the production orders using this BoM.\
'Fixed' depicts a situation where the quantity of created subproduct is always equal to the quantity set on the BoM, regardless of how many are created in the production order.\
By opposition, 'Variable' means that the quantity will be computed as\

View File

@ -92,8 +92,8 @@ class procurement_order(osv.osv):
'date_planned': fields.datetime('Scheduled date', required=True, select=True),
'date_close': fields.datetime('Date Closed'),
'product_id': fields.many2one('product.product', 'Product', required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_uom': fields.many2one('product.uom', 'Product UoM', required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, states={'draft':[('readonly',False)]}, readonly=True),
'product_uos_qty': fields.float('UoS Quantity', states={'draft':[('readonly',False)]}, readonly=True),
'product_uos': fields.many2one('product.uom', 'Product UoS', states={'draft':[('readonly',False)]}, readonly=True),
'move_id': fields.many2one('stock.move', 'Reservation', ondelete='set null'),
@ -545,7 +545,7 @@ class stock_warehouse_orderpoint(osv.osv):
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', required=True, ondelete="cascade"),
'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade"),
'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type','=','product')]),
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'product_min_qty': fields.float('Min Quantity', required=True,
help="When the virtual stock goes below the Min Quantity specified for this field, OpenERP generates "\
"a procurement to bring the virtual stock to the Max Quantity."),
@ -571,6 +571,17 @@ class stock_warehouse_orderpoint(osv.osv):
('qty_multiple_check', 'CHECK( qty_multiple > 0 )', 'Qty Multiple must be greater than zero.'),
]
def default_get(self, cr, uid, fields, context=None):
res = super(stock_warehouse_orderpoint, self).default_get(cr, uid, fields, context)
# default 'warehouse_id' and 'location_id'
if 'warehouse_id' not in res:
warehouse = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'warehouse0', context)
res['warehouse_id'] = warehouse.id
if 'location_id' not in res:
warehouse = self.pool.get('stock.warehouse').browse(cr, uid, res['warehouse_id'], context)
res['location_id'] = warehouse.lot_stock_id.id
return res
def onchange_warehouse_id(self, cr, uid, ids, warehouse_id, context=None):
""" Finds location id for changed warehouse.
@param warehouse_id: Changed id of warehouse.

View File

@ -16,7 +16,7 @@
<field name="origin"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom" string="UOM"/>
<field name="product_uom" string="Unit of Measure"/>
<field name="procure_method"/>
<field name="state"/>
<field name="message"/>
@ -35,7 +35,7 @@
<field name="origin"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom" string="UOM"/>
<field name="product_uom" string="Unit of Measure"/>
<field name="state" invisible = "1"/>
<field name="message"/>
</tree>
@ -170,7 +170,7 @@
<tree string="Minimum Stock Rules">
<field name="name"/>
<field name="warehouse_id"/>
<field name="location_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="product_id"/>
<field name="product_uom"/>
<field name="product_min_qty"/>
@ -188,7 +188,7 @@
<group>
<field name="name"/>
<field name="warehouse_id" widget="selection"/>
<field name="location_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="product_id"/>
</group>
@ -216,7 +216,7 @@
<group col="2" colspan="2">
<separator string="Locations" colspan="2" />
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
<field name="location_id"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group col="2" colspan="2">
@ -278,8 +278,10 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<group name="misc" position="after">
<separator string="Minimum Stock Rules" colspan="4"/>
<field name="orderpoint_ids" nolabel="1" colspan="4" context="{'default_product_id': active_id}"/>
<group colspan="4" attrs="{'invisible':[('type','=','service')]}" groups="stock.group_stock_manager">
<separator string="Minimum Stock Rules" colspan="4"/>
<field name="orderpoint_ids" nolabel="1" colspan="4" context="{'default_product_id': active_id}"/>
</group>
</group>
</field>
</record>

View File

@ -181,7 +181,7 @@
</record>
<menuitem
action="product_pricelist_action2" id="menu_product_pricelist_action2"
parent="base.menu_base_config" sequence="20"/>
parent="base.menu_base_config" sequence="20" groups="product.group_sale_pricelist"/>
<record id="product_price_type_view" model="ir.ui.view">
<field name="name">product.price.type.form</field>

View File

@ -96,23 +96,23 @@ class product_uom(osv.osv):
_order = "name"
_columns = {
'name': fields.char('Name', size=64, required=True, translate=True),
'category_id': fields.many2one('product.uom.categ', 'UoM Category', required=True, ondelete='cascade',
'category_id': fields.many2one('product.uom.categ', 'Unit of Measure Category', required=True, ondelete='cascade',
help="Quantity conversions may happen automatically between Units of Measure in the same category, according to their respective ratios."),
'factor': fields.float('Ratio', required=True,digits=(12, 12),
help='How many times this UoM is smaller than the reference UoM in this category:\n'\
help='How many times this Unit of Measure is smaller than the reference Unit of Measure in this category:\n'\
'1 * (reference unit) = ratio * (this unit)'),
'factor_inv': fields.function(_factor_inv, digits=(12,12),
fnct_inv=_factor_inv_write,
string='Ratio',
help='How many times this UoM is bigger than the reference UoM in this category:\n'\
help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category:\n'\
'1 * (this unit) = ratio * (reference unit)', required=True),
'rounding': fields.float('Rounding Precision', digits_compute=dp.get_precision('Product UoM'), required=True,
'rounding': fields.float('Rounding Precision', digits_compute=dp.get_precision('Product Unit of Measure'), required=True,
help="The computed quantity will be a multiple of this value. "\
"Use 1.0 for a UoM that cannot be further split, such as a piece."),
"Use 1.0 for a Unit of Measure that cannot be further split, such as a piece."),
'active': fields.boolean('Active', help="By unchecking the active field you can disable a unit of measure without deleting it."),
'uom_type': fields.selection([('bigger','Bigger than the reference UoM'),
('reference','Reference UoM for this category'),
('smaller','Smaller than the reference UoM')],'UoM Type', required=1),
'uom_type': fields.selection([('bigger','Bigger than the reference Unit of Measure'),
('reference','Reference Unit of Measure for this category'),
('smaller','Smaller than the reference Unit of Measure')],'Unit of Measure Type', required=1),
}
_defaults = {
@ -172,7 +172,7 @@ class product_uom(osv.osv):
if 'category_id' in vals:
for uom in self.browse(cr, uid, ids, context=context):
if uom.category_id.id != vals['category_id']:
raise osv.except_osv(_('Warning'),_("Cannot change the category of existing UoM '%s'.") % (uom.name,))
raise osv.except_osv(_('Warning'),_("Cannot change the category of existing Unit of Measure '%s'.") % (uom.name,))
return super(product_uom, self).write(cr, uid, ids, vals, context=context)
product_uom()
@ -315,9 +315,9 @@ class product_template(osv.osv):
'uom_id': fields.many2one('product.uom', 'Default Unit of Measure', required=True, help="Default Unit of Measure used for all stock operation."),
'uom_po_id': fields.many2one('product.uom', 'Purchase Unit of Measure', required=True, help="Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."),
'uos_id' : fields.many2one('product.uom', 'Unit of Sale',
help='Used by companies that manage two units of measure: invoicing and inventory management. For example, in food industries, you will manage a stock of ham but invoice in Kg. Keep empty to use the default UOM.'),
'uos_coeff': fields.float('UOM -> UOS Coeff', digits_compute= dp.get_precision('Product UoS'),
help='Coefficient to convert UOM to UOS\n'
help='Used by companies that manage two units of measure: invoicing and inventory management. For example, in food industries, you will manage a stock of ham but invoice in Kg. Keep empty to use the default Unit of Measure.'),
'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Product UoS'),
help='Coefficient to convert Unit of Measure to UOS\n'
' uos = uom * coeff'),
'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type', required=True),
'seller_info_id': fields.function(_calc_seller, type='many2one', relation="product.supplierinfo", multi="seller_info"),
@ -360,7 +360,7 @@ class product_template(osv.osv):
for product in self.browse(cr, uid, ids, context=context):
old_uom = product.uom_po_id
if old_uom.category_id.id != new_uom.category_id.id:
raise osv.except_osv(_('UoM categories Mismatch!'), _("New UoM '%s' must belong to same UoM category '%s' as of old UoM '%s'. If you need to change the unit of measure, you may desactivate this product from the 'Procurement & Locations' tab and create a new one.") % (new_uom.name, old_uom.category_id.name, old_uom.name,))
raise osv.except_osv(_('Unit of Measure categories Mismatch!'), _("New Unit of Measure '%s' must belong to same Unit of Measure category '%s' as of old Unit of Measure '%s'. If you need to change the unit of measure, you may desactivate this product from the 'Procurement & Locations' tab and create a new one.") % (new_uom.name, old_uom.category_id.name, old_uom.name,))
return super(product_template, self).write(cr, uid, ids, vals, context=context)
_defaults = {
@ -397,7 +397,7 @@ class product_template(osv.osv):
return True
_constraints = [
(_check_uom, 'Error: The default UOM and the purchase UOM must be in the same category.', ['uom_id']),
(_check_uom, 'Error: The default Unit of Measure and the purchase Unit of Measure must be in the same category.', ['uom_id']),
]
def name_get(self, cr, user, ids, context=None):
@ -783,9 +783,9 @@ class product_supplierinfo(osv.osv):
'product_name': fields.char('Supplier Product Name', size=128, help="This supplier's product name will be used when printing a request for quotation. Keep empty to use the internal one."),
'product_code': fields.char('Supplier Product Code', size=64, help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."),
'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."),
'product_uom': fields.related('product_id', 'uom_po_id', type='many2one', relation='product.uom', string="Supplier UoM", readonly="1", help="This comes from the product form."),
'min_qty': fields.float('Minimal Quantity', required=True, help="The minimal quantity to purchase to this supplier, expressed in the supplier Product UoM if not empty, in the default unit of measure of the product otherwise."),
'qty': fields.function(_calc_qty, store=True, type='float', string='Quantity', multi="qty", help="This is a quantity which is converted into Default Uom."),
'product_uom': fields.related('product_id', 'uom_po_id', type='many2one', relation='product.uom', string="Supplier Unit of Measure", readonly="1", help="This comes from the product form."),
'min_qty': fields.float('Minimal Quantity', required=True, help="The minimal quantity to purchase to this supplier, expressed in the supplier Product Unit of Measure if not empty, in the default unit of measure of the product otherwise."),
'qty': fields.function(_calc_qty, store=True, type='float', string='Quantity', multi="qty", help="This is a quantity which is converted into Default Unit of Measure."),
'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True),
'delay' : fields.integer('Delivery Lead Time', required=True, help="Lead time in days between the confirmation of the purchase order and the reception of the products in your warehouse. Used by the scheduler for automatic computation of the purchase order planning."),
'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'),
@ -844,8 +844,8 @@ class pricelist_partnerinfo(osv.osv):
_columns = {
'name': fields.char('Description', size=64),
'suppinfo_id': fields.many2one('product.supplierinfo', 'Partner Information', required=True, ondelete='cascade'),
'min_quantity': fields.float('Quantity', required=True, help="The minimal quantity to trigger this rule, expressed in the supplier UoM if any or in the default UoM of the product otherrwise."),
'price': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Purchase Price'), help="This price will be considered as a price for the supplier UoM if any or the default Unit of Measure of the product otherwise"),
'min_quantity': fields.float('Quantity', required=True, help="The minimal quantity to trigger this rule, expressed in the supplier Unit of Measure if any or in the default Unit of Measure of the product otherrwise."),
'price': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Purchase Price'), help="This price will be considered as a price for the supplier Unit of Measure if any or the default Unit of Measure of the product otherwise"),
}
_order = 'min_quantity asc'
pricelist_partnerinfo()

View File

@ -161,7 +161,7 @@ parameter) will see those record just disappear.
<field name="digits">2</field>
</record>
<record forcecreate="True" id="decimal_product_uom" model="decimal.precision">
<field name="name">Product UoM</field>
<field name="name">Product Unit of Measure</field>
<field name="digits" eval="3"/>
</record>
<record forcecreate="True" id="decimal_product_uos" model="decimal.precision">

View File

@ -28,7 +28,7 @@
<group expand='0' string='Group by...'>
<filter string='Category' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'categ_id'}"/>
<separator orientation="vertical"/>
<filter string='Default UOM' icon="terp-mrp" domain="[]" context="{'group_by' : 'uom_id'}" />
<filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'uom_id'}" />
<separator orientation="vertical"/>
<filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}" />
<separator orientation="vertical" groups="base.group_multi_company"/>
@ -50,7 +50,7 @@
<field name="name"/>
<field name="categ_id" invisible="1"/>
<field name="variants" groups="product.group_product_variant"/>
<field name="uom_id" string="UoM" groups="product.group_uom"/>
<field name="uom_id" string="Unit of Measure" groups="product.group_uom"/>
<field name="type"/>
<field name="qty_available"/>
<field name="virtual_available"/>
@ -107,7 +107,7 @@
<field name="price_extra" groups="product.group_product_variant"/>
</group>
<group colspan="2" col="2">
<group colspan="2" col="2" groups="product.group_stock_packaging">
<separator string="Weights" colspan="2"/>
<field digits="(14, 3)" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
<field name="weight" attrs="{'readonly':[('type','=','service')]}"/>
@ -128,7 +128,7 @@
</group>
<group colspan="2" col="2" name="uos" groups="product.group_uos">
<separator string="Second UoM" colspan="2"/>
<separator string="Second Unit of Measure" colspan="2"/>
<field name="uos_id"/>
<field name="uos_coeff"/>
<field name="mes_type"/>
@ -139,7 +139,7 @@
<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="produce_delay" attrs="{'invisible':[('type','=','service')]}"/>
<field name="warranty"/>
</group>
<group colspan="2" col="2" name="store">
@ -440,7 +440,7 @@
<field name="help">Create and manage the units of measure you want to be used in your system. You can define a conversion rate between several Units of Measure within the same category.</field>
</record>
<menuitem id="next_id_16" name="Units of Measure" parent="prod_config_main" sequence="30" groups="product.group_uom"/>
<menuitem action="product_uom_form_action" id="menu_product_uom_form_action" parent="base.menu_base_config" sequence="30"/>
<menuitem action="product_uom_form_action" id="menu_product_uom_form_action" parent="base.menu_base_config" sequence="30" groups="product.group_uom"/>
<record id="product_uom_categ_form_view" model="ir.ui.view">
<field name="name">product.uom.categ.form</field>
@ -453,14 +453,14 @@
</field>
</record>
<record id="product_uom_categ_form_action" model="ir.actions.act_window">
<field name="name">UoM Categories</field>
<field name="name">Unit of Measure Categories</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.uom.categ</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help">Create and manage the units of measure categories you want to be used in your system. If several units of measure are in the same category, they can be converted to each other. For example, in the unit of measure category "Time", you will have the following UoM: Hours, Days.</field>
</record>
<menuitem action="product_uom_categ_form_action" id="menu_product_uom_categ_form_action" parent="base.menu_base_config" sequence="25"/>
<menuitem action="product_uom_categ_form_action" id="menu_product_uom_categ_form_action" parent="base.menu_base_config" sequence="25" groups="product.group_uom"/>
<record id="product_ul_form_view" model="ir.ui.view">
<field name="name">product.ul.form.view</field>
@ -671,13 +671,13 @@
</group>
<group colspan="2" col="2" name="uom">
<separator string="UoM" colspan="2"/>
<separator string="Unit of Measure" colspan="2"/>
<field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" groups="product.group_uom"/>
<field name="uom_po_id"/>
</group>
<group colspan="2" col="2" name="uos" groups="product.group_uom">
<separator string="Second UoM" colspan="2"/>
<separator string="Second Unit of Measure" colspan="2"/>
<field name="uos_id"/>
<field name="uos_coeff"/>
<field name="mes_type"/>

View File

@ -11,7 +11,7 @@
<record id="group_product_variant" model="res.groups">
<field name="name">Product Variant</field>
<field name="category_id" ref="base.module_category_usability"/>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_sale_pricelist" model="res.groups">
@ -30,7 +30,7 @@
</record>
<record id="group_uos" context="{'noadmin':True}" model="res.groups">
<field name="name">Manage Secondary UoM</field>
<field name="name">Manage Secondary Unit of Measure</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>

View File

@ -50,7 +50,7 @@ class stock_production_lot(osv.osv):
help='The date on which the lot starts deteriorating without becoming dangerous.'),
'removal_date': fields.datetime('Removal Date',
help='The date on which the lot should be removed.'),
'alert_date': fields.datetime('Alert Date', help="The date on which an alert should be notified about the production lot."),
'alert_date': fields.datetime('Alert Date', help="The date on which an alert should be notified about the serial number."),
}
# Assign dates according to products data
def create(self, cr, uid, vals, context=None):
@ -78,12 +78,12 @@ class product_product(osv.osv):
_inherit = 'product.product'
_columns = {
'life_time': fields.integer('Product Life Time',
help='The number of days before a production lot may become dangerous and should not be consumed.'),
help='The number of days before a serial number may become dangerous and should not be consumed.'),
'use_time': fields.integer('Product Use Time',
help='The number of days before a production lot starts deteriorating without becoming dangerous.'),
help='The number of days before a serial number starts deteriorating without becoming dangerous.'),
'removal_time': fields.integer('Product Removal Time',
help='The number of days before a production lot should be removed.'),
'alert_time': fields.integer('Product Alert Time', help="The number of days after which an alert should be notified about the production lot."),
help='The number of days before a serial number should be removed.'),
'alert_time': fields.integer('Product Alert Time', help="The number of days after which an alert should be notified about the serial number."),
}
product_product()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -172,7 +172,7 @@ class project(osv.osv):
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members',
help="Project's members are users who can have an access to the tasks related to this project.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'tasks': fields.one2many('project.task', 'project_id', "Project tasks"),
'tasks': fields.one2many('project.task', 'project_id', "Task Activities"),
'planned_hours': fields.function(_progress_rate, multi="progress", string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.",
store = {
'project.project': (_get_project_and_parents, ['tasks', 'parent_id', 'child_ids'], 10),

View File

@ -332,10 +332,10 @@
<group colspan="6" col="6">
<field name="name" select="1"/>
<field name="project_id" select="1" on_change="onchange_project(project_id)"/>
<field name="total_hours" widget="float_time"/>
<field name="total_hours" widget="float_time" groups="project.group_tasks_work_on_tasks"/>
<field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
<field name="user_id" select="1" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
<field name="progress" widget="progressbar"/>
<field name="progress" widget="progressbar" groups="project.group_tasks_work_on_tasks"/>
</group>
<notebook colspan="4">
<page string="Information">
@ -344,18 +344,19 @@
name="planned_hours"
widget="float_time"
attrs="{'readonly':[('state','!=','draft')]}"
groups="project.group_time_work_estimation_tasks"
on_change="onchange_planned(planned_hours, effective_hours)"/>
<field
name="effective_hours"
widget="float_time" invisible="1"/>
widget="float_time" invisible="1" groups="project.group_tasks_work_on_tasks"/>
</group>
<group col="3" colspan="2">
<field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" colspan="2"/>
<field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" colspan="2" groups="project.group_time_work_estimation_tasks"/>
<button name="%(action_project_task_reevaluate)d" string="Reevaluate" type="action" colspan="1" target="new" states="open,pending" icon="gtk-edit"/>
</group>
<field colspan="4" name="description" nolabel="1" attrs="{'readonly':[('state','=','done')]}"/>
<field colspan="4" name="work_ids" nolabel="1" attrs="{'readonly':[('state','in',['done','draft'])]}">
<field colspan="4" name="work_ids" nolabel="1" attrs="{'readonly':[('state','in',['done','draft'])]}" groups="project.group_tasks_work_on_tasks">
<tree string="Task Work" editable="top">
<field name="name" />
<field name="hours" widget="float_time" sum="Spent Hours"/>
@ -424,7 +425,7 @@
<field name="sequence"/>
<field name="state"/>
<field name="kanban_state"/>
<field name="remaining_hours" sum="Remaining Time"/>
<field name="remaining_hours" sum="Remaining Time" groups="project.group_time_work_estimation_tasks"/>
<field name="date_deadline"/>
<templates>
<t t-name="task_details">
@ -514,9 +515,9 @@
<field name="user_id" invisible="context.get('user_invisible', False)"/>
<field name="delegated_user_id" invisible="context.get('show_delegated', True)"/>
<field name="total_hours" invisible="1"/>
<field name="planned_hours" invisible="context.get('set_visible',False)"/>
<field name="planned_hours" invisible="context.get('set_visible',False)" groups="project.group_time_work_estimation_tasks"/>
<field name="effective_hours" widget="float_time" sum="Spent Hours" invisible="1"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)" invisible="context.get('set_visible',False)"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)" invisible="context.get('set_visible',False)" groups="project.group_time_work_estimation_tasks"/>
<field name="date_deadline" invisible="context.get('deadline_visible',True)"/>
<field name="type_id" invisible="context.get('set_visible',False)"/>
<button name="next_type" invisible="context.get('set_visible',False)"

View File

@ -35,7 +35,7 @@ class project_configuration(osv.osv_memory):
help="""Lets the company customize which Pad installation should be used to link to new pads
(by default, http://ietherpad.com/).
This installs the module pad."""),
'module_project_timesheet': fields.boolean("Timesheets and Invoices",
'module_project_timesheet': fields.boolean("Timesheets per Task",
help="""This allows you to transfer the entries under tasks defined for Project Management to
the timesheet line entries for particular date and user, with the effect of creating,
editing and deleting either ways.
@ -49,6 +49,12 @@ class project_configuration(osv.osv_memory):
'module_project_issue_sheet': fields.boolean("Track and Invoice Issues Working Time",
help="""Provides timesheet support for the issues/bugs management in project.
This installs the module project_issue_sheet."""),
'group_tasks_work_on_tasks': fields.boolean("Task's Work on Tasks",
implied_group='project.group_tasks_work_on_tasks',
help="Allows you to compute work on tasks."),
'group_time_work_estimation_tasks': fields.boolean("Time Estimation on Tasks",
implied_group='project.group_time_work_estimation_tasks',
help="Allows you to compute Time Estimation on tasks."),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -17,6 +17,8 @@
<field name="module_project_mrp"/>
<field name="module_project_timesheet"/>
<field name="module_pad"/>
<field name="group_tasks_work_on_tasks"/>
<field name="group_time_work_estimation_tasks"/>
<separator string="Planning" colspan="4"/>
<field name="module_project_long_term"/>
@ -39,7 +41,7 @@
</record>
<menuitem id="base.menu_project_config" name="Project" parent="base.menu_config"
sequence="5" action="action_config_settings"/>
sequence="10" action="action_config_settings"/>
</data>
</openerp>

View File

@ -18,6 +18,17 @@
<field name="groups_id" eval="[(6,0,[ref('group_project_manager')])]"/>
</record>
<record id="group_tasks_work_on_tasks" model="res.groups">
<field name="name">Task's Work on Tasks</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_time_work_estimation_tasks" model="res.groups">
<field name="name">Time Estimation on Tasks</field>
<field name="implied_ids" eval="[(4, ref('group_tasks_work_on_tasks'))]"/>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record model="ir.rule" id="project_comp_rule">
<field name="name">Project multi-company</field>
<field name="model_id" ref="model_project_project"/>

View File

@ -26,21 +26,7 @@ class project_issue_settings(osv.osv_memory):
_inherit = ['project.config.settings', 'fetchmail.config.settings']
_columns = {
'fetchmail_issue': fields.boolean("Create Issues from an E-mail Account",
fetchmail_model='project.issue', fetchmail_name='Incoming issues',
'fetchmail_issue': fields.boolean("Create Issues from Incoming Mails", readonly=True,
fetchmail_model='project.issue', fetchmail_name='Incoming Issues',
help="""Allows you to configure your incoming mail server, and create issues from incoming emails."""),
'issue_server' : fields.char('Server', size=256),
'issue_port' : fields.integer('Port'),
'issue_type': fields.selection([
('pop', 'POP Server'),
('imap', 'IMAP Server'),
('local', 'Local Server'),
], 'Type'),
'issue_is_ssl': fields.boolean('SSL/TLS', help="Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP=995)"),
'issue_user' : fields.char('Username', size=256),
'issue_password' : fields.char('Password', size=1024),
}
_defaults = {
'issue_type': 'pop',
}

View File

@ -10,14 +10,7 @@
<field name="arch" type="xml">
<group name="support" position="after">
<field name="fetchmail_issue"/>
<group colspan="2" attrs="{'invisible': [('fetchmail_issue','=',False)]}">
<field name="issue_server" attrs="{'required': [('fetchmail_issue','=',True)]}"/>
<field name="issue_type" on_change="onchange_fetchmail('issue', issue_type, issue_is_ssl)" attrs="{'required': [('fetchmail_issue','=',True)]}"/>
<field name="issue_port" attrs="{'required': [('fetchmail_issue','=',True)]}"/>
<field name="issue_is_ssl" on_change="onchange_fetchmail('issue', issue_type, issue_is_ssl)"/>
<field name="issue_user" attrs="{'required': [('fetchmail_issue','=',True)]}"/>
<field name="issue_password" password="True" attrs="{'required': [('fetchmail_issue','=',True)]}"/>
</group>
<button colspan="2" type="object" name="configure_fetchmail_issue" string="Configure" icon="gtk-execute"/>
</group>
</field>
</record>

View File

@ -110,7 +110,7 @@ class project_phase(osv.osv):
'previous_phase_ids': fields.many2many('project.phase', 'project_phase_rel', 'next_phase_id', 'prv_phase_id', 'Previous Phases', states={'cancelled':[('readonly',True)]}),
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of phases."),
'duration': fields.float('Duration', required=True, help="By default in days", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'product_uom': fields.many2one('product.uom', 'Duration UoM', required=True, help="UoM (Unit of Measure) is the unit of measurement for Duration", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'product_uom': fields.many2one('product.uom', 'Duration Unit of Measure', required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for Duration", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'task_ids': fields.one2many('project.task', 'phase_id', "Project Tasks", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'user_force_ids': fields.many2many('res.users', string='Force Assigned Users'),
'user_ids': fields.one2many('project.user.allocation', 'phase_id', "Assigned Users",states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]},

View File

@ -204,9 +204,9 @@ class report_account_analytic_planning_line(osv.osv):
'planning_id': fields.many2one('report_account_analytic.planning', 'Planning', required=True, ondelete='cascade'),
'user_id': fields.many2one('res.users', 'User', select=True),
'amount': fields.float('Quantity', required=True),
'amount_unit': fields.many2one('product.uom', 'Qty UoM', required=True),
'amount_unit': fields.many2one('product.uom', 'Qty Unit of Measure', required=True),
'note': fields.text('Note', size=64),
'amount_in_base_uom': fields.function(_amount_base_uom, string='Quantity in base uom', store=True),
'amount_in_base_uom': fields.function(_amount_base_uom, string='Quantity in base Unit of Measure', store=True),
'task_ids': fields.one2many('project.task', 'planning_line_id', 'Planning Tasks'),
}
_order = 'user_id, account_id'

View File

@ -174,7 +174,7 @@ class purchase_order(osv.osv):
'validator' : fields.many2one('res.users', 'Validated by', readonly=True),
'notes': fields.text('Notes'),
'invoice_ids': fields.many2many('account.invoice', 'purchase_invoice_rel', 'purchase_id', 'invoice_id', 'Invoices', help="Invoices generated for a purchase order"),
'picking_ids': fields.one2many('stock.picking', 'purchase_id', 'Picking List', readonly=True, help="This is the list of picking list that have been generated for this purchase"),
'picking_ids': fields.one2many('stock.picking.in', 'purchase_id', 'Picking List', readonly=True, help="This is the list of incomming shipments that have been generated for this purchase order."),
'shipped':fields.boolean('Received', readonly=True, select=True, help="It indicates that a picking has been done"),
'shipped_rate': fields.function(_shipped_rate, string='Received', type='float'),
'invoiced': fields.function(_invoiced, string='Invoiced & Paid', type='boolean', help="It indicates that an invoice has been paid"),
@ -437,9 +437,9 @@ class purchase_order(osv.osv):
'name': self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.in'),
'origin': order.name + ((order.origin and (':' + order.origin)) or ''),
'date': order.date_order,
'type': 'in',
'partner_id': order.dest_address_id.id or order.partner_id.id,
'invoice_state': '2binvoiced' if order.invoice_method == 'picking' else 'none',
'type': 'in',
'purchase_id': order.id,
'company_id': order.company_id.id,
'move_lines' : [],
@ -714,10 +714,10 @@ class purchase_order_line(osv.osv):
_columns = {
'name': fields.char('Description', size=256, required=True),
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM'), required=True),
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
'date_planned': fields.date('Scheduled Date', required=True, select=True),
'taxes_id': fields.many2many('account.tax', 'purchase_order_taxe', 'ord_id', 'tax_id', 'Taxes'),
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'product_id': fields.many2one('product.product', 'Product', domain=[('purchase_ok','=',True)], change_default=True),
'move_ids': fields.one2many('stock.move', 'purchase_line_id', 'Reservation', readonly=True, ondelete='set null'),
'move_dest_id': fields.many2one('stock.move', 'Reservation Destination', ondelete='set null'),
@ -823,7 +823,7 @@ class purchase_order_line(osv.osv):
uom_id = product_uom_po_id
if product.uom_id.category_id.id != product_uom.browse(cr, uid, uom_id, context=context).category_id.id:
res['warning'] = {'title': _('Warning'), 'message': _('Selected UOM does not belong to the same category as the product UOM')}
res['warning'] = {'title': _('Warning'), 'message': _('Selected Unit of Measure does not belong to the same category as the product Unit of Measure')}
uom_id = product_uom_po_id
res['value'].update({'product_uom': uom_id})

View File

@ -136,7 +136,7 @@
<field name="date_order"/>
<field name="invoiced"/>
<newline/>
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
<field name="partner_ref"/>
<field name="shipped"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
@ -182,7 +182,7 @@
<separator string="Delivery" colspan="2"/>
<field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
<field name="minimum_planned_date"/>
<field name="location_id"/>
<field name="location_id" groups="stock.group_locations"/>
</group>
<group colspan="2" col="2">
<separator string="Invoice Control" colspan="2"/>

View File

@ -50,7 +50,7 @@ class purchase_report(osv.osv):
'date_approve':fields.date('Date Approved', readonly=True),
'expected_date':fields.date('Expected Date', readonly=True),
'validator' : fields.many2one('res.users', 'Validated By', readonly=True),
'product_uom' : fields.many2one('product.uom', 'Reference UoM', required=True),
'product_uom' : fields.many2one('product.uom', 'Reference Unit of Measure', required=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'user_id':fields.many2one('res.users', 'Responsible', readonly=True),
'delay':fields.float('Days to Validate', digits=(16,2), readonly=True),

View File

@ -102,6 +102,8 @@
<separator orientation="vertical"/>
<filter string="Product" name="group_product_id" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<filter string="Category" name="group_category_id" icon="terp-stock_symbol-selection" context="{'group_by':'category_id'}"/>
<filter string="Reference Unit of Measure" name="group_product_uom" icon="terp-mrp" context="{'group_by':'product_uom'}"/>
<filter string="Warehouse" icon="terp-go-home" context="{'group_by':'warehouse_id'}" groups="base.group_extended"/>
<filter string="Reference UOM" name="group_product_uom" icon="terp-mrp" context="{'group_by':'product_uom'}"/>
<filter string="Warehouse" icon="terp-go-home" context="{'group_by':'warehouse_id'}"/>
<filter string="Destination" icon="terp-gtk-jump-to-ltr" context="{'group_by':'location_id'}"/>

View File

@ -37,42 +37,54 @@ class purchase_config_settings(osv.osv_memory):
implied_group='product.group_purchase_pricelist',
help="""Allows to manage different prices based on rules per category of Supplier.
Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
'group_uom':fields.boolean("Manage Different UoM for Products",
'group_uom':fields.boolean("Manage Different Units of Measure for Products",
implied_group='product.group_uom',
help="""Allows you to select and maintain different units of measure for products."""),
'module_purchase_analytic_plans': fields.boolean('Purchase Analytic Plan',
'module_purchase_analytic_plans': fields.boolean('Use Multiple Analytic Accounts on Purchases',
help ="""Allows the user to maintain several analysis plans. These let you split
lines on a purchase order between several accounts and analytic plans.
This installs the module purchase_analytic_plans."""),
'module_warning': fields.boolean("Alerts by Products or Supplier",
help="""To trigger warnings in OpenERP objects.
Warning messages can be displayed for objects like sale order, purchase order, picking and invoice.
This installs the module warning."""),
'module_product_manufacturer': fields.boolean("Define a Manufacturer of Products",
help="""Allow to configure warnings on products and trigger them when a user wants to purchase a given product or a given supplier.
Example: Product: this product is deprecated, do not purchase more than 5.
Supplier: don't forget to ask for an express delivery."""),
'module_product_manufacturer': fields.boolean("Define Manufacturers on Products",
help="""This allows you to define the following for a product:
* Manufacturer
* Manufacturer Product Name
* Manufacturer Product Code
* Product Attributes.
This installs the module product_manufacturer."""),
'module_purchase_double_validation': fields.boolean("Double Validation",
'module_purchase_double_validation': fields.boolean("Two Levels of Approval",
help="""Provide a double validation mechanism for purchases exceeding minimum amount.
This installs the module purchase_double_validation."""),
'module_purchase_requisition': fields.boolean("Purchase Requisition",
help="""When a purchase order is created, you have the opportunity to save the related requisition.
This object regroups and allows you to keep track and order all your purchase orders.
This installs the module purchase_requisition."""),
'module_purchase_requisition': fields.boolean("Use Purchase Requisition",
help="""Purchase Requisitions are used when you want to request quotations from several suppliers for a given set of products.
You can configure per product if you directly do a Request for Quotation
to one supplier or if you want a purchase requisition to negotiate with several suppliers."""),
'decimal_precision': fields.integer('Decimal Precision on Price'),
}
_defaults = {
'default_invoice_method': 'manual',
}
def get_default_dp(self, cr, uid, fields, context=None):
dp = self.pool.get('ir.model.data').get_object(cr,uid, 'product','decimal_purchase')
return {'decimal_precision': dp.digits}
def set_default_dp(self, cr, uid, ids, context=None):
config = self.browse(cr, uid, ids[0], context)
dp = self.pool.get('ir.model.data').get_object(cr,uid, 'product','decimal_purchase')
dp.write({'digits': config.decimal_precision})
class account_config_settings(osv.osv_memory):
_inherit = 'account.config.settings'
_columns = {
'module_purchase_analytic_plans': fields.boolean('Several Analytic Accounts on Purchases',
help="""This allows install module purchase_analytic_plans."""),
'group_analytic_account_for_purchases': fields.boolean('Analytic Accounting for Purchases',
implied_group='purchase.group_analytic_accounting',
help="Allows you to specify an analytic account on purchase orders."),

View File

@ -13,7 +13,8 @@
</div>
<sheet layout="auto">
<separator string="Invoicing" colspan="4"/>
<field name="default_invoice_method" />
<field name="default_invoice_method"/>
<field name="decimal_precision"/>
<separator string="Purchase Order" colspan="4"/>
<field name="group_purchase_pricelist"/>
@ -39,16 +40,21 @@
</record>
<menuitem id="menu_purchase_config" name="Purchases" parent="base.menu_config"
sequence="2" action="action_purchase_configuration"/>
sequence="3" action="action_purchase_configuration"/>
<record id="view_account_config" model="ir.ui.view">
<field name="name">account settings</field>
<field name="model">account.config.settings</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.view_account_config_settings"/>
<field name="priority" eval="18"/>
<field name="arch" type="xml">
<group name="analytic_accounting" position="after">
<group name="analytic_accounting" position="attributes">
<attribute name="invisible">0</attribute>
</group>
<group name="analytic_accounting" position="inside">
<field name="group_analytic_account_for_purchases"/>
<field name="module_purchase_analytic_plans"/>
</group>
</field>
</record>

View File

@ -126,4 +126,13 @@ class stock_partial_picking(osv.osv_memory):
'currency': move.picking_id.purchase_id.pricelist_id.currency_id.id}
return super(stock_partial_picking, self)._product_cost_for_average_update(cr, uid, move)
# Redefinition of the new field in order to update the model stock.picking.in in the orm
# FIXME: this is a temporary workaround because of a framework bug (ref: lp996816). It should be removed as soon as
# the bug is fixed
class stock_picking_in(osv.osv):
_inherit = 'stock.picking.in'
_columns = {
'purchase_id': fields.many2one('purchase.order', 'Purchase Order',
ondelete='set null', select=True),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -19,7 +19,7 @@
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<field name="auto_picking" position="after">
<field name="purchase_id"/>
<field name="purchase_id" invisible="1"/>
</field>
</field>
</record>
@ -28,9 +28,9 @@
domain="[('purchase_id', '=', active_id)]"
id="act_purchase_order_2_stock_picking"
name="Receptions"
res_model="stock.picking"
res_model="stock.picking.in"
src_model="purchase.order"
context="{'default_purchase_id': active_id, 'contact_display': 'partner'}" />
context="{'default_purchase_id': active_id, 'contact_display': 'partner', 'default_type': 'in'}" />
<record id="action_picking_in_tree_view" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
@ -47,28 +47,28 @@
<record id="stock_picking_in_inherit_purchase" model="ir.ui.view">
<field name="name">Incoming Picking Inherited</field>
<field name="model">stock.picking</field>
<field name="model">stock.picking.in</field>
<field name="type">form</field>
<field name="inherit_id" ref="stock.view_picking_in_form"/>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<field name="backorder_id" position="after">
<xpath expr="/form/sheet/group/group/field[@name='date']" position="before">
<field name="purchase_id"/>
</field>
</xpath>
</field>
</record>
<!-- Picking to Invoice -->
<record id="view_picking_in_search_picking_to_invoice" model="ir.ui.view">
<field name="name">stock.picking.in.search</field>
<field name="model">stock.picking</field>
<field name="model">stock.picking.in</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Picking to Invoice">
<group col="8" colspan="4">
<filter icon="terp-check" name="available" string="Available"
domain="[('state','=','assigned')]" help="Incoming Shipments Available"/>
<filter icon="terp-dialog-close" name="done" string="Done"
domain="[('state','=','done')]" help="Incoming Shipments already processed"/>
<filter icon="terp-dialog-close" name="done" string="Received"
domain="[('state','=','done')]" help="Incoming Shipments already Received"/>
<separator orientation="vertical"/>
<filter icon="terp-accessories-archiver-minus" string="Back Orders"
domain="[('backorder_id', '!=', False)]" help="Is a Back Order"/>
@ -89,7 +89,7 @@
<separator orientation="vertical"/>
<filter string="Order Date" icon="terp-go-month"
domain="[]" context="{'group_by':'date'}"/>
<filter string="Expected Date" icon="terp-go-month"
<filter string="Scheduled Date" icon="terp-go-month"
domain="[]" context="{'group_by':'min_date'}"/>
<separator orientation="vertical"/>
<filter string="Journal" icon="terp-folder-orange"

View File

@ -7,8 +7,8 @@
<field name="type">form</field>
<field name="inherit_id" ref="purchase.view_purchase_configuration"/>
<field name="arch" type="xml">
<field name="module_purchase_double_validation" position="replace">
<field name="limit_amount"/>
<field name="module_purchase_double_validation" position="after">
<field name="limit_amount" attrs="{'required': [('module_purchase_double_validation','=',True)]}"/>
</field>
</field>
</record>

View File

@ -175,8 +175,8 @@ class purchase_requisition_line(osv.osv):
_columns = {
'product_id': fields.many2one('product.product', 'Product' ),
'product_uom_id': fields.many2one('product.uom', 'Product UoM'),
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM')),
'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure'),
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),
'requisition_id' : fields.many2one('purchase.requisition','Purchase Requisition', ondelete='cascade'),
'company_id': fields.related('requisition_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
}

View File

@ -38,7 +38,7 @@ class sale_report(osv.osv):
('10', 'October'), ('11', 'November'), ('12', 'December')], 'Month', readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_uom': fields.many2one('product.uom', 'UoM', readonly=True),
'product_uom': fields.many2one('product.uom', 'Unit of Measure', readonly=True),
'product_uom_qty': fields.float('# of Qty', readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),

View File

@ -99,7 +99,7 @@
<filter string="Partner" icon="terp-partner" name="Customer" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id','set_visible':True}"/>
<filter string="Reference UoM" icon="terp-mrp" context="{'group_by':'product_uom'}"/>
<filter string="Reference Unit of Measure" icon="terp-mrp" context="{'group_by':'product_uom'}"/>
<filter string="Category of Product" icon="terp-stock_symbol-selection" name="Category" context="{'group_by':'categ_id'}"/>
<separator orientation="vertical" groups="analytic.group_analytic_accounting"/>
<filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'analytic_account_id'}" groups="analytic.group_analytic_accounting"/>

View File

@ -33,7 +33,7 @@ class sale_configuration(osv.osv_memory):
'group_invoice_deli_orders': fields.boolean('Based on Delivery Orders',
implied_group='sale.group_invoice_deli_orders',
help="To allow your salesman to make invoices for Delivery Orders using the menu 'Deliveries to Invoice'."),
'task_work': fields.boolean('Based on Tasks\' Work',
'task_work': fields.boolean('Based on Task Activities',
help="""Lets you transfer the entries under tasks defined for Project Management to
the Timesheet line entries for particular date and particular user with the effect of creating, editing and deleting either ways
and to automatically creates project tasks from procurement lines.
@ -42,13 +42,17 @@ class sale_configuration(osv.osv_memory):
help = """For modifying account analytic view to show important data to project manager of services companies.
You can also view the report of account analytic summary user-wise as well as month wise.
This installs the module account_analytic_analysis."""),
'module_account_analytic_analysis': fields.boolean('Manage Contracts',
help = """This installs the module account_analytic_analysis."""),
'module_account_analytic_analysis': fields.boolean('Manage Customer Contracts',
help = """Allows to define your customer contracts conditions: invoicing
method (fixed price, on timesheet, advance invoice), the exact pricing
(650/day for a developer), the duration (one year support contract).
You will be able to follow the progress of the contract and invoice automatically.
It installs the account_analytic_analysis module."""),
'default_order_policy': fields.selection(
[('manual', 'Invoice Based on Sales Orders'), ('picking', 'Invoice Based on Deliveries')],
'Main Method Based On', required=True, default_model='sale.order',
'Default Method', default_model='sale.order',
help="You can generate invoices based on sales orders or based on shippings."),
'module_delivery': fields.boolean('Charge Delivery Costs',
'module_delivery': fields.boolean('Charge Shipping Cost',
help ="""Allows you to add delivery methods in sale orders and delivery orders.
You can define your own carrier and delivery grids for prices.
This installs the module delivery."""),
@ -59,7 +63,7 @@ class sale_configuration(osv.osv_memory):
implied_group='product.group_sale_pricelist',
help="""Allows to manage different prices based on rules per category of customers.
Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
'group_uom':fields.boolean("Manage Different UoM for Products",
'group_uom':fields.boolean("Allow Different Units of Measure",
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 Different Addresses for Delivery and Invoice",
@ -68,13 +72,17 @@ class sale_configuration(osv.osv_memory):
'group_discount_per_so_line': fields.boolean("Discount per Line",
implied_group='sale.group_discount_per_so_line',
help="Allows you to apply some discount per sale order line."),
'group_multiple_shops': fields.boolean("Manage Multiple Shops",
implied_group='stock.group_locations',
help="This allows to configure and use multiple shops."),
'module_sale_layout': fields.boolean("Notes & Subtotals per Line",
help="""Allows to format sale order lines using notes, separators, titles and subtotals.
This installs the module sale_layout."""),
'module_warning': fields.boolean("Alerts by Products or Customers",
help="""To raise user specific warning messages on different products used in Sales Orders, Purchase Orders, Invoices and Deliveries.
This installs the module warning."""),
'module_sale_margin': fields.boolean("Display Margins for Users",
help="""Allow to configure warnings on products and trigger them when a user wants to sale a given product or a given customer.
Example: Product: this product is deprecated, do not purchase more than 5.
Supplier: don't forget to ask for an express delivery."""),
'module_sale_margin': fields.boolean("Display Margins on Sale Orders",
help="""This adds the 'Margin' on sales order.
This gives the profitability by calculating the difference between the Unit Price and Cost Price.
This installs the module sale_margin."""),
@ -82,7 +90,7 @@ class sale_configuration(osv.osv_memory):
help="""Allows you to categorize your sales and deliveries (picking lists) between different journals,
and perform batch operations on journals.
This installs the module sale_journal."""),
'module_analytic_user_function': fields.boolean("User Function by Contract",
'module_analytic_user_function': fields.boolean("Assign User Roles per Contract",
help="""Allows you to define what is the default function of a specific user on a given account.
This is mostly used when a user encodes his timesheet. The values are retrieved and the fields are auto-filled.
But the possibility to change these values is still available.
@ -93,6 +101,7 @@ class sale_configuration(osv.osv_memory):
'module_project_timesheet': fields.boolean("Project Timesheet"),
'module_project_mrp': fields.boolean("Project MRP"),
'module_project': fields.boolean("Project"),
'decimal_precision': fields.integer('Decimal Precision on Price'),
}
def default_get(self, cr, uid, fields, context=None):
@ -124,6 +133,15 @@ class sale_configuration(osv.osv_memory):
'time_unit': _get_default_time_unit,
}
def get_default_dp(self, cr, uid, fields, context=None):
dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_sale')
return {'decimal_precision': dp.digits}
def set_default_dp(self, cr, uid, ids, context=None):
config = self.browse(cr, uid, ids[0], context)
dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_sale')
dp.write({'digits': config.decimal_precision})
def set_sale_defaults(self, cr, uid, ids, context=None):
ir_values = self.pool.get('ir.values')
ir_model_data = self.pool.get('ir.model.data')
@ -166,6 +184,8 @@ class sale_configuration(osv.osv_memory):
class account_config_settings(osv.osv_memory):
_inherit = 'account.config.settings'
_columns = {
'module_sale_analytic_plans': fields.boolean('Several Analytic Accounts on Sales',
help="""This allows install module sale_analytic_plans."""),
'group_analytic_account_for_sales': fields.boolean('Analytic Accounting for Sales',
implied_group='sale.group_analytic_accounting',
help="Allows you to specify an analytic account on sale orders."),

View File

@ -9,17 +9,16 @@
<field name="inherit_id" ref="base.view_sale_config_settings"/>
<field name="arch" type="xml">
<group name="config_sale" position="after">
<separator string="Picking and Invoice Policy" colspan="4"/>
<separator string="Invoicing Policy" colspan="4"/>
<field name="module_project_timesheet" invisible="1"/>
<field name="module_project_mrp" invisible="1"/>
<field name="group_invoice_so_lines" on_change="onchange_invoice_methods(group_invoice_so_lines, group_invoice_deli_orders)"/>
<field name="default_order_policy" attrs="{'invisible':['|',('group_invoice_so_lines','=',False),('group_invoice_deli_orders','=',False)]}"/>
<field name="default_order_policy" attrs="{'invisible':['|',('group_invoice_so_lines','=',False),('group_invoice_deli_orders','=',False)],'required': ['|',('group_invoice_so_lines','=',True),('group_invoice_deli_orders','=',True)]}"/>
<newline/>
<field name="group_invoice_deli_orders" on_change="onchange_invoice_methods(group_invoice_so_lines, group_invoice_deli_orders)"/>
<field name="module_delivery" attrs="{'invisible':[('group_invoice_so_lines','=',False), ('group_invoice_deli_orders','=',False)]}"/>
<newline/>
<field name="task_work" on_change="onchange_task_work(task_work)"/>
<field name="module_project_timesheet" invisible="1"/>
<field name="module_project_mrp" invisible="1"/>
<field name="default_picking_policy" attrs="{'invisible':[('group_invoice_deli_orders','=',False)]}"/>
<newline/>
<field name="timesheet" on_change="onchange_timesheet(timesheet)"/>
<field name="time_unit" domain="[('category_id.name','=','Working Time')]"
@ -34,25 +33,34 @@
<field name="module_sale_layout"/>
<field name="module_warning"/>
<field name="module_sale_journal"/>
<field name="group_multiple_shops"/>
<field name="decimal_precision"/>
<field name="default_picking_policy" attrs="{'invisible':[('group_invoice_deli_orders','=',False)]}"/>
<separator string="Contracts" colspan="4"/>
<field name="module_account_analytic_analysis" on_change="onchange_timesheet(module_account_analytic_analysis)"/>
<field name="module_analytic_user_function"/>
<field name="module_analytic_journal_billing_rate"/>
<field name="module_analytic_user_function" attrs="{'invisible':[('module_account_analytic_analysis','=',False)]}"/>
<field name="module_analytic_journal_billing_rate" attrs="{'invisible':[('module_account_analytic_analysis','=',False)]}"/>
</group>
</field>
</record>
<menuitem id="base.menu_sale_config" name="Sales" parent="base.menu_config" sequence="1" action="base.action_sale_config"/>
<menuitem id="base.menu_sale_config" name="Sales" parent="base.menu_config"
sequence="1" action="base.action_sale_config"/>
<record id="view_account_config" model="ir.ui.view">
<field name="name">account settings</field>
<field name="model">account.config.settings</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.view_account_config_settings"/>
<field name="priority" eval="16"/>
<field name="arch" type="xml">
<group name="analytic_accounting" position="after">
<group name="analytic_accounting" position="attributes">
<attribute name="invisible">0</attribute>
</group>
<group name="analytic_accounting" position="inside">
<field name="group_analytic_account_for_sales"/>
<field name="module_sale_analytic_plans"/>
</group>
</field>
</record>

View File

@ -238,7 +238,7 @@ class sale_order(osv.osv):
'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft': [('readonly', False)]}),
'invoice_ids': fields.many2many('account.invoice', 'sale_order_invoice_rel', 'order_id', 'invoice_id', 'Invoices', readonly=True, help="This is the list of invoices that have been generated for this sales order. The same sales order may have been invoiced in several times (by line for example)."),
'picking_ids': fields.one2many('stock.picking', 'sale_id', 'Related Picking', readonly=True, help="This is a list of picking that has been generated for this sales order."),
'picking_ids': fields.one2many('stock.picking.out', 'sale_id', 'Related Picking', readonly=True, help="This is a list of delivery orders that has been generated for this sales order."),
'shipped': fields.boolean('Delivered', readonly=True, help="It indicates that the sales order has been delivered. This field is updated only after the scheduler(s) have been launched."),
'picked_rate': fields.function(_picked_rate, string='Picked', type='float'),
'invoiced_rate': fields.function(_invoiced_rate, string='Invoiced', type='float'),
@ -1015,7 +1015,7 @@ class sale_order_line(osv.osv):
help="If 'on order', it triggers a procurement when the sale order is confirmed to create a task, purchase order or manufacturing order linked to this sale order line."),
'property_ids': fields.many2many('mrp.property', 'sale_order_line_property_rel', 'order_id', 'property_id', 'Properties', readonly=True, states={'draft': [('readonly', False)]}),
'address_allotment_id': fields.many2one('res.partner', 'Allotment Partner'),
'product_uom_qty': fields.float('Quantity (UoM)', digits_compute= dp.get_precision('Product UoS'), required=True, readonly=True, states={'draft': [('readonly', False)]}),
'product_uom_qty': fields.float('Quantity (Unit of Measure)', digits_compute= dp.get_precision('Product UoS'), required=True, readonly=True, states={'draft': [('readonly', False)]}),
'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'product_uos_qty': fields.float('Quantity (UoS)' ,digits_compute= dp.get_precision('Product UoS'), readonly=True, states={'draft': [('readonly', False)]}),
'product_uos': fields.many2one('product.uom', 'Product UoS'),

View File

@ -42,7 +42,8 @@
<field name="help">If you have more than one shop reselling your company products, you can create and manage that from here. Whenever you will record a new quotation or sales order, it has to be linked to a shop. The shop also defines the warehouse from which the products will be delivered for each particular sales.</field>
</record>
<menuitem action="action_shop_form" id="menu_action_shop_form" parent="base.menu_base_config" sequence="35"/>
<menuitem action="action_shop_form" id="menu_action_shop_form" parent="base.menu_base_config" sequence="35"
groups="stock.group_locations"/>
<record id="view_sale_order_calendar" model="ir.ui.view">
<field name="name">sale.order.calendar</field>
@ -195,8 +196,8 @@
</form>
<tree string="Sales Order Lines">
<field colspan="4" name="name"/>
<field name="product_uom_qty" string="Qty(UoM)"/>
<field name="product_uom" string="UoM" groups="product.group_uom"/>
<field name="product_uom_qty" string="Qty(Unit of Measure)"/>
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
<field groups="product.group_uos" name="product_uos_qty" string="Qty(UoS)"/>
<field groups="product.group_uos" name="product_uos" string="UoS"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
@ -242,8 +243,21 @@
<page string="History">
<separator colspan="4" string="Invoices"/>
<field colspan="4" name="invoice_ids" nolabel="1" context="{'form_view_ref':'account.invoice_form'}"/>
<separator colspan="4" string="Packings"/>
<field colspan="4" name="picking_ids" nolabel="1"/>
<separator colspan="4" string="Delivery Orders"/>
<field colspan="4" name="picking_ids" nolabel="1" context="{'default_type': 'out'}">
<tree colors="blue:state == 'draft';grey:state == 'cancel';red:state not in ('cancel', 'done') and min_date &lt; current_date" string="Delivery Orders">
<field name="name"/>
<field name="partner_id"/>
<field name="origin"/>
<field name="date"/>
<field name="min_date"/>
<field name="backorder_id"/>
<field name="invoice_state"/>
<field name="stock_journal_id" widget="selection"/>
<field name="state"/>
<button name="action_process" states="assigned" string="Deliver" type="object" icon="gtk-go-forward" context="{'default_type': 'out'}"/>
</tree>
</field>
</page>
</notebook>
</sheet>
@ -365,7 +379,7 @@
<field name="order_partner_id"/>
<field name="product_id"/>
<field name="product_uom_qty" string="Qty"/>
<field name="product_uom" string="UoM" groups="product.group_uom"/>
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
<field name="salesman_id"/>
<field name="price_subtotal" sum="Total" groups="base.group_sale_notes_subtotal"/>
<field name="state"/>

View File

@ -186,4 +186,13 @@ class stock_picking(osv.osv):
})
return result
# Redefinition of the new field in order to update the model stock.picking.out in the orm
# FIXME: this is a temporary workaround because of a framework bug (ref: lp996816). It should be removed as soon as
# the bug is fixed
class stock_picking_out(osv.osv):
_inherit = 'stock.picking.out'
_columns = {
'sale_id': fields.many2one('sale.order', 'Sale Order',
ondelete='set null', select=True),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

Some files were not shown because too many files have changed in this diff Show More