[MERGE] trunk-settings-configuration-improvements
bzr revid: rco@openerp.com-20120509142450-re27whun2f0bvvj5
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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')),
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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,
|
||||
@@ -74,22 +74,22 @@ class account_config_settings(osv.osv_memory):
|
||||
'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'),
|
||||
|
||||
'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:
|
||||
|
||||
@@ -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" colspan="1"/>
|
||||
<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="Refund Sequence" colspan="1"/>
|
||||
<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" colspan="1"/>
|
||||
<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 Refund Sequence" colspan="1"/>
|
||||
<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,9 @@
|
||||
<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 colspan="4" col="4">
|
||||
<separator string="Analytic Accounting" colspan="4"/>
|
||||
<group name="analytic_accounting" colspan="4"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -105,14 +105,14 @@ class sale_config_settings(osv.osv_memory):
|
||||
_inherit = 'res.config.settings'
|
||||
_columns = {
|
||||
'module_crm': fields.boolean('CRM'),
|
||||
'module_plugin_thunderbird': fields.boolean('Thunderbird plugin',
|
||||
'module_plugin_thunderbird': fields.boolean('Thunderbird Plugin',
|
||||
help="""The plugin allows you archive email and its attachments to the selected
|
||||
OpenERP objects. You can select a partner, a task, a project, an analytical
|
||||
account, or any other object and attach the selected mail as a .eml file in
|
||||
the attachment of a selected record. You can create documents for CRM Lead,
|
||||
HR Applicant and Project Issue from the selected emails.
|
||||
This installs the module plugin_thunderbird."""),
|
||||
'module_plugin_outlook': fields.boolean('Outlook plugin',
|
||||
'module_plugin_outlook': fields.boolean('Outlook Plugin',
|
||||
help="""The Outlook plugin allows you to select an object that you would like to add
|
||||
to your email and its attachments from MS Outlook. You can select a partner, a task,
|
||||
a project, an analytical account, or any other object and archive a selected
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">inline</field>
|
||||
</record>
|
||||
<menuitem id="menu_general_configuration" name="Settings" parent="base.menu_config"
|
||||
<menuitem id="menu_general_configuration" parent="base.menu_config"
|
||||
sequence="100" action="action_general_configuration"/>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -38,10 +38,10 @@ class crm_configuration(osv.osv_memory):
|
||||
'module_import_google': fields.boolean("Google Import",
|
||||
help="""Import google contact in partner address and add google calendar events details in Meeting.
|
||||
This installs the module import_google."""),
|
||||
'module_wiki_sale_faq': fields.boolean("Install a sales FAQ",
|
||||
'module_wiki_sale_faq': fields.boolean("Install a Sales FAQ",
|
||||
help="""This provides demo data, thereby creating a Wiki Group and a Wiki Page for Wiki Sale FAQ.
|
||||
This installs the module wiki_sale_faq."""),
|
||||
'module_google_map': fields.boolean("Google maps on customer",
|
||||
'module_google_map': fields.boolean("Google Maps on Customer",
|
||||
help="""Locate customers on Google Map.
|
||||
This installs the module google_map."""),
|
||||
}
|
||||
|
||||
+10
-6
@@ -26,17 +26,21 @@ 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."""),
|
||||
}
|
||||
|
||||
|
||||
@@ -19,22 +19,18 @@
|
||||
<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"/>
|
||||
|
||||
<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>
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<!-- Casual leave -->
|
||||
<record model="hr.holidays.status" id="holiday_status_cl">
|
||||
<field name="name">Legal Leaves</field>
|
||||
<field eval="'Legal Leaves '+time.strftime('%Y')" name="name"/>
|
||||
<field name="color_name">black</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -26,7 +26,7 @@ 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 Incoming Mails', readonly=True,
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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')),
|
||||
|
||||
@@ -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."""),
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -25,9 +25,9 @@ class knowledge_config_settings(osv.osv_memory):
|
||||
_name = 'knowledge.config.settings'
|
||||
_inherit = 'res.config.settings'
|
||||
_columns = {
|
||||
'module_wiki_faq': fields.boolean('Use a Wiki for Frequently Asked Questions',
|
||||
'module_wiki_faq': fields.boolean('Internal FAQ as a Wiki',
|
||||
help="""This installs the module wiki_faq."""),
|
||||
'module_wiki_quality_manual': fields.boolean('Track Quality with a Wiki',
|
||||
'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,
|
||||
|
||||
+6
-6
@@ -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),
|
||||
|
||||
@@ -433,7 +433,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'}" />
|
||||
@@ -664,7 +664,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"
|
||||
@@ -673,7 +673,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"
|
||||
@@ -688,7 +688,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"/>
|
||||
@@ -717,7 +717,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"
|
||||
@@ -735,13 +735,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" />
|
||||
|
||||
@@ -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')
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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\
|
||||
|
||||
@@ -91,8 +91,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'),
|
||||
@@ -510,7 +510,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."),
|
||||
|
||||
@@ -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>
|
||||
@@ -165,7 +165,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"/>
|
||||
@@ -183,7 +183,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>
|
||||
@@ -211,7 +211,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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
+19
-19
@@ -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()
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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"/>
|
||||
@@ -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">
|
||||
@@ -439,7 +439,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>
|
||||
@@ -452,14 +452,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>
|
||||
@@ -670,13 +670,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"/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -165,7 +165,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),
|
||||
|
||||
@@ -239,10 +239,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">
|
||||
@@ -251,18 +251,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"/>
|
||||
@@ -332,7 +333,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">
|
||||
@@ -422,9 +423,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)"
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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)]},
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -716,10 +716,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'),
|
||||
@@ -825,7 +825,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})
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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'}"/>
|
||||
|
||||
@@ -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 negociate with several suppliers."""),
|
||||
'decimal_precision': fields.integer('Decimal Precision on Purchase 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."),
|
||||
|
||||
@@ -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"/>
|
||||
@@ -49,6 +50,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<group name="analytic_accounting" position="after">
|
||||
<field name="group_analytic_account_for_purchases"/>
|
||||
<field name="module_purchase_analytic_plans"/>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
+30
-10
@@ -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('Tasks\' activity',
|
||||
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 Sales 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."),
|
||||
|
||||
@@ -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="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,11 +33,14 @@
|
||||
<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>
|
||||
@@ -54,6 +56,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<group name="analytic_accounting" position="after">
|
||||
<field name="group_analytic_account_for_sales"/>
|
||||
<field name="module_sale_analytic_plans"/>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
+1
-1
@@ -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'),
|
||||
|
||||
@@ -46,7 +46,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>
|
||||
@@ -199,8 +200,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"/>
|
||||
@@ -369,7 +370,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"/>
|
||||
|
||||
@@ -120,8 +120,8 @@ class sale_order_line(osv.osv):
|
||||
,'Line Type', select=True, required=True),
|
||||
'sequence': fields.integer('Line Sequence', select=True),
|
||||
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price'), readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'product_uom_qty': fields.float('Quantity (UoM)', digits=(16,2)),
|
||||
'product_uom': fields.many2one('product.uom', 'Product UoM'),
|
||||
'product_uom_qty': fields.float('Quantity (Unit of Measure)', digits=(16,2)),
|
||||
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure'),
|
||||
# Override the field to call the overridden _amount_line function
|
||||
'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal', digits_compute= dp.get_precision('Sale Price')),
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<tree string="Sales order lines">
|
||||
<field colspan="4" name="name"/>
|
||||
<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="discount"/>
|
||||
<field name="price_unit"/>
|
||||
<!-- field name="price_net"/-->
|
||||
|
||||
@@ -332,7 +332,7 @@ class product_product(osv.osv):
|
||||
|
||||
_columns = {
|
||||
'qty_available': fields.function(_product_available, multi='qty_available',
|
||||
type='float', digits_compute=dp.get_precision('Product UoM'),
|
||||
type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
|
||||
string='Quantity On Hand',
|
||||
help="Current quantity of products.\n"
|
||||
"In a context with a single Stock Location, this includes "
|
||||
@@ -346,7 +346,7 @@ class product_product(osv.osv):
|
||||
"Otherwise, this includes goods stored in any Stock Location "
|
||||
"typed as 'internal'."),
|
||||
'virtual_available': fields.function(_product_available, multi='qty_available',
|
||||
type='float', digits_compute=dp.get_precision('Product UoM'),
|
||||
type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
|
||||
string='Quantity Available',
|
||||
help="Forecast quantity (computed as Quantity On Hand "
|
||||
"- Outgoing + Incoming)\n"
|
||||
@@ -361,7 +361,7 @@ class product_product(osv.osv):
|
||||
"Otherwise, this includes goods stored in any Stock Location "
|
||||
"typed as 'internal'."),
|
||||
'incoming_qty': fields.function(_product_available, multi='qty_available',
|
||||
type='float', digits_compute=dp.get_precision('Product UoM'),
|
||||
type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
|
||||
string='Incoming',
|
||||
help="Quantity of products that are planned to arrive.\n"
|
||||
"In a context with a single Stock Location, this includes "
|
||||
@@ -375,7 +375,7 @@ class product_product(osv.osv):
|
||||
"Otherwise, this includes goods arriving to any Stock "
|
||||
"Location typed as 'internal'."),
|
||||
'outgoing_qty': fields.function(_product_available, multi='qty_available',
|
||||
type='float', digits_compute=dp.get_precision('Product UoM'),
|
||||
type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
|
||||
string='Outgoing',
|
||||
help="Quantity of products that are planned to leave.\n"
|
||||
"In a context with a single Stock Location, this includes "
|
||||
@@ -388,9 +388,9 @@ class product_product(osv.osv):
|
||||
"Shop, or any of its children.\n"
|
||||
"Otherwise, this includes goods leaving from any Stock "
|
||||
"Location typed as 'internal'."),
|
||||
'track_production': fields.boolean('Track Manufacturing Lots', help="Forces to specify a Production Lot for all moves containing this product and generated by a Manufacturing Order"),
|
||||
'track_incoming': fields.boolean('Track Incoming Lots', help="Forces to specify a Production Lot for all moves containing this product and coming from a Supplier Location"),
|
||||
'track_outgoing': fields.boolean('Track Outgoing Lots', help="Forces to specify a Production Lot for all moves containing this product and going to a Customer Location"),
|
||||
'track_production': fields.boolean('Track Manufacturing Lots', help="Forces to specify a Serial Number for all moves containing this product and generated by a Manufacturing Order"),
|
||||
'track_incoming': fields.boolean('Track Incoming Lots', help="Forces to specify a Serial Number for all moves containing this product and coming from a Supplier Location"),
|
||||
'track_outgoing': fields.boolean('Track Outgoing Lots', help="Forces to specify a Serial Number for all moves containing this product and going to a Customer Location"),
|
||||
'location_id': fields.dummy(string='Location', relation='stock.location', type='many2one'),
|
||||
'warehouse_id': fields.dummy(string='Warehouse', relation='stock.warehouse', type='many2one'),
|
||||
'valuation':fields.selection([('manual_periodic', 'Periodical (manual)'),
|
||||
|
||||
@@ -26,13 +26,13 @@ from tools.sql import drop_view_if_exists
|
||||
|
||||
class stock_report_prodlots(osv.osv):
|
||||
_name = "stock.report.prodlots"
|
||||
_description = "Stock report by production lots"
|
||||
_description = "Stock report by serial number"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'qty': fields.float('Quantity', readonly=True),
|
||||
'location_id': fields.many2one('stock.location', 'Location', readonly=True, select=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', readonly=True, select=True),
|
||||
'prodlot_id': fields.many2one('stock.production.lot', 'Production lot', readonly=True, select=True),
|
||||
'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', readonly=True, select=True),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
@@ -82,13 +82,13 @@ stock_report_prodlots()
|
||||
|
||||
class stock_report_tracklots(osv.osv):
|
||||
_name = "stock.report.tracklots"
|
||||
_description = "Stock report by tracking lots"
|
||||
_description = "Stock report by logistic serial number"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'name': fields.float('Quantity', readonly=True),
|
||||
'location_id': fields.many2one('stock.location', 'Location', readonly=True, select=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', readonly=True, select=True),
|
||||
'tracking_id': fields.many2one('stock.tracking', 'Tracking lot', readonly=True, select=True),
|
||||
'tracking_id': fields.many2one('stock.tracking', 'Logistic Serial Number', readonly=True, select=True),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
|
||||
@@ -160,7 +160,7 @@ class report_stock_inventory(osv.osv):
|
||||
'location_id': fields.many2one('stock.location', 'Location', readonly=True),
|
||||
'prodlot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
'product_qty':fields.float('Quantity', digits_compute=dp.get_precision('Product UoM'), readonly=True),
|
||||
'product_qty':fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), readonly=True),
|
||||
'value' : fields.float('Total Value', digits_compute=dp.get_precision('Account'), required=True),
|
||||
'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True,
|
||||
help='When the stock move is created it is in the \'Draft\' state.\n After that it is set to \'Confirmed\' state.\n If stock is available state is set to \'Avaiable\'.\n When the picking it done the state is \'Done\'.\
|
||||
|
||||
+21
-14
@@ -26,21 +26,15 @@ class stock_config_settings(osv.osv_memory):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
_columns = {
|
||||
'module_stock_no_autopicking': fields.boolean("Force Picking before Manufactoring 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."""),
|
||||
'module_claim_from_delivery': fields.boolean("Track Claims from Delivery",
|
||||
'module_claim_from_delivery': fields.boolean("Allow Claims on Delivery Orders",
|
||||
help="""Adds a Claim link to the delivery order.
|
||||
This installs the module claim_from_delivery."""),
|
||||
'module_stock_invoice_directly': fields.boolean("Invoice Picking on Delivery",
|
||||
'module_stock_invoice_directly': fields.boolean("Invoice Directly from the Picking",
|
||||
help="""This allows to automatically launch the invoicing wizard if the delivery is
|
||||
to be invoiced when you send or deliver goods.
|
||||
This installs the module stock_invoice_directly."""),
|
||||
'module_product_expiry': fields.boolean("Expiry Date on Lots",
|
||||
help="""Track different dates on products and production lots.
|
||||
help="""Track different dates on products and serial numbers.
|
||||
The following dates can be tracked:
|
||||
- end of life
|
||||
- best before date
|
||||
@@ -52,10 +46,10 @@ class stock_config_settings(osv.osv_memory):
|
||||
manage product manufacturing chains, manage default locations per product,
|
||||
define routes within your warehouse according to business needs, etc.
|
||||
This installs the module stock_location."""),
|
||||
'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."""),
|
||||
'group_uos': fields.boolean("Manage Secondary UoM (for Sale)",
|
||||
'group_uos': fields.boolean("Manage Secondary Unit of Measure (for Sale)",
|
||||
implied_group='product.group_uos',
|
||||
help="""Allows you to sell units of a product, but invoice based on a different unit of measure.
|
||||
For instance, you can sell pieces of meat that you invoice based on their weight."""),
|
||||
@@ -66,16 +60,29 @@ class stock_config_settings(osv.osv_memory):
|
||||
implied_group='stock.group_production_lot',
|
||||
help="""This allows you to manage products by using serial numbers.
|
||||
When you select a lot, you can get the upstream or downstream traceability of the products contained in lot."""),
|
||||
'group_stock_tracking_lot': fields.boolean("Serial Numbers on Pallets (Logistic Units)",
|
||||
'group_stock_tracking_lot': fields.boolean("Serial Numbers on Logistic Units (Pallets)",
|
||||
implied_group='stock.group_tracking_lot',
|
||||
help="""Allows you to get the upstream or downstream traceability of the products contained in lot."""),
|
||||
'group_stock_inventory_valuation': fields.boolean("Accounting Entries per Stock Movement",
|
||||
'group_stock_inventory_valuation': fields.boolean("Generate Accounting Entries per Stock Movement",
|
||||
implied_group='stock.group_inventory_valuation',
|
||||
help="""This allows to split stock inventory lines according to production lots."""),
|
||||
help="""This allows to split stock inventory lines according to serial numbers."""),
|
||||
'group_stock_multiple_locations': fields.boolean("Manage Multiple Locations and Warehouses",
|
||||
implied_group='stock.group_locations',
|
||||
help="""This allows to configure and use multiple stock locations and warehouses,
|
||||
instead of having a single default one."""),
|
||||
'group_product_variant': fields.boolean("Product Variant",
|
||||
implied_group='product.group_product_variant',
|
||||
help="""This allows to configure and use Product Variant."""),
|
||||
'decimal_precision': fields.integer('Decimal Precision on Stock Weight'),
|
||||
}
|
||||
|
||||
def get_default_dp(self, cr, uid, fields, context=None):
|
||||
dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_stock_weight')
|
||||
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_stock_weight')
|
||||
dp.write({'digits': config.decimal_precision})
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -16,21 +16,22 @@
|
||||
<separator string="Traceability" colspan="4"/>
|
||||
<field name="group_stock_production_lot"/>
|
||||
<field name="module_product_expiry"
|
||||
attrs="{'invisible': [('group_stock_production_lot','=',False), ('group_stock_tracking_lot','=',False)]}"/>
|
||||
attrs="{'invisible': [('group_stock_production_lot','=',False)]}"/>
|
||||
<newline/>
|
||||
<field name="group_stock_tracking_lot"/>
|
||||
|
||||
<separator string="Logistics" colspan="4"/>
|
||||
<field name="group_stock_multiple_locations"/>
|
||||
<field name="module_stock_no_autopicking"/>
|
||||
<field name="module_stock_location"/>
|
||||
<field name="module_stock_invoice_directly"/>
|
||||
<field name="decimal_precision"/>
|
||||
|
||||
<separator string="Products" colspan="4"/>
|
||||
<field name="group_stock_packaging"/>
|
||||
<field name="group_stock_inventory_valuation"/>
|
||||
<field name="group_uom"/>
|
||||
<field name="group_uos"/>
|
||||
<field name="group_product_variant"/>
|
||||
|
||||
<separator string="Partners" colspan="4"/>
|
||||
<field name="module_claim_from_delivery"/>
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
</record>
|
||||
|
||||
<record id="group_production_lot" model="res.groups">
|
||||
<field name="name">Manage Production Lots</field>
|
||||
<field name="name">Manage Serial Numbers</field>
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
|
||||
<record id="group_tracking_lot" model="res.groups">
|
||||
<field name="name">Manage Tracking lots</field>
|
||||
<field name="name">Manage Logistic Serial Numbers</field>
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
|
||||
|
||||
+15
-15
@@ -1430,7 +1430,7 @@ class stock_production_lot(osv.osv):
|
||||
return self.name_get(cr, uid, ids, context)
|
||||
|
||||
_name = 'stock.production.lot'
|
||||
_description = 'Production lot'
|
||||
_description = 'Serial Number'
|
||||
|
||||
def _get_stock(self, cr, uid, ids, field_name, arg, context=None):
|
||||
""" Gets stock of products for locations
|
||||
@@ -1477,17 +1477,17 @@ class stock_production_lot(osv.osv):
|
||||
return ids
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Production Lot', size=64, required=True, help="Unique production lot, will be displayed as: PREFIX/SERIAL [INT_REF]"),
|
||||
'name': fields.char('Serial Number', size=64, required=True, help="Unique Serial Number, will be displayed as: PREFIX/SERIAL [INT_REF]"),
|
||||
'ref': fields.char('Internal Reference', size=256, help="Internal reference number in case it differs from the manufacturer's serial number"),
|
||||
'prefix': fields.char('Prefix', size=64, help="Optional prefix to prepend when displaying this serial number: PREFIX/SERIAL [INT_REF]"),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, domain=[('type', '<>', 'service')]),
|
||||
'date': fields.datetime('Creation Date', required=True),
|
||||
'stock_available': fields.function(_get_stock, fnct_search=_stock_search, type="float", string="Available", select=True,
|
||||
help="Current quantity of products with this Production Lot Number available in company warehouses",
|
||||
digits_compute=dp.get_precision('Product UoM')),
|
||||
digits_compute=dp.get_precision('Product Unit of Measure')),
|
||||
'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'),
|
||||
'company_id': fields.many2one('res.company', 'Company', select=True),
|
||||
'move_ids': fields.one2many('stock.move', 'prodlot_id', 'Moves for this production lot', readonly=True),
|
||||
'move_ids': fields.one2many('stock.move', 'prodlot_id', 'Moves for this serial number', readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
@@ -1512,7 +1512,7 @@ stock_production_lot()
|
||||
|
||||
class stock_production_lot_revision(osv.osv):
|
||||
_name = 'stock.production.lot.revision'
|
||||
_description = 'Production lot revisions'
|
||||
_description = 'Serial Number Revision'
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Revision Name', size=64, required=True),
|
||||
@@ -1520,7 +1520,7 @@ class stock_production_lot_revision(osv.osv):
|
||||
'date': fields.date('Revision Date'),
|
||||
'indice': fields.char('Revision Number', size=16),
|
||||
'author_id': fields.many2one('res.users', 'Author'),
|
||||
'lot_id': fields.many2one('stock.production.lot', 'Production lot', select=True, ondelete='cascade'),
|
||||
'lot_id': fields.many2one('stock.production.lot', 'Serial Number', select=True, ondelete='cascade'),
|
||||
'company_id': fields.related('lot_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
|
||||
}
|
||||
|
||||
@@ -1578,7 +1578,7 @@ class stock_move(osv.osv):
|
||||
return res
|
||||
|
||||
def _check_tracking(self, cr, uid, ids, context=None):
|
||||
""" Checks if production lot is assigned to stock move or not.
|
||||
""" Checks if serial number is assigned to stock move or not.
|
||||
@return: True or False
|
||||
"""
|
||||
for move in self.browse(cr, uid, ids, context=context):
|
||||
@@ -1610,9 +1610,9 @@ class stock_move(osv.osv):
|
||||
'date_expected': fields.datetime('Scheduled Date', states={'done': [('readonly', True)]},required=True, select=True, help="Scheduled date for the processing of this move"),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('type','<>','service')],states={'done': [('readonly', True)]}),
|
||||
|
||||
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM'), required=True,states={'done': [('readonly', True)]}),
|
||||
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True,states={'done': [('readonly', True)]}),
|
||||
'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True,states={'done': [('readonly', True)]}),
|
||||
'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Product UoM'), states={'done': [('readonly', True)]}),
|
||||
'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Product Unit of Measure'), states={'done': [('readonly', True)]}),
|
||||
'product_uos': fields.many2one('product.uom', 'Product UOS', states={'done': [('readonly', True)]}),
|
||||
'product_packaging': fields.many2one('product.packaging', 'Packaging', help="It specifies attributes of packaging like type, quantity of packaging,etc."),
|
||||
|
||||
@@ -1620,7 +1620,7 @@ class stock_move(osv.osv):
|
||||
'location_dest_id': fields.many2one('stock.location', 'Destination Location', required=True,states={'done': [('readonly', True)]}, select=True, help="Location where the system will stock the finished products."),
|
||||
'partner_id': fields.many2one('res.partner', 'Destination Address ', states={'done': [('readonly', True)]}, help="Optional address where goods are to be delivered, specifically used for allotment"),
|
||||
|
||||
'prodlot_id': fields.many2one('stock.production.lot', 'Production Lot', states={'done': [('readonly', True)]}, help="Production lot is used to put a serial number on the production", select=True),
|
||||
'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', states={'done': [('readonly', True)]}, help="Serial number is used to put a serial number on the production", select=True),
|
||||
'tracking_id': fields.many2one('stock.tracking', 'Pack', select=True, states={'done': [('readonly', True)]}, help="Logistical shipping unit: pallet, box, pack ..."),
|
||||
|
||||
'auto_validate': fields.boolean('Auto Validate'),
|
||||
@@ -1650,7 +1650,7 @@ class stock_move(osv.osv):
|
||||
|
||||
_constraints = [
|
||||
(_check_tracking,
|
||||
'You must assign a production lot for this product',
|
||||
'You must assign a serial number for this product',
|
||||
['prodlot_id']),
|
||||
(_check_location, 'You can not move products from or to a location of the type view.',
|
||||
['location_id','location_dest_id']),
|
||||
@@ -1737,7 +1737,7 @@ class stock_move(osv.osv):
|
||||
if move.state == 'done':
|
||||
if frozen_fields.intersection(vals):
|
||||
raise osv.except_osv(_('Operation forbidden'),
|
||||
_('Quantities, UoMs, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator)'))
|
||||
_('Quantities, Unit of Measures, Products and Locations cannot be modified on stock moves that have already been processed (except by the Administrator)'))
|
||||
return super(stock_move, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
@@ -2778,10 +2778,10 @@ class stock_inventory_line(osv.osv):
|
||||
'inventory_id': fields.many2one('stock.inventory', 'Inventory', ondelete='cascade', select=True),
|
||||
'location_id': fields.many2one('stock.location', 'Location', required=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
|
||||
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True),
|
||||
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM')),
|
||||
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
|
||||
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),
|
||||
'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True, select=True, readonly=True),
|
||||
'prod_lot_id': fields.many2one('stock.production.lot', 'Production Lot', domain="[('product_id','=',product_id)]"),
|
||||
'prod_lot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
|
||||
'state': fields.related('inventory_id','state',type='char',string='State',readonly=True),
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
Request link
|
||||
-->
|
||||
<record id="req_link_tracking" model="res.request.link">
|
||||
<field name="name">Production Lot</field>
|
||||
<field name="name">Serial Number</field>
|
||||
<field name="object">stock.production.lot</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -52,11 +52,11 @@
|
||||
Sequences from tracking numbers
|
||||
-->
|
||||
<record id="sequence_type_serial" model="ir.sequence.type">
|
||||
<field name="name">Production Lots</field>
|
||||
<field name="name">Serial Numbers</field>
|
||||
<field name="code">stock.lot.serial</field>
|
||||
</record>
|
||||
<record id="sequence_production_lots" model="ir.sequence">
|
||||
<field name="name">Production Lots</field>
|
||||
<field name="name">Serial Numbers</field>
|
||||
<field name="code">stock.lot.serial</field>
|
||||
<field name="prefix"></field>
|
||||
<field name="padding">7</field>
|
||||
|
||||
+48
-48
@@ -29,10 +29,10 @@
|
||||
parent="stock.menu_product_in_config_stock" sequence="35" groups="product.group_uom"/>
|
||||
<menuitem
|
||||
action="product.product_uom_categ_form_action" id="menu_stock_uom_categ_form_action"
|
||||
parent="menu_stock_configuration" sequence="30"/>
|
||||
parent="menu_stock_configuration" sequence="30" groups="stock.group_locations"/>
|
||||
<menuitem
|
||||
action="product.product_uom_form_action" id="menu_stock_uom_form_action"
|
||||
parent="menu_stock_configuration" sequence="35"/>
|
||||
parent="menu_stock_configuration" sequence="35" groups="stock.group_locations"/>
|
||||
|
||||
<record id="stock_inventory_line_tree" model="ir.ui.view">
|
||||
<field name="name">stock.inventory.line.tree</field>
|
||||
@@ -47,7 +47,7 @@
|
||||
<button name="%(stock.action_view_stock_inventory_line_split)d"
|
||||
string="Split inventory lines" groups="stock.group_inventory_valuation"
|
||||
type="action" icon="gtk-justify-fill"/>
|
||||
<field name="location_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -145,9 +145,9 @@
|
||||
<tree string="Stock Moves">
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
|
||||
<field name="product_uom" string="UoM" groups="product.group_uom"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="prodlot_id" groups="stock.group_production_lot"/>
|
||||
<button name="%(track_line)d" string="Split in production lots" type="action"
|
||||
<button name="%(track_line)d" string="Split in serial numbers" type="action"
|
||||
icon="terp-stock_effects-object-colorize"
|
||||
attrs="{'invisible': [('prodlot_id','<>',False)]}"
|
||||
states="draft,done,cancel"
|
||||
@@ -159,8 +159,8 @@
|
||||
icon="terp-stock_effects-object-colorize"
|
||||
context="{'inventory_id':parent.id}"
|
||||
states="draft,done,cancel"/>
|
||||
<field name="location_id"/>
|
||||
<field name="location_dest_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="date" string="Date"/>
|
||||
<field name="state" invisible="True"/>
|
||||
</tree>
|
||||
@@ -289,7 +289,7 @@
|
||||
<field name="model">stock.production.lot.revision</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Production Lot Revisions">
|
||||
<form string="Serial Number Revisions">
|
||||
<field colspan="4" name="name"/>
|
||||
<field colspan="2" name="indice"/>
|
||||
<field colspan="2" name="date"/>
|
||||
@@ -306,7 +306,7 @@
|
||||
<field name="model">stock.production.lot.revision</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Production Lot Revisions">
|
||||
<tree string="Serial Number Revisions">
|
||||
<field name="indice"/>
|
||||
<field name="author_id"/>
|
||||
<field name="date"/>
|
||||
@@ -319,9 +319,9 @@
|
||||
<field name="model">stock.production.lot</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Production Lot">
|
||||
<form string="Serial Number">
|
||||
<group col="4" colspan="2">
|
||||
<separator string="Production Lot Identification" colspan="4"/>
|
||||
<separator string="Serial Number Identification" colspan="4"/>
|
||||
<field name="product_id" colspan="4"/>
|
||||
<field name="prefix" colspan="2"/>
|
||||
<field name="name" colspan="2"/>
|
||||
@@ -345,12 +345,12 @@
|
||||
<field name="origin"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
|
||||
<field name="product_uom" string="UoM" groups="product.group_uom"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="tracking_id" groups="stock.group_tracking_lot"/>
|
||||
<field name="date"/>
|
||||
<field name="prodlot_id"/>
|
||||
<field name="location_id"/>
|
||||
<field name="location_dest_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -364,7 +364,7 @@
|
||||
<field name="model">stock.production.lot</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Production Lot">
|
||||
<tree string="Serial Number">
|
||||
<field name="prefix" />
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
@@ -399,7 +399,7 @@
|
||||
</record>
|
||||
|
||||
<record id="action_production_lot_form" model="ir.actions.act_window">
|
||||
<field name="name">Production Lots</field>
|
||||
<field name="name">Serial Number</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">stock.production.lot</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -424,13 +424,13 @@
|
||||
<tree colors="grey:state == 'cancel'" string="Moves">
|
||||
<field name="product_id" />
|
||||
<field name="product_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="prodlot_id" groups="stock.group_production_lot"/>
|
||||
<field name="tracking_id" groups="stock.group_tracking_lot"/>
|
||||
<field name="product_packaging" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging"/>
|
||||
<field name="picking_id"/>
|
||||
<field name="location_id" />
|
||||
<field name="location_dest_id" />
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="create_date" groups="base.group_no_one"/>
|
||||
<field name="date" string="Date" groups="base.group_no_one"/>
|
||||
<field name="date_expected" string="Date Expected"/>
|
||||
@@ -448,13 +448,13 @@
|
||||
<tree colors="grey:state == 'cancel'" string="Moves">
|
||||
<field name="product_id" />
|
||||
<field name="product_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="prodlot_id" groups="stock.group_production_lot"/>
|
||||
<field name="tracking_id" groups="stock.group_tracking_lot"/>
|
||||
<field name="product_packaging" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging"/>
|
||||
<field name="picking_id"/>
|
||||
<field name="location_id" />
|
||||
<field name="location_dest_id" />
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="create_date" groups="base.group_no_one"/>
|
||||
<field name="date" string="Date" groups="base.group_no_one"/>
|
||||
<field name="date_expected" string="Date Expected"/>
|
||||
@@ -505,7 +505,7 @@
|
||||
<separator string="Location" colspan="2"/>
|
||||
<field name="name"/>
|
||||
<field name="usage"/>
|
||||
<field name="location_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
</group>
|
||||
<group col="4" colspan="2">
|
||||
<separator string="Additional Information" colspan="4"/>
|
||||
@@ -712,7 +712,7 @@
|
||||
<tree colors="grey:scrapped == True" string="Stock Moves">
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
|
||||
<field name="product_uom" string="UoM" groups="product.group_uom"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uos" groups="product.group_uos"/>
|
||||
<button name="%(stock.move_scrap)d"
|
||||
string="Scrap Products" type="action"
|
||||
@@ -722,7 +722,7 @@
|
||||
<field name="prodlot_id" groups="stock.group_production_lot"/>
|
||||
<button
|
||||
name="%(stock.track_line)d"
|
||||
string="Split in production lots"
|
||||
string="Split in Serial Number"
|
||||
groups="stock.group_production_lot"
|
||||
type="action" icon="terp-stock_effects-object-colorize"
|
||||
states="draft,waiting,confirmed,assigned" />
|
||||
@@ -758,8 +758,8 @@
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Locations" colspan="2" />
|
||||
<field name="location_id" domain="[('usage','<>','view')]" />
|
||||
<field name="location_dest_id" domain="[('usage','=','internal')]" />
|
||||
<field name="location_id" domain="[('usage','<>','view')]"/>
|
||||
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
@@ -902,7 +902,7 @@
|
||||
<tree colors="grey:scrapped==True" string="Stock Moves">
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
|
||||
<field name="product_uom" string="UoM" groups="product.group_uom"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uos" groups="product.group_uos"/>
|
||||
<button name="%(stock.move_scrap)d"
|
||||
string="Scrap Products" type="action"
|
||||
@@ -910,7 +910,7 @@
|
||||
states="draft,waiting,confirmed,assigned" />
|
||||
<field name="scrapped" invisible="1"/>
|
||||
<field name="prodlot_id" groups="stock.group_production_lot"/>
|
||||
<button name="%(track_line)d" string="Split in production lots" type="action"
|
||||
<button name="%(track_line)d" string="Split in Serial Numbers" type="action"
|
||||
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('prodlot_id','<>',False)]}"
|
||||
states="draft,assigned,confirmed"
|
||||
groups="stock.group_production_lot"/>
|
||||
@@ -924,7 +924,7 @@
|
||||
icon="terp-stock_effects-object-colorize"
|
||||
groups="product.group_stock_packaging"
|
||||
states="draft,assigned,confirmed"/>
|
||||
<field name="location_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="date"/>
|
||||
<field name="state"/>
|
||||
<button name="%(action_partial_move_server)d" string="Process" type="action" states="confirmed,assigned" icon="gtk-go-forward"/>
|
||||
@@ -947,8 +947,8 @@
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Locations" colspan="2" />
|
||||
<field name="location_id" domain="[('usage','=','internal')]" />
|
||||
<field name="location_dest_id" domain="[('usage','<>','view')]" />
|
||||
<field name="location_id" domain="[('usage','=','internal')]"/>
|
||||
<field name="location_dest_id" domain="[('usage','<>','view')]"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
@@ -1121,7 +1121,7 @@
|
||||
<tree colors="grey:scrapped==True" string="Stock Moves">
|
||||
<field name="product_id" />
|
||||
<field name="product_qty" />
|
||||
<field name="product_uom" string="UoM" groups="product.group_uom"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<button name="%(stock.move_scrap)d"
|
||||
string="Scrap Products" type="action"
|
||||
icon="gtk-convert" context="{'scrap': True}"
|
||||
@@ -1130,7 +1130,7 @@
|
||||
<field name="prodlot_id" groups="stock.group_production_lot"/>
|
||||
<button
|
||||
name="%(stock.track_line)d"
|
||||
string="Split in production lots"
|
||||
string="Split in Serial Numbers"
|
||||
groups="stock.group_production_lot"
|
||||
type="action" icon="terp-stock_effects-object-colorize"
|
||||
states="draft,waiting,confirmed,assigned" />
|
||||
@@ -1143,7 +1143,7 @@
|
||||
groups="product.group_stock_packaging"
|
||||
icon="terp-stock_effects-object-colorize"
|
||||
states="draft,assigned,confirmed"/>
|
||||
<field name="location_dest_id"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
<form string="Stock Moves">
|
||||
@@ -1164,8 +1164,8 @@
|
||||
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Locations" colspan="2" />
|
||||
<field name="location_id" domain="[('usage','<>','view')]" />
|
||||
<field name="location_dest_id" domain="[('usage','=','internal')]" />
|
||||
<field name="location_id" domain="[('usage','<>','view')]"/>
|
||||
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
|
||||
</group>
|
||||
|
||||
<group colspan="2" col="2">
|
||||
@@ -1362,7 +1362,7 @@
|
||||
<field name="create_date" invisible="1" groups="base.group_no_one"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
|
||||
<field name="product_uom" string="UoM" groups="product.group_uom"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uos" groups="product.group_uos"/>
|
||||
<button name="%(stock.move_scrap)d"
|
||||
string="Scrap Products" type="action"
|
||||
@@ -1370,7 +1370,7 @@
|
||||
states="draft,waiting,confirmed,assigned"
|
||||
/>
|
||||
<field name="prodlot_id" groups="stock.group_production_lot"/>
|
||||
<button name="%(track_line)d" string="Split in production lots" type="action"
|
||||
<button name="%(track_line)d" string="Split in Serial Numbers" type="action"
|
||||
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('prodlot_id','<>',False)]}"
|
||||
states="draft,waiting,confirmed,assigned,done"
|
||||
groups="stock.group_tracking_lot"/>
|
||||
@@ -1383,8 +1383,8 @@
|
||||
groups="product.group_stock_packaging"
|
||||
icon="terp-stock_effects-object-colorize"
|
||||
states="draft,assigned,confirmed,done"/>
|
||||
<field name="location_id"/>
|
||||
<field name="location_dest_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="date" groups="base.group_no_one"/>
|
||||
<field name="date_expected"/>
|
||||
<field name="state"/>
|
||||
@@ -1411,8 +1411,8 @@
|
||||
icon="gtk-convert" context="{'scrap': True}"
|
||||
states="draft,waiting,confirmed,assigned" colspan="1"/>
|
||||
<newline/>
|
||||
<field name="location_id"/>
|
||||
<field name="location_dest_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="partner_id" context="{'contact_display':'partner'}"/>
|
||||
|
||||
</group>
|
||||
@@ -1535,13 +1535,13 @@
|
||||
<field name="origin"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" />
|
||||
<field name="product_uom" string="UoM" groups="product.group_uom"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<button name="%(stock.move_scrap)d"
|
||||
string="Scrap Products" type="action"
|
||||
icon="gtk-convert" context="{'scrap': True}"
|
||||
states="draft,waiting,confirmed,assigned"/>
|
||||
<field name="prodlot_id" groups="stock.group_production_lot"/>
|
||||
<button name="%(track_line)d" string="Split in production lots" type="action"
|
||||
<button name="%(track_line)d" string="Split in Serial Numbers" type="action"
|
||||
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('prodlot_id','<>',False)]}"
|
||||
states="draft,waiting,confirmed,assigned,done"
|
||||
groups="stock.group_tracking_lot"/>
|
||||
@@ -1573,7 +1573,7 @@
|
||||
<field name="picking_id" string="Reference"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_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="date" groups="base.group_no_one" />
|
||||
<button name="action_done" states="confirmed,assigned" string="Process" type="object" icon="gtk-go-forward"/>
|
||||
</tree>
|
||||
@@ -1597,8 +1597,8 @@
|
||||
icon="gtk-convert" context="{'scrap': True}"
|
||||
states="draft,waiting,confirmed,assigned" colspan="1"/>
|
||||
<newline/>
|
||||
<field name="location_id"/>
|
||||
<field name="location_dest_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="partner_id"/>
|
||||
|
||||
</group>
|
||||
|
||||
@@ -30,8 +30,8 @@ class stock_change_product_qty(osv.osv_memory):
|
||||
_description = "Change Product Quantity"
|
||||
_columns = {
|
||||
'product_id' : fields.many2one('product.product', 'Product'),
|
||||
'new_quantity': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM'), required=True, help='This quantity is expressed in the Default UoM of the product.'),
|
||||
'prodlot_id': fields.many2one('stock.production.lot', 'Production Lot', domain="[('product_id','=',product_id)]"),
|
||||
'new_quantity': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, help='This quantity is expressed in the Default Unit of Measure of the product.'),
|
||||
'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
|
||||
'location_id': fields.many2one('stock.location', 'Location', required=True, domain="[('usage', '=', 'internal')]"),
|
||||
}
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ class stock_inventory_line_split(osv.osv_memory):
|
||||
_description = "Split inventory lines"
|
||||
|
||||
_columns = {
|
||||
'line_ids': fields.one2many('stock.inventory.line.split.lines', 'wizard_id', 'Production Lots'),
|
||||
'line_exist_ids': fields.one2many('stock.inventory.line.split.lines', 'wizard_exist_id', 'Production Lots'),
|
||||
'line_ids': fields.one2many('stock.inventory.line.split.lines', 'wizard_id', 'Serial Numbers'),
|
||||
'line_exist_ids': fields.one2many('stock.inventory.line.split.lines', 'wizard_exist_id', 'Serial Numbers'),
|
||||
}
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
@@ -46,7 +46,7 @@ class stock_inventory_line_split(osv.osv_memory):
|
||||
return res
|
||||
|
||||
def split(self, cr, uid, ids, line_ids, context=None):
|
||||
""" To split stock inventory lines according to production lot.
|
||||
""" To split stock inventory lines according to serial numbers.
|
||||
|
||||
:param line_ids: the ID or list of IDs of inventory lines we want to split
|
||||
"""
|
||||
|
||||
@@ -29,8 +29,8 @@ class stock_move_consume(osv.osv_memory):
|
||||
|
||||
_columns = {
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
|
||||
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM'), required=True),
|
||||
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True),
|
||||
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
|
||||
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
|
||||
'location_id': fields.many2one('stock.location', 'Location', required=True)
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ stock_move_scrap()
|
||||
|
||||
class split_in_production_lot(osv.osv_memory):
|
||||
_name = "stock.move.split"
|
||||
_description = "Split in Production lots"
|
||||
_description = "Split in Serial Numbers"
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
if context is None:
|
||||
@@ -165,11 +165,11 @@ class split_in_production_lot(osv.osv_memory):
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM')),
|
||||
'qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
|
||||
'product_uom': fields.many2one('product.uom', 'UoM'),
|
||||
'line_ids': fields.one2many('stock.move.split.lines', 'wizard_id', 'Production Lots'),
|
||||
'line_exist_ids': fields.one2many('stock.move.split.lines', 'wizard_exist_id', 'Production Lots'),
|
||||
'product_uom': fields.many2one('product.uom', 'Unit of Measure'),
|
||||
'line_ids': fields.one2many('stock.move.split.lines', 'wizard_id', 'Serial Numbers'),
|
||||
'line_exist_ids': fields.one2many('stock.move.split.lines', 'wizard_exist_id', 'Serial Numbers'),
|
||||
'use_exist' : fields.boolean('Existing Lots', help="Check this option to select existing lots in the list below, otherwise you should enter new ones line by line."),
|
||||
'location_id': fields.many2one('stock.location', 'Source Location')
|
||||
}
|
||||
@@ -182,7 +182,7 @@ class split_in_production_lot(osv.osv_memory):
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
def split(self, cr, uid, ids, move_ids, context=None):
|
||||
""" To split stock moves into production lot
|
||||
""" To split stock moves into serial numbers
|
||||
|
||||
:param move_ids: the ID or list of IDs of stock move we want to split
|
||||
"""
|
||||
@@ -210,7 +210,7 @@ class split_in_production_lot(osv.osv_memory):
|
||||
quantity = line.quantity
|
||||
total_move_qty += quantity
|
||||
if total_move_qty > move_qty:
|
||||
raise osv.except_osv(_('Processing Error'), _('Production lot quantity %d of %s is larger than available quantity (%d) !') \
|
||||
raise osv.except_osv(_('Processing Error'), _('Serial number quantity %d of %s is larger than available quantity (%d) !') \
|
||||
% (total_move_qty, move.product_id.name, move_qty))
|
||||
if quantity <= 0 or move_qty == 0:
|
||||
continue
|
||||
@@ -260,11 +260,11 @@ class stock_move_split_lines_exist(osv.osv_memory):
|
||||
_name = "stock.move.split.lines"
|
||||
_description = "Stock move Split lines"
|
||||
_columns = {
|
||||
'name': fields.char('Production Lot', size=64),
|
||||
'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM')),
|
||||
'name': fields.char('Serial Number', size=64),
|
||||
'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),
|
||||
'wizard_id': fields.many2one('stock.move.split', 'Parent Wizard'),
|
||||
'wizard_exist_id': fields.many2one('stock.move.split', 'Parent Wizard (for existing lines)'),
|
||||
'prodlot_id': fields.many2one('stock.production.lot', 'Production Lot'),
|
||||
'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number'),
|
||||
}
|
||||
_defaults = {
|
||||
'quantity': 1.0,
|
||||
|
||||
@@ -93,11 +93,11 @@
|
||||
|
||||
<group colspan="4" attrs="{'invisible':[('use_exist','=',True)]}">
|
||||
<field name="line_ids" colspan="4" nolabel="1">
|
||||
<tree string="Production Lot Numbers" editable="bottom">
|
||||
<tree string="Serial Numbers" editable="bottom">
|
||||
<field name="name" string="Lots"/>
|
||||
<field name="quantity" />
|
||||
</tree>
|
||||
<form string="Production Lot Number">
|
||||
<form string="Serial Number">
|
||||
<field name="name" string="Lot number"/>
|
||||
<field name="quantity" />
|
||||
</form>
|
||||
@@ -105,11 +105,11 @@
|
||||
</group>
|
||||
<group colspan="4" attrs="{'invisible':[('use_exist','!=',True)]}">
|
||||
<field name="line_exist_ids" colspan="4" nolabel="1">
|
||||
<tree string="Production Lot Numbers" editable="bottom">
|
||||
<tree string="Serial Numbers" editable="bottom">
|
||||
<field name="prodlot_id" string="Lot number" domain="[('product_id','=',parent.product_id)]" on_change="onchange_lot_id(prodlot_id, quantity, parent.location_id, parent.product_id, parent.product_uom)"/>
|
||||
<field name="quantity" on_change="onchange_lot_id(prodlot_id, quantity, parent.location_id, parent.product_id, parent.product_uom)" />
|
||||
</tree>
|
||||
<form string="Production Lot Number">
|
||||
<form string="Serial Number">
|
||||
<field name="prodlot_id" string="Lot number" domain="[('product_id','=',parent.product_id)]" on_change="onchange_lot_id(prodlot_id, quantity, parent.location_id, parent.product_id, parent.product_uom)"/>
|
||||
<field name="quantity" on_change="onchange_lot_id(prodlot_id, quantity, parent.location_id, parent.product_id, parent.product_uom)" />
|
||||
</form>
|
||||
|
||||
@@ -42,9 +42,9 @@ class stock_partial_picking_line(osv.TransientModel):
|
||||
_rec_name = 'product_id'
|
||||
_columns = {
|
||||
'product_id' : fields.many2one('product.product', string="Product", required=True, ondelete='CASCADE'),
|
||||
'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product UoM'), required=True),
|
||||
'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
|
||||
'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True, ondelete='CASCADE'),
|
||||
'prodlot_id' : fields.many2one('stock.production.lot', 'Production Lot', ondelete='CASCADE'),
|
||||
'prodlot_id' : fields.many2one('stock.production.lot', 'Serial Number', ondelete='CASCADE'),
|
||||
'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete='CASCADE', domain = [('usage','<>','view')]),
|
||||
'location_dest_id': fields.many2one('stock.location', 'Dest. Location', required=True, ondelete='CASCADE',domain = [('usage','<>','view')]),
|
||||
'move_id' : fields.many2one('stock.move', "Move", ondelete='CASCADE'),
|
||||
@@ -145,7 +145,7 @@ class stock_partial_picking(osv.osv_memory):
|
||||
|
||||
if line_uom.factor and line_uom.factor <> 0:
|
||||
if qty_in_line_uom <> wizard_line.quantity:
|
||||
raise osv.except_osv(_('Warning'), _('The uom rounding does not allow you to ship "%s %s", only roundings of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name))
|
||||
raise osv.except_osv(_('Warning'), _('The unit of measure rounding does not allow you to ship "%s %s", only roundings of "%s %s" is accepted by the Unit of Measure.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name))
|
||||
if move_id:
|
||||
#Check rounding Quantity.ex.
|
||||
#picking: 1kg, uom kg rounding = 0.01 (rounding to 10g),
|
||||
|
||||
@@ -31,7 +31,7 @@ class stock_return_picking_memory(osv.osv_memory):
|
||||
_rec_name = 'product_id'
|
||||
_columns = {
|
||||
'product_id' : fields.many2one('product.product', string="Product", required=True),
|
||||
'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product UoM'), required=True),
|
||||
'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
|
||||
'wizard_id' : fields.many2one('stock.return.picking', string="Wizard"),
|
||||
'move_id' : fields.many2one('stock.move', "Move"),
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class stock_split_into(osv.osv_memory):
|
||||
_name = "stock.split.into"
|
||||
_description = "Split into"
|
||||
_columns = {
|
||||
'quantity': fields.float('Quantity',digits_compute=dp.get_precision('Product UoM')),
|
||||
'quantity': fields.float('Quantity',digits_compute=dp.get_precision('Product Unit of Measure')),
|
||||
}
|
||||
_defaults = {
|
||||
'quantity': lambda *x: 0,
|
||||
|
||||
@@ -81,17 +81,17 @@ class stock_sale_forecast(osv.osv):
|
||||
help = 'Shows which period this forecast concerns.'),
|
||||
'product_id': fields.many2one('product.product', 'Product', readonly=True, required=True, states={'draft':[('readonly',False)]}, \
|
||||
help = 'Shows which product this forecast concerns.'),
|
||||
'product_qty': fields.float('Forecast Quantity', digits_compute=dp.get_precision('Product UoM'), required=True, readonly=True, \
|
||||
'product_qty': fields.float('Forecast Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, readonly=True, \
|
||||
states={'draft':[('readonly',False)]}, help= 'Forecast Product quantity.'),
|
||||
'product_amt': fields.float('Product Amount', readonly=True, states={'draft':[('readonly',False)]}, \
|
||||
help='Forecast value which will be converted to Product Quantity according to prices.'),
|
||||
'product_uom_categ': fields.many2one('product.uom.categ', 'Product UoM Category'), # Invisible field for product_uom domain
|
||||
'product_uom': fields.many2one('product.uom', 'Product UoM', required=True, readonly=True, states={'draft':[('readonly',False)]}, \
|
||||
'product_uom_categ': fields.many2one('product.uom.categ', 'Product Unit of Measure Category'), # Invisible field for product_uom domain
|
||||
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, readonly=True, states={'draft':[('readonly',False)]}, \
|
||||
help = "Unit of Measure used to show the quantities of stock calculation." \
|
||||
"You can use units form default category or from second category (UoS category)."),
|
||||
'product_uos_categ' : fields.many2one('product.uom.categ', 'Product UoS Category'), # Invisible field for product_uos domain
|
||||
# Field used in onchange_uom to check what uom was before change and recalculate quantities according to old uom (active_uom) and new uom.
|
||||
'active_uom': fields.many2one('product.uom', string = "Active UoM"),
|
||||
'active_uom': fields.many2one('product.uom', string = "Active Unit of Measure"),
|
||||
'state': fields.selection([('draft','Draft'),('validated','Validated')],'State',readonly=True),
|
||||
'analyzed_period1_id': fields.many2one('stock.period', 'Period1', readonly=True, states={'draft':[('readonly',False)]},),
|
||||
'analyzed_period2_id': fields.many2one('stock.period', 'Period2', readonly=True, states={'draft':[('readonly',False)]},),
|
||||
@@ -452,12 +452,12 @@ class stock_planning(osv.osv):
|
||||
help = 'Period for this planning. Requisition will be created for beginning of the period.', select=True),
|
||||
'warehouse_id': fields.many2one('stock.warehouse','Warehouse', required=True),
|
||||
'product_id': fields.many2one('product.product' , 'Product', required=True, help = 'Product which this planning is created for.'),
|
||||
'product_uom_categ' : fields.many2one('product.uom.categ', 'Product UoM Category'), # Invisible field for product_uom domain
|
||||
'product_uom': fields.many2one('product.uom', 'UoM', required=True, help = "Unit of Measure used to show the quantities of stock calculation." \
|
||||
'product_uom_categ' : fields.many2one('product.uom.categ', 'Product Unit of Measure Category'), # Invisible field for product_uom domain
|
||||
'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True, help = "Unit of Measure used to show the quantities of stock calculation." \
|
||||
"You can use units from default category or from second category (UoS category)."),
|
||||
'product_uos_categ': fields.many2one('product.uom.categ', 'Product UoM Category'), # Invisible field for product_uos domain
|
||||
'product_uos_categ': fields.many2one('product.uom.categ', 'Product Unit of Measure Category'), # Invisible field for product_uos domain
|
||||
# Field used in onchange_uom to check what uom was before change to recalculate quantities according to old uom (active_uom) and new uom.
|
||||
'active_uom': fields.many2one('product.uom', string = "Active UoM"), # It works only in Forecast
|
||||
'active_uom': fields.many2one('product.uom', string = "Active Unit of Measure"), # It works only in Forecast
|
||||
'planned_outgoing': fields.float('Planned Out', required=True, \
|
||||
help = 'Enter planned outgoing quantity from selected Warehouse during the selected Period of selected Product. '\
|
||||
'To plan this value look at Confirmed Out or Sales Forecasts. This value should be equal or greater than Confirmed Out.'),
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
<filter string="Warehouse " icon="terp-go-home" domain="[]" context="{'group_by':'warehouse_id'}"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<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'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user