bzr revid: vir@tinyerp.com-20100813044822-542tmdr5wttygkkz
This commit is contained in:
Vir (Open ERP)
2010-08-13 10:18:22 +05:30
63 changed files with 819 additions and 749 deletions
+27 -2
View File
@@ -1027,6 +1027,33 @@ class account_move(osv.osv):
_description = "Account Entry"
_order = 'id desc'
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80):
"""
Returns a list of tupples containing id, name, as internally it is called {def name_get}
result format : {[(id, name), (id, name), ...]}
@param cr: A database cursor
@param user: ID of the user currently logged in
@param name: name to search
@param args: other arguments
@param operator: default operator is 'ilike', it can be changed
@param context: context arguments, like lang, time zone
@param limit: Returns first 'n' ids of complete result, default is 80.
@return: Returns a list of tupples containing id and name
"""
if not args:
args=[]
if not context:
context={}
ids = []
if name:
ids += self.search(cr, user, [('state','=','draft'), ('id','=',name)], limit=limit)
return self.name_get(cr, user, ids, context=context)
def name_get(self, cursor, user, ids, context=None):
if not len(ids):
return []
@@ -2205,7 +2232,6 @@ class account_add_tmpl_wizard(osv.osv_memory):
def _get_def_cparent(self, cr, uid, context):
acc_obj=self.pool.get('account.account')
tmpl_obj=self.pool.get('account.account.template')
#print "Searching for ",context
tids=tmpl_obj.read(cr, uid, [context['tmpl_ids']], ['parent_id'])
if not tids or not tids[0]['parent_id']:
return False
@@ -2247,7 +2273,6 @@ class account_add_tmpl_wizard(osv.osv_memory):
# 'tax_ids': [(6,0,tax_ids)], todo!!
'company_id': company_id,
}
# print "Creating:", vals
new_account = acc_obj.create(cr, uid, vals)
return {'type':'state', 'state': 'end' }
+60 -18
View File
@@ -1,14 +1,14 @@
<openerp>
<data>
<record id="view_account_installer" model="ir.ui.view">
<field name="name">account.installer.view</field>
<record id="view_account_configuration_installer" model="ir.ui.view">
<field name="name">account.installer.form</field>
<field name="model">account.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Accounting Modules Installation</attribute>
<attribute name="string">Accounting System Configuration</attribute>
</form>
<separator string="title" position="attributes">
@@ -54,37 +54,79 @@
<field name="sale_tax" colspan="2" on_change="on_change_tax(sale_tax)"/>
<field name="purchase_tax" colspan="2" />
</group>
<group colspan="4" groups="base.group_extended">
<separator col="4" colspan="4" string="Install Extra Account Module"/>
<field name="account_analytic_plans"/>
<field name="account_payment"/>
<field name="account_followup"/>
<field name="account_asset"/>
<field name="account_voucher"/>
<field name="account_voucher_payment"/>
</group>
</group>
</group>
</data>
</field>
</record>
<record id="action_account_installer" model="ir.actions.act_window">
<field name="name">Accounting Modules Installation</field>
<record id="view_account_modules_installer" model="ir.ui.view">
<field name="name">account.installer.modules.form</field>
<field name="model">account.installer.modules</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Extra Accounting Modules Installation</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string"
>Install Extra Accounting Modules In Your Accounting System</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">From this screen, you can install extra accounting modules in your accounting system. Select the modules to directly install them. If you do not think you need any of these right now, you can easily install them later.</attribute>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='rowspan'>23</attribute>
<attribute name='string'></attribute>
</xpath>
<group colspan="8">
<group colspan="4" height="450" width="600">
<group colspan="4">
<field name="account_analytic_plans"/>
<field name="account_payment"/>
<field name="account_followup"/>
</group>
</group>
</group>
</data>
</field>
</record>
<record id="action_account_configuration_installer" model="ir.actions.act_window">
<field name="name">Accounting Chart Configuration</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.installer</field>
<field name="view_id" ref="view_account_installer"/>
<field name="view_id" ref="view_account_configuration_installer"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="account_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_installer"/>
<record id="action_account_installer" model="ir.actions.act_window">
<field name="name">Accounting Modules Installation</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.installer.modules</field>
<field name="view_id" ref="view_account_modules_installer"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="account_configuration_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_configuration_installer"/>
<field name="sequence">3</field>
<field name="restart">onskip</field>
</record>
<record id="account_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_installer"/>
<field name="sequence">5</field>
<field name="restart">always</field>
</record>
<record id="account_ir_actions_todo_tree" model="ir.ui.view">
<field name="model">ir.actions.todo</field>
<field name="name">account_installer_action_replace</field>
@@ -92,7 +134,7 @@
<field name="inherit_id" ref="base.ir_actions_todo_tree"/>
<field name="arch" type="xml">
<xpath expr="//button[@string='Launch']" position="replace">
<button name="%(action_account_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
<button name="%(action_account_configuration_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
</xpath>
</field>
</record>
+36 -27
View File
@@ -407,7 +407,7 @@ class account_move_line(osv.osv):
'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),
'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),
'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade", domain=[('type','<>','view'), ('type', '<>', 'closed')], select=2),
'move_id': fields.many2one('account.move', 'Move', ondelete="cascade", states={'valid':[('readonly',True)]}, help="The move of this entry line.", select=2),
'move_id': fields.many2one('account.move', 'Move', ondelete="cascade", help="The move of this entry line.", select=2),
'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Narration'),
'ref': fields.char('Ref.', size=64),
'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1),
@@ -560,7 +560,7 @@ class account_move_line(osv.osv):
#if jt in ('sale', 'purchase_refund', 'bank', 'cash'):
if jt in ('sale', 'purchase_refund'):
val['account_id'] = self.pool.get('account.fiscal.position').map_account(cr, uid, part and part.property_account_position or False, id2)
elif jt in ('purchase', 'sale_refund', 'expense'):
elif jt in ('purchase', 'sale_refund', 'expense', 'bank', 'cash'):
val['account_id'] = self.pool.get('account.fiscal.position').map_account(cr, uid, part and part.property_account_position or False, id1)
if val.get('account_id', False):
@@ -798,30 +798,30 @@ class account_move_line(osv.osv):
return j+(p and (':'+p) or '')
return False
# def onchange_date(self, cr, user, ids, date, context={}):
# """
# Returns a dict that contains new values and context
# @param cr: A database cursor
# @param user: ID of the user currently logged in
# @param date: latest value from user input for field date
# @param args: other arguments
# @param context: context arguments, like lang, time zone
# @return: Returns a dict which contains new values, and context
# """
# res = {}
# period_pool = self.pool.get('account.period')
# pids = period_pool.search(cr, user, [('date_start','<=',date), ('date_stop','>=',date)])
# if pids:
# res.update({
# 'period_id':pids[0]
# })
# context.update({
# 'period_id':pids[0]
# })
# return {
# 'value':res,
# 'context':context,
# }
def onchange_date(self, cr, user, ids, date, context={}):
"""
Returns a dict that contains new values and context
@param cr: A database cursor
@param user: ID of the user currently logged in
@param date: latest value from user input for field date
@param args: other arguments
@param context: context arguments, like lang, time zone
@return: Returns a dict which contains new values, and context
"""
res = {}
period_pool = self.pool.get('account.period')
pids = period_pool.search(cr, user, [('date_start','<=',date), ('date_stop','>=',date)])
if pids:
res.update({
'period_id':pids[0]
})
context.update({
'period_id':pids[0]
})
return {
'value':res,
'context':context,
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):
result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
@@ -882,20 +882,29 @@ class account_move_line(osv.osv):
attrs = []
if field == 'debit':
attrs.append('sum="Total debit"')
elif field == 'credit':
attrs.append('sum="Total credit"')
elif field == 'account_tax_id':
attrs.append('domain="[(\'parent_id\',\'=\',False)]"')
attrs.append("context=\"{'journal_id':journal_id}\"")
elif field == 'account_id' and journal.id:
attrs.append('domain="[(\'journal_id\', \'=\', '+str(journal.id)+'),(\'type\',\'&lt;&gt;\',\'view\'), (\'type\',\'&lt;&gt;\',\'closed\')]" on_change="onchange_account_id(account_id, partner_id)"')
elif field == 'partner_id':
attrs.append('on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"')
elif field == 'journal_id':
attrs.append("context=\"{'journal_id':journal_id}\"")
elif field == 'statement_id':
attrs.append("domain=\"[('state','!=','confirm'),('journal_id.type','=','bank')]\"")
elif field == 'date':
attrs.append('on_change="onchange_date(date)"')
if field in ('amount_currency', 'currency_id'):
attrs.append('on_change="onchange_currency(account_id, amount_currency,currency_id, date, journal_id)"')
+40 -39
View File
@@ -1048,7 +1048,7 @@
<field name="credit" operator="+"/>
</graph>
</field>
</record>
</record>
<record id="view_account_move_line_filter" model="ir.ui.view">
<field name="name">Entry Lines</field>
@@ -1058,9 +1058,10 @@
<search string="Search Entry Lines">
<group col='10' colspan='4'>
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Entry Lines"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','valid')]" help="Posted Entry Lines"/>
<separator orientation="vertical"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','valid')]" help="Posted Entry Lines"/>
<filter icon="terp-stock_symbol-selection" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Entry Lines"/>
<separator orientation="vertical"/>
<filter icon="terp-stock_symbol-selection" string="Unreconciled" domain="[('reconcile_id','=',False), ('account_id.type','in',['receivable', 'payable'])]" help="Unreconciled Entry Lines"/>
<separator orientation="vertical"/>
<field name="ref" select="1" string="Reference"/>
@@ -1073,8 +1074,8 @@
</group>
<newline/>
<group col="10" colspan="4">
<field name="journal_id" required="1" widget="selection" context="{'journal_id':self, 'visible_id':self or 0, 'normal_view':False}"/>
<field name="period_id" required="1" widget="selection" context="{'period_id':self}"/>
<field name="journal_id" widget="selection" context="{'journal_id':self, 'visible_id':self or 0, 'normal_view':False}"/>
<field name="period_id" context="{'period_id':self, 'search_default_period_id':self}"/>
<separator orientation="vertical"/>
<field name="narration" select="1"/>
<field name="date" select='1'/>
@@ -1377,29 +1378,29 @@
<menuitem action="action_move_line_form_encode_by_move" id="menu_encode_entries_by_move" parent="menu_finance_entries"/>-->
<record id="action_account_moves_sale" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
<field name="domain">[('journal_id.type', 'in', ['sale', 'purchase_refund'])]</field>
</record>
<!-- <record id="action_account_moves_sale" model="ir.actions.act_window">-->
<!-- <field name="name">Journal Items</field>-->
<!-- <field name="res_model">account.move.line</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form,graph</field>-->
<!-- <field name="view_id" ref="view_move_line_tree"/>-->
<!-- <field name="search_view_id" ref="view_account_move_line_filter"/>-->
<!-- <field name="domain">[('journal_id.type', 'in', ['sale', 'purchase_refund'])]</field>-->
<!-- </record>-->
<menuitem action="action_account_moves_sale" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables"/>
<!-- <menuitem action="action_account_moves_sale" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables"/>-->
<record id="action_account_moves_purchase" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
<field name="domain">[('journal_id.type', 'in', ['purchase', 'sale_refund'])]</field>
</record>
<!-- <record id="action_account_moves_purchase" model="ir.actions.act_window">-->
<!-- <field name="name">Journal Items</field>-->
<!-- <field name="res_model">account.move.line</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form,graph</field>-->
<!-- <field name="view_id" ref="view_move_line_tree"/>-->
<!-- <field name="search_view_id" ref="view_account_move_line_filter"/>-->
<!-- <field name="domain">[('journal_id.type', 'in', ['purchase', 'sale_refund'])]</field>-->
<!-- </record>-->
<menuitem action="action_account_moves_purchase" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables"/>
<!-- <menuitem action="action_account_moves_purchase" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables"/>-->
<record id="action_move_line_search" model="ir.actions.act_window">
<field name="name">Entry Lines</field>
@@ -2416,22 +2417,22 @@
id="menu_action_account_fiscal_position_form_template"
parent="account_template_folder" sequence="20"/>
<record id="action_account_moves_all" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="search_view_id" ref="view_account_move_line_filter"/>
</record>
<!-- <record id="action_account_moves_all" model="ir.actions.act_window">-->
<!-- <field name="name">Journal Items</field>-->
<!-- <field name="res_model">account.move.line</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form,graph</field>-->
<!-- <field name="view_id" ref="view_move_line_tree"/>-->
<!-- <field name="search_view_id" ref="view_account_move_line_filter"/>-->
<!-- </record>-->
<menuitem
action="action_account_moves_all"
icon="STOCK_JUSTIFY_FILL"
id="menu_eaction_account_moves_all"
parent="account.menu_finance_entries"
sequence="4"
/>
<!-- <menuitem-->
<!-- action="action_account_moves_all"-->
<!-- icon="STOCK_JUSTIFY_FILL"-->
<!-- id="menu_eaction_account_moves_all"-->
<!-- parent="account.menu_finance_entries"-->
<!-- sequence="4"-->
<!-- />-->
<!-- Cash Statement -->
<record id="view_cash_statement_tree" model="ir.ui.view">
+46 -32
View File
@@ -18,11 +18,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import datetime
from dateutil.relativedelta import relativedelta
from os.path import join as opj
from operator import itemgetter
from tools.translate import _
from osv import fields, osv
import netsvc
@@ -55,25 +57,6 @@ class account_installer(osv.osv_memory):
help="Installs localized accounting charts to match as closely as "
"possible the accounting needs of your company based on your "
"country."),
'account_analytic_plans':fields.boolean('Multiple Analytic Plans',
help="Allows invoice lines to impact multiple analytic accounts "
"simultaneously."),
'account_payment':fields.boolean('Suppliers Payment Management',
help="Streamlines invoice payment and creates hooks to plug "
"automated payment systems in."),
'account_followup':fields.boolean('Followups Management',
help="Helps you generate reminder letters for unpaid invoices, "
"including multiple levels of reminding and customized "
"per-partner policies."),
'account_asset':fields.boolean('Assets Management',
help="Enables asset management in the accounting application, "
"including asset categories and usage periods."),
'account_voucher':fields.boolean('Voucher Management',
help="Account Voucher module includes all the basic requirements of "
"Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc... "),
'account_voucher_payment':fields.boolean('Voucher and Reconcile Management',
help="Extension Account Voucher module includes allows to link payment / receipt "
"entries with voucher, also automatically reconcile during the payment and receipt entries."),
'date_start': fields.date('Start Date', required=True),
'date_stop': fields.date('End Date', required=True),
'period':fields.selection([('month','Monthly'), ('3months','3 Monthly')],
@@ -103,11 +86,6 @@ class account_installer(osv.osv_memory):
return {}
def generate_configurable_chart(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'account', 'configurable_chart_template')
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
obj_multi = self.pool.get('account.chart.template').browse(cr, uid, id)
obj_acc = self.pool.get('account.account')
obj_acc_tax = self.pool.get('account.tax')
obj_journal = self.pool.get('account.journal')
@@ -116,6 +94,14 @@ class account_installer(osv.osv_memory):
obj_fiscal_position_template = self.pool.get('account.fiscal.position.template')
obj_fiscal_position = self.pool.get('account.fiscal.position')
data_pool = self.pool.get('ir.model.data')
mod_obj = self.pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'account', 'configurable_chart_template')
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
obj_multi = self.pool.get('account.chart.template').browse(cr, uid, id)
if context is None:
context = {}
company_id = self.pool.get('res.users').browse(cr, uid, [uid], context)[0].company_id
seq_journal = True
@@ -302,7 +288,7 @@ class account_installer(osv.osv_memory):
data_id = mod_obj.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_sp_journal_view')])
data = mod_obj.browse(cr, uid, data_id[0])
view_id = data.res_id
seq_id = obj_sequence.search(cr,uid,[('name','=','Account Journal')])[0]
if seq_journal:
@@ -405,10 +391,12 @@ class account_installer(osv.osv_memory):
obj_ac_fp.create(cr, uid, vals_acc)
def execute(self, cr, uid, ids, context=None):
if context is None:
context = {}
super(account_installer, self).execute(cr, uid, ids, context=context)
record = self.browse(cr, uid, ids, context=context)[0]
company_id = self.pool.get('res.users').browse(cr,uid,[uid],context)[0].company_id
for res in self.read(cr,uid,ids):
company_id = self.pool.get('res.users').browse(cr, uid, [uid], context)[0].company_id
for res in self.read(cr, uid, ids):
if record.charts == 'configurable':
mod_obj = self.pool.get('ir.model.data')
fp = tools.file_open(opj('account','configurable_account_chart.xml'))
@@ -501,20 +489,46 @@ class account_installer(osv.osv_memory):
'Installing chart of accounts %s'%chart)
return modules | set([chart])
account_installer()
class account_bank_accounts_wizard(osv.osv_memory):
_name='account.bank.accounts.wizard'
_columns = {
'acc_name':fields.char('Account Name.', size=64, required=True),
'bank_account_id':fields.many2one('wizard.multi.charts.accounts', 'Bank Account', required=True),
'currency_id':fields.many2one('res.currency', 'Currency'),
'account_type':fields.selection([('cash','Cash'),('check','Check'),('bank','Bank')], 'Type', size=32),
'acc_name': fields.char('Account Name.', size=64, required=True),
'bank_account_id': fields.many2one('wizard.multi.charts.accounts', 'Bank Account', required=True),
'currency_id': fields.many2one('res.currency', 'Currency'),
'account_type': fields.selection([('cash','Cash'),('check','Check'),('bank','Bank')], 'Type', size=32),
}
_defaults = {
'currency_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.currency_id.id,
}
account_bank_accounts_wizard()
class account_installer_modules(osv.osv_memory):
_name = 'account.installer.modules'
_inherit = 'res.config.installer'
_columns = {
# Accounting
'account_analytic_plans':fields.boolean('Multiple Analytic Plans',
help="Allows invoice lines to impact multiple analytic accounts "
"simultaneously."),
'account_payment':fields.boolean('Suppliers Payment Management',
help="Streamlines invoice payment and creates hooks to plug "
"automated payment systems in."),
'account_followup':fields.boolean('Followups Management',
help="Helps you generate reminder letters for unpaid invoices, "
"including multiple levels of reminding and customized "
"per-partner policies."),
'account_voucher':fields.boolean('Voucher Management',
help="Account Voucher module includes all the basic requirements of "
"Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc... "),
'account_voucher_payment':fields.boolean('Voucher and Reconcile Management',
help="Extension Account Voucher module includes allows to link payment / receipt "
"entries with voucher, also automatically reconcile during the payment and receipt entries."),
}
account_installer_modules()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+43 -37
View File
@@ -393,21 +393,23 @@ class account_invoice(osv.osv):
p = self.pool.get('res.partner').browse(cr, uid, partner_id)
if company_id:
if p.property_account_receivable.company_id.id != company_id and p.property_account_payable.company_id.id != company_id:
rec_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(partner_id)+''),('company_id','=',company_id)])
pay_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_payable'),('res_id','=','res.partner,'+str(partner_id)+''),('company_id','=',company_id)])
property_obj = self.pool.get('ir.property')
rec_pro_id = property_obj.search(cr,uid,[('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(partner_id)+''),('company_id','=',company_id)])
pay_pro_id = property_obj.search(cr,uid,[('name','=','property_account_payable'),('res_id','=','res.partner,'+str(partner_id)+''),('company_id','=',company_id)])
if not rec_pro_id:
rec_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_receivable'),('company_id','=',company_id)])
rec_pro_id = property_obj.search(cr,uid,[('name','=','property_account_receivable'),('company_id','=',company_id)])
if not pay_pro_id:
pay_pro_id = self.pool.get('ir.property').search(cr,uid,[('name','=','property_account_payable'),('company_id','=',company_id)])
rec_line_data = self.pool.get('ir.property').read(cr,uid,rec_pro_id,['name','value','res_id'])
pay_line_data = self.pool.get('ir.property').read(cr,uid,pay_pro_id,['name','value','res_id'])
pay_pro_id = property_obj.search(cr,uid,[('name','=','property_account_payable'),('company_id','=',company_id)])
rec_line_data = property_obj.read(cr,uid,rec_pro_id,['name','value','res_id'])
pay_line_data = property_obj.read(cr,uid,pay_pro_id,['name','value','res_id'])
rec_res_id = rec_line_data and int(rec_line_data[0]['value'].split(',')[1]) or False
pay_res_id = pay_line_data and int(pay_line_data[0]['value'].split(',')[1]) or False
if not rec_res_id and not pay_res_id:
raise osv.except_osv(_('Configration Error !'),
_('Can not find account chart for this company, Please Create account.'))
rec_obj_acc=self.pool.get('account.account').browse(cr, uid, [rec_res_id])
pay_obj_acc=self.pool.get('account.account').browse(cr, uid, [pay_res_id])
account_obj = self.pool.get('account.account')
rec_obj_acc = account_obj.browse(cr, uid, [rec_res_id])
pay_obj_acc = account_obj.browse(cr, uid, [pay_res_id])
p.property_account_receivable = rec_obj_acc[0]
p.property_account_payable = pay_obj_acc[0]
@@ -487,17 +489,18 @@ class account_invoice(osv.osv):
partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id)
if partner_obj.property_account_payable and partner_obj.property_account_receivable:
if partner_obj.property_account_payable.company_id.id != company_id and partner_obj.property_account_receivable.company_id.id != company_id:
rec_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
pay_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_payable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
property_obj = self.pool.get('ir.property')
rec_pro_id = property_obj.search(cr, uid, [('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
pay_pro_id = property_obj.search(cr, uid, [('name','=','property_account_payable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
if not rec_pro_id:
rec_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_receivable'),('company_id','=',company_id)])
rec_pro_id = property_obj.search(cr, uid, [('name','=','property_account_receivable'),('company_id','=',company_id)])
if not pay_pro_id:
pay_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_payable'),('company_id','=',company_id)])
rec_line_data = self.pool.get('ir.property').read(cr, uid, rec_pro_id, ['name','value','res_id'])
pay_line_data = self.pool.get('ir.property').read(cr, uid, pay_pro_id, ['name','value','res_id'])
pay_pro_id = property_obj.search(cr, uid, [('name','=','property_account_payable'),('company_id','=',company_id)])
rec_line_data = property_obj.read(cr, uid, rec_pro_id, ['name','value','res_id'])
pay_line_data = property_obj.read(cr, uid, pay_pro_id, ['name','value','res_id'])
rec_res_id = rec_line_data and int(rec_line_data[0]['value'].split(',')[1]) or False
pay_res_id = pay_line_data and int(pay_line_data[0]['value'].split(',')[1]) or False
if not rec_res_id and not rec_res_id:
if not rec_res_id and not pay_res_id:
raise osv.except_osv(_('Configration Error !'),
_('Can not find account chart for this company, Please Create account.'))
if type in ('out_invoice', 'out_refund'):
@@ -505,13 +508,14 @@ class account_invoice(osv.osv):
else:
acc_id = pay_res_id
val= {'account_id': acc_id}
account_obj = self.pool.get('account.account')
if ids:
if company_id:
inv_obj = self.browse(cr,uid,ids)
for line in inv_obj[0].invoice_line:
if line.account_id:
if line.account_id.company_id.id != company_id:
result_id = self.pool.get('account.account').search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)])
result_id = account_obj.search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)])
if not result_id:
raise osv.except_osv(_('Configration Error !'),
_('Can not find account chart for this company in invoice line account, Please Create account.'))
@@ -519,7 +523,7 @@ class account_invoice(osv.osv):
else:
if invoice_line:
for inv_line in invoice_line:
obj_l = self.pool.get('account.account').browse(cr, uid, inv_line[2]['account_id'])
obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id'])
if obj_l.company_id.id != company_id:
raise osv.except_osv(_('Configration Error !'),
_('invoice line account company is not match with invoice company.'))
@@ -1281,20 +1285,23 @@ class account_invoice_line(osv.osv):
else:
return {'value': {'price_unit': 0.0, 'categ_id': False}, 'domain':{'product_uom':[]}}
part = self.pool.get('res.partner').browse(cr, uid, partner_id)
fpos = fposition_id and self.pool.get('account.fiscal.position').browse(cr, uid, fposition_id) or False
fpos_obj = self.pool.get('account.fiscal.position')
fpos = fposition_id and fpos_obj.browse(cr, uid, fposition_id) or False
if part.lang:
context.update({'lang': part.lang})
result = {}
res = self.pool.get('product.product').browse(cr, uid, product, context=context)
if company_id:
in_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_income'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
property_obj = self.pool.get('ir.property')
account_obj = self.pool.get('account.account')
in_pro_id = property_obj.search(cr, uid, [('name','=','property_account_income'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
if not in_pro_id:
in_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_income_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
exp_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_expense'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
in_pro_id = property_obj.search(cr, uid, [('name','=','property_account_income_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
exp_pro_id = property_obj.search(cr, uid, [('name','=','property_account_expense'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
if not exp_pro_id:
exp_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_expense_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
exp_pro_id = property_obj.search(cr, uid, [('name','=','property_account_expense_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
if not in_pro_id:
in_acc = res.product_tmpl_id.property_account_income
@@ -1304,7 +1311,7 @@ class account_invoice_line(osv.osv):
else:
app_acc_in = in_acc_cate
else:
app_acc_in = self.pool.get('account.account').browse(cr, uid, in_pro_id)[0]
app_acc_in = account_obj.browse(cr, uid, in_pro_id)[0]
if not exp_pro_id:
ex_acc = res.product_tmpl_id.property_account_expense
ex_acc_cate = res.categ_id.property_account_expense_categ
@@ -1313,7 +1320,7 @@ class account_invoice_line(osv.osv):
else:
app_acc_exp = ex_acc_cate
else:
app_acc_exp = self.pool.get('account.account').browse(cr, uid, exp_pro_id)[0]
app_acc_exp = account_obj.browse(cr, uid, exp_pro_id)[0]
if not in_pro_id and not exp_pro_id:
in_acc = res.product_tmpl_id.property_account_income
in_acc_cate = res.categ_id.property_account_income_categ
@@ -1329,13 +1336,13 @@ class account_invoice_line(osv.osv):
# app_acc_in = self.pool.get('account.account').browse(cr,uid,in_pro_id)[0]
# app_acc_exp = self.pool.get('account.account').browse(cr,uid,exp_pro_id)[0]
if app_acc_in.company_id.id != company_id and app_acc_exp.company_id.id != company_id:
in_res_id=self.pool.get('account.account').search(cr, uid, [('name','=',app_acc_in.name),('company_id','=',company_id)])
exp_res_id=self.pool.get('account.account').search(cr, uid, [('name','=',app_acc_exp.name),('company_id','=',company_id)])
in_res_id = account_obj.search(cr, uid, [('name','=',app_acc_in.name),('company_id','=',company_id)])
exp_res_id = account_obj.search(cr, uid, [('name','=',app_acc_exp.name),('company_id','=',company_id)])
if not in_res_id and not exp_res_id:
raise osv.except_osv(_('Configration Error !'),
_('Can not find account chart for this company, Please Create account.'))
in_obj_acc=self.pool.get('account.account').browse(cr, uid, in_res_id)
exp_obj_acc=self.pool.get('account.account').browse(cr, uid, exp_res_id)
in_obj_acc = account_obj.browse(cr, uid, in_res_id)
exp_obj_acc = account_obj.browse(cr, uid, exp_res_id)
if in_acc or ex_acc:
res.product_tmpl_id.property_account_income = in_obj_acc[0]
res.product_tmpl_id.property_account_expense = exp_obj_acc[0]
@@ -1344,26 +1351,26 @@ class account_invoice_line(osv.osv):
res.categ_id.property_account_expense_categ = exp_obj_acc[0]
if type in ('out_invoice','out_refund'):
a = res.product_tmpl_id.property_account_income.id
a = res.product_tmpl_id.property_account_income.id
if not a:
a = res.categ_id.property_account_income_categ.id
else:
a = res.product_tmpl_id.property_account_expense.id
a = res.product_tmpl_id.property_account_expense.id
if not a:
a = res.categ_id.property_account_expense_categ.id
a = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, a)
a = fpos_obj.map_account(cr, uid, fpos, a)
if a:
result['account_id'] = a
taxep=None
taxep = None
tax_obj = self.pool.get('account.tax')
if type in ('out_invoice', 'out_refund'):
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a).tax_ids or False)
tax_id = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
else:
taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a).tax_ids or False)
tax_id = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
if type in ('in_invoice', 'in_refund'):
to_update = self.product_id_change_unit_price_inv(cr, uid, tax_id, price_unit or res.standard_price, qty, address_invoice_id, product, partner_id, context=context)
result.update(to_update)
@@ -1380,11 +1387,10 @@ class account_invoice_line(osv.osv):
if res2 :
domain = {'uos_id':[('category_id','=',res2 )]}
prod_pool=self.pool.get('product.product')
result['categ_id'] = res.categ_id.id
res_final = {'value':result, 'domain':domain}
if not company_id and not currency_id:
if not company_id or not currency_id:
return res_final
company = self.pool.get('res.company').browse(cr, uid, company_id)
@@ -48,7 +48,6 @@
-
!record {model: account.move.journal, id: account_move_journal_0}:
journal_id: account.sales_journal
period_id: account_period_jan11
-
I clicked on Open Journal Button to check the entries
@@ -8,11 +8,11 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Journal Select">
<label string="Are you sure you want to open Journal Entries?" colspan="4"/>
<separator string="" colspan="4" />
<label string="Are you sure you want to open Journal Entries?" colspan="4"/>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="action_open_window" type="object"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="action_open_window" type="object"/>
</group>
</form>
</field>
+112 -41
View File
@@ -26,23 +26,82 @@ import tools
class account_move_journal(osv.osv_memory):
_name = "account.move.journal"
_description = "Move journal"
_columns = {
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
'period_id': fields.many2one('account.period', 'Period', required=True),
}
def _get_period(self, cr, uid, context={}):
"""Return default account period value"""
"""
Return default account period value
"""
ids = self.pool.get('account.period').find(cr, uid, context=context)
period_id = False
if len(ids):
period_id = ids[0]
return period_id
_defaults = {
'period_id': _get_period
}
def _get_journal(self, cr, uid, context={}):
"""
Return journal based on the journal type
"""
journal_id = False
journal_pool = self.pool.get('account.journal')
if context.get('journal_type', False):
jids = journal_pool.search(cr, uid, [('type','=', context.get('journal_type'))])
journal_id = jids[0]
return journal_id
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
"""
Returns views and fields for current model where view will depend on {view_type}.
@param cr: A database cursor
@param user: ID of the user currently logged in
@param view_id: list of fields, which required to read signatures
@param view_type: defines a view type. it can be one of (form, tree, graph, calender, gantt, search, mdx)
@param context: context arguments, like lang, time zone
@param toolbar: contains a list of reports, wizards, and links related to current model
@return: Returns a dict that contains definition for fields, views, and toolbars
"""
res = super(account_move_journal, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu)
if not view_id:
return res
period_pool = self.pool.get('account.period')
journal_pool = self.pool.get('account.journal')
journal_id = self._get_journal(cr, uid, context)
period_id = self._get_period(cr, uid, context)
journal = False
if journal_id:
journal = journal_pool.read(cr, uid, [journal_id], ['name'])[0]['name']
else:
journal = "All"
period = False
if period_id:
period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name']
view = """<?xml version="1.0" encoding="utf-8"?>
<form string="Standard entries">
<separator string="Open a Journal Items" colspan="4"/>
<group colspan="4" >
<label width="300" string="Going to open a %s Journal(s) for %s Period"/>
</group>
<group colspan="4" col="4">
<label string ="" colspan="2"/>
<button icon="terp-gtk-go-back-rtl" string="Ok" name="action_open_window" type="object"/>
</group>
</form>""" % (str(journal), str(period))
res.update({
'arch':view
})
return res
def action_open_window(self, cr, uid, ids, context=None):
"""
This function Open action move line window on given period and Journal/Payment Mode
@@ -50,48 +109,60 @@ class account_move_journal(osv.osv_memory):
@param uid: the current user’s ID for security checks,
@param ids: account move journal’s ID or list of IDs
@return: dictionary of Open action move line window on given period and Journal/Payment Mode
"""
jp = self.pool.get('account.journal.period')
mod_obj = self.pool.get('ir.model.data')
period_pool = self.pool.get('account.journal.period')
data_pool = self.pool.get('ir.model.data')
journal_pool = self.pool.get('account.journal')
if context is None:
context = {}
data = self.read(cr, uid, ids, ['journal_id', 'period_id'], context=context)[0]
cr.execute('select id,name from ir_ui_view where model=%s and type=%s', ('account.move.line', 'form'))
view_res = cr.fetchone()
journal_id = data['journal_id']
period_id = data['period_id']
ids = jp.search(cr, uid, [('journal_id', '=', journal_id), \
('period_id', '=', period_id)],context=context)
if not len(ids):
name = self.pool.get('account.journal').read(cr, uid, [journal_id])[0]['name']
state = self.pool.get('account.period').read(cr, uid, [period_id])[0]['state']
if state == 'done':
raise osv.except_osv(_('UserError'), _('This period is already closed !'))
company = self.pool.get('account.period').read(cr, uid, [period_id])[0]['company_id'][0]
jp.create(cr, uid, {'name': name, 'period_id': period_id, 'journal_id': journal_id, 'company_id': company},context=context)
ids = jp.search(cr, uid, [('journal_id', '=', journal_id), ('period_id', '=', period_id)],context=context)
jp = jp.browse(cr, uid, ids, context=context)[0]
name = (jp.journal_id.code or '') + ':' + (jp.period_id.code or '')
result = mod_obj._get_id(cr, uid, 'account', 'view_account_move_line_filter')
res = mod_obj.read(cr, uid, result, ['res_id'],context=context)
journal_id = self._get_journal(cr, uid, context)
period_id = self._get_period(cr, uid, context)
name = _("Journal Items")
if journal_id:
ids = period_pool.search(cr, uid, [('journal_id', '=', journal_id), ('period_id', '=', period_id)], context=context)
if not len(ids):
journal = journal_pool.browse(cr, uid, journal_id)
period = self.pool.get('account.period').browse(cr, uid, period_id)
name = journal.name
state = period.state
if state == 'done':
raise osv.except_osv(_('UserError'), _('This period is already closed !'))
company = period.company_id.id
res = {
'name': name,
'period_id': period_id,
'journal_id': journal_id,
'company_id': company
}
period_pool.create(cr, uid, res,context=context)
ids = period_pool.search(cr, uid, [('journal_id', '=', journal_id), ('period_id', '=', period_id)],context=context)
period = period_pool.browse(cr, uid, ids[0], context=context)
name = (period.journal_id.code or '') + ':' + (period.period_id.code or '')
result = data_pool._get_id(cr, uid, 'account', 'view_account_move_line_filter')
res_id = data_pool.browse(cr, uid, result, context=context).res_id
return {
'domain': "[('journal_id','=',%d), ('period_id','=',%d)]" % (journal_id, period_id),
# 'domain': str([('journal_id', '=', journal_id), ('period_id', '=', period_id)]),
'name': name,
'view_type': 'form',
'view_mode': 'tree,form',
'view_mode': 'tree,form,graph',
'res_model': 'account.move.line',
'view_id': view_res,
'context': "{'journal_id': %d, 'period_id': %d}" % (journal_id, period_id),
'view_id': False,
'context': "{'journal_id': %d, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (journal_id, journal_id, period_id),
'type': 'ir.actions.act_window',
'search_view_id': res['res_id']
}
'search_view_id': res_id
}
account_move_journal()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -2,40 +2,72 @@
<openerp>
<data>
<record id="view_account_move_journal_form" model="ir.ui.view">
<record id="view_account_move_journal_form" model="ir.ui.view">
<field name="name">account.move.journal.form</field>
<field name="model">account.move.journal</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Standard entries">
<group colspan="4" >
<field name="journal_id"/>
<newline/>
<field name="period_id" />
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-gtk-go-back-rtl" string="Open Journal" name="action_open_window" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_account_move_journal_line_form" model="ir.actions.act_window">
<field name="name">Entries by Line</field>
<record id="action_account_moves_sale" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.journal</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_move_journal_form"/>
<field name="target">new</field>
<field name="view_id" ref="view_account_move_journal_form"/>
<field name="context">{'journal_type':'sale'}</field>
<field name="target">new</field>
</record>
<menuitem action="action_account_moves_sale" sequence="4" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables" icon="STOCK_JUSTIFY_FILL"/>
<record id="action_account_moves_purchase_refund" model="ir.actions.act_window">
<field name="name">Journal Refund Items</field>
<field name="res_model">account.move.journal</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_account_move_journal_form"/>
<field name="context">{'journal_type':'purchase_refund'}</field>
<field name="target">new</field>
</record>
<menuitem action="action_account_moves_purchase_refund" sequence="5" id="menu_eaction_account_moves_purchase_refund" parent="menu_finance_receivables" icon="STOCK_JUSTIFY_FILL"/>
<record id="action_account_moves_purchase" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.journal</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_account_move_journal_form"/>
<field name="context">{'journal_type':'purchase'}</field>
<field name="target">new</field>
</record>
<menuitem action="action_account_moves_purchase" sequence="4" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables" icon="STOCK_JUSTIFY_FILL"/>
<record id="action_account_moves_sale_refund" model="ir.actions.act_window">
<field name="name">Journal Refund Items</field>
<field name="res_model">account.move.journal</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_account_move_journal_form"/>
<field name="context">{'journal_type':'sale_refund'}</field>
<field name="target">new</field>
</record>
<menuitem action="action_account_moves_sale_refund" sequence="5" id="menu_eaction_account_moves_sale_refund" parent="menu_finance_payables" icon="STOCK_JUSTIFY_FILL"/>
<record id="action_account_moves_all" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.journal</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_account_move_journal_form"/>
<field name="context">{'journal_type':'bank'}</field>
<field name="target">new</field>
</record>
<!-- <menuitem icon="STOCK_JUSTIFY_FILL"-->
<!-- action="action_account_move_journal_line_form"-->
<!-- id="menu_action_move_journal_line_form"-->
<!-- parent="account.menu_finance_entries" sequence="5" />-->
<menuitem
action="action_account_moves_all"
icon="STOCK_JUSTIFY_FILL"
id="menu_eaction_account_moves_all"
parent="account.menu_finance_entries"
sequence="4"
/>
</data>
</openerp>
</openerp>
@@ -37,7 +37,7 @@
<field name="view_id" ref="account_aged_balance_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
<field name="help">Aged Partner Balance is a more detailed report of your receivables by intervals. When opening that report, Open ERP asks for the name of the company, the fiscal period and the size of the interval to be analyzed (in days). Open ERP then calculates a table of credit balance by period. So if you request an interval of 30 days OpenERP generates an analysis of creditors for the past month, past two months, and so on. </field>
<field name="help">Aged Partner Balance is a more detailed report of your receivables by intervals. When opening that report, OpenERP asks for the name of the company, the fiscal period and the size of the interval to be analyzed (in days). OpenERP then calculates a table of credit balance by period. So if you request an interval of 30 days OpenERP generates an analysis of creditors for the past month, past two months, and so on. </field>
</record>
<menuitem icon="STOCK_PRINT"
+2 -2
View File
@@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Period">
<field name="company_id" groups="base.group_multi_company"/>
<field name="company_id" groups="base.group_multi_company" widget='selection'/>
<newline/>
<field name="based_on"/>
<newline/>
@@ -28,7 +28,7 @@
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="help">This menu print a VAT declaration based on invoices or payments. You can select one or several periods of the fiscal year. Information required for a tax declaration is automatically generated by Open ERP from invoices (or payments, in some countries). This data is updated in real time. That’s very useful because it enables you to preview at any time the tax that you owe at the start and end of the month or quarter.</field>
<field name="help">This menu print a VAT declaration based on invoices or payments. You can select one or several periods of the fiscal year. Information required for a tax declaration is automatically generated by OpenERP from invoices (or payments, in some countries). This data is updated in real time. That’s very useful because it enables you to preview at any time the tax that you owe at the start and end of the month or quarter.</field>
</record>
<menuitem
@@ -214,12 +214,13 @@ class account_coda_import(osv.osv_memory):
reconcile_id = statement_reconcile_obj.create(cr, uid, {
'line_ids': [(6, 0, rec_id)]
}, context=context)
if mv.partner_id:
line['partner_id'] = mv.partner_id.id
if line['amount'] < 0 :
line['account_id'] = mv.partner_id.property_account_payable.id
else :
line['account_id'] = mv.partner_id.property_account_receivable.id
mv = pool.get('account.move.line').browse(cr, uid, rec_id[0], context=context)
if mv.partner_id:
line['partner_id'] = mv.partner_id.id
if line['amount'] < 0 :
line['account_id'] = mv.partner_id.property_account_payable.id
else :
line['account_id'] = mv.partner_id.property_account_receivable.id
str_not1 = ''
if line.has_key('contry_name') and line.has_key('cntry_number'):
str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"], line["cntry_number"], line["free_comm"]+line['extra_note'], line["val_date"][0], line["entry_date"][0])
@@ -58,7 +58,7 @@
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<field name="product_id" position="replace">
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id,{'price_type':parent.price_type})"/>
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id,{'company_id': parent.company_id, 'price_type':parent.price_type})"/>
</field>
</field>
</record>
+1 -1
View File
@@ -25,7 +25,7 @@
<group colspan="4" height="450" width="600">
<group colspan="4">
<field name="ebook" nolabel="1"/>
<label align="0.0" string="I want to receive the Open ERP ebook (PDF) by email." colspan="3"/>
<label align="0.0" string="I want to receive the OpenERP ebook (PDF) by email." colspan="3"/>
<field name="updates" nolabel="1"/>
<label align="0.0" string="Yes, I would like to receive information updates from OpenERP." colspan="3"/>
</group>
+2 -1
View File
@@ -6,6 +6,7 @@
<field name="name">Opportunities</field>
<field name="model">crm.lead</field>
<field name="type">form</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<form string="Opportunities">
<group colspan="4" col="7">
@@ -68,7 +69,7 @@
<separator colspan="4"/>
<group col="10" colspan="4">
<field name="state"/>
<button name="case_reset" string="Reset to New"
<button name="case_reset" string="Reset to Draft"
states="done,cancel" type="object"
icon="gtk-convert" />
<button name="case_open" string="Open"
+3 -5
View File
@@ -129,7 +129,7 @@ class hr_employee(osv.osv):
'parent_id': fields.related('department_id', 'manager_id', relation='hr.employee', string='Manager', type='many2one', store=True, select=True),
'category_ids': fields.many2many('hr.employee.category', 'employee_category_rel','category_id','emp_id','Category'),
'child_ids': fields.one2many('hr.employee', 'parent_id', 'Subordinates'),
'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade'),
'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade', required=True),
'coach_id': fields.many2one('hr.employee', 'Coach'),
'job_id': fields.many2one('hr.job', 'Job'),
'photo': fields.binary('Photo')
@@ -148,11 +148,9 @@ class hr_employee(osv.osv):
}
def _check_recursion(self, cr, uid, ids, context=None):
if context is None:
context = {}
level = 100
while len(ids):
cr.execute('select distinct parent_id from hr_employee where id IN %s',(tuple(ids),))
cr.execute('SELECT DISTINCT parent_id FROM hr_employee WHERE id IN %s AND parent_id!=id',(tuple(ids),))
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
if not level:
return False
@@ -177,4 +175,4 @@ class hr_department(osv.osv):
hr_department()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+4 -2
View File
@@ -120,8 +120,10 @@ class res_users(osv.osv):
obj_dept = self.pool.get('hr.department')
for user_id in ids:
emp_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id', '=', user_id)])
cr.execute('SELECT emp.department_id FROM hr_employee AS emp JOIN resource_resource AS res ON res.id = emp.resource_id \
WHERE res.user_id = %s AND emp.department_id IS NOT NULL', (user_id,))
cr.execute('SELECT emp.department_id FROM hr_employee AS emp \
JOIN resource_resource AS res ON res.id = emp.resource_id \
JOIN hr_department as dept ON dept.id = emp.department_id \
WHERE res.user_id = %s AND emp.department_id IS NOT NULL AND dept.manager_id IS NOT NULL', (user_id,))
ids_dept = [x[0] for x in cr.fetchall()]
# ids_dept = obj_dept.search(cr, uid, [('member_ids', 'in', [user_id])], context=context)
parent_ids = []
+1 -1
View File
@@ -286,7 +286,7 @@ class hr_evaluation_interview(osv.osv):
_inherits = {'survey.request': 'request_id'}
_description = 'Evaluation Interview'
_columns = {
'request_id': fields.many2one('survey.request','Request_id', ondelete='cascade'),
'request_id': fields.many2one('survey.request','Request_id', ondelete='cascade', required=True),
'user_to_review_id': fields.many2one('hr.employee', 'Employee to Interview'),
'evaluation_id': fields.many2one('hr_evaluation.evaluation', 'Evaluation Type'),
}
+1 -1
View File
@@ -327,7 +327,7 @@ class hr_holidays(osv.osv):
}
self._create_resource_leave(cr, uid, vals)
elif record.holiday_type == 'category' and record.type == 'remove':
emp_ids = obj_emp.search(cr, uid, [('category_id', '=', record.category_id.id)])
emp_ids = obj_emp.search(cr, uid, [('category_ids', '=', record.category_id.id)])
for emp in obj_emp.browse(cr, uid, emp_ids):
vals = {
'name': record.name,
+20 -1
View File
@@ -36,6 +36,18 @@
</record>
<!-- Holidays: Leave Request -->
<record id="view_holiday_new_calendar" model="ir.ui.view">
<field name="name">Leave Request</field>
<field name="model">hr.holidays</field>
<field name="type">calendar</field>
<field name="arch" type="xml">
<calendar string="Leave Request" color="name" date_start="date_from" date_stop="date_to">
<field name="holiday_status_id"/>
</calendar>
</field>
</record>
<record model="ir.ui.view" id="edit_holiday_new">
<field name="name">Leave Request</field>
<field name="model">hr.holidays</field>
@@ -272,6 +284,13 @@
<field name="act_window_id" ref="open_ask_holidays"/>
</record>
<record model="ir.actions.act_window.view" id="action_open_ask_holidays_calendar">
<field name="sequence" eval="3"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="view_holiday_new_calendar"/>
<field name="act_window_id" ref="open_ask_holidays"/>
</record>
<menuitem name="Leave Requests" parent="menu_open_ask_holidays" id="menu_open_ask_holidays_new"
action="open_ask_holidays"/>
@@ -358,7 +377,7 @@
</record>
<menuitem sequence="3" id="hr.menu_open_view_attendance_reason_config" parent="hr.menu_hr_configuration" name="Leaves" groups="base.group_system"/>
<menuitem name="Leave Status"
<menuitem name="Leave Type"
action="open_view_holiday_status"
id="menu_open_view_holiday_status"
parent="hr.menu_open_view_attendance_reason_config"/>
+2 -2
View File
@@ -43,7 +43,7 @@ class hr_analytic_timesheet(osv.osv):
_inherits = {'account.analytic.line': 'line_id'}
_order = "id desc"
_columns = {
'line_id' : fields.many2one('account.analytic.line', 'Analytic line', ondelete='cascade'),
'line_id' : fields.many2one('account.analytic.line', 'Analytic line', ondelete='cascade', required=True),
'partner_id': fields.related('account_id', 'partner_id', type='many2one', string='Partner Id', relation='account.analytic.account', store=True),
}
@@ -160,4 +160,4 @@ class hr_analytic_timesheet(osv.osv):
}}
hr_analytic_timesheet()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+23 -1
View File
@@ -44,6 +44,28 @@ class mailgate_thread(osv.osv):
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', readonly=True),
}
def copy(self, cr, uid, id, default=None, context=None):
"""
Overrides orm copy method.
@param self: the object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param id: Id of mailgate thread
@param default: Dictionary of default values for copy.
@param context: A standard dictionary for contextual values
"""
if context is None:
context = {}
if default is None:
default = {}
default.update({
'message_ids': [],
'date_closed': False,
'date_open': False
})
return super(mailgate_thread, self).copy(cr, uid, id, default, context=context)
def message_new(self, cr, uid, msg, context):
raise Exception, _('Method is not implemented')
@@ -83,7 +105,7 @@ class mailgate_thread(osv.osv):
@param email_cc: Comma-Separated list of Carbon Copy Emails To addresse if any
@param email_bcc: Comma-Separated list of Blind Carbon Copy Emails To addresses if any
@param email_date: Email Date string if different from now, in server Timezone
@param details: Description, Ddtails of case history if any
@param details: Description, Details of case history if any
@param atach: Attachment sent in email
@param context: A standard dictionary for contextual values"""
if context is None:
@@ -41,13 +41,13 @@
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="object_name" ref="crm.model_crm_lead"/>
<field eval="0" name="use_sign"/>
<field name="def_body_text">Hello,Thanks for generous interest you have shown in the open ERP.Regards,OpenERP Team,</field>
<field name="def_body_text">Hello,Thanks for generous interest you have shown in the openERP.Regards,OpenERP Team,</field>
<field name="template_language">mako</field>
<field name="name">For OpenERP OnDemand Free Trial 2010</field>
<field name="model_int_name">crm.lead</field>
</record>
<record id="email_template_2" model="email.template">
<field name="def_subject">Propose to subscribe to the Open ERP Discovery Day on May 2010</field>
<field name="def_subject">Propose to subscribe to the OpenERP Discovery Day on May 2010</field>
<field name="def_to">info@tinyerp.com</field>
<field eval="[(6,0,[])]" name="allowed_groups"/>
<field model="ir.actions.act_window" name="ref_ir_act_window" search="[('name', '=', u'For OpenERP OnDemand Free Trial 2010 Mail Form')]"/>
@@ -55,46 +55,46 @@
<field name="object_name" ref="crm.model_crm_lead"/>
<field eval="0" name="use_sign"/>
<field name="def_body_text">Hello,We have very good offer that might suit you.
We propose you to subscribe to the Open ERP Discovery Day on May 2010.
We propose you to subscribe to the OpenERP Discovery Day on May 2010.
If any further information required kindly revert back.
We really appreciate your co-operation on this.
Regards,OpenERP Team,</field>
<field name="template_language">mako</field>
<field name="name">For Open ERP Discovery Day on May 2010</field>
<field name="name">For OpenERP Discovery Day on May 2010</field>
<field name="model_int_name">crm.lead</field>
</record>
<record id="email_template_3" model="email.template">
<field name="def_subject">Thanks for subscribing to the Open ERP Discovery Day</field>
<field name="def_subject">Thanks for subscribing to the OpenERP Discovery Day</field>
<field name="def_to">info@tinyerp.com</field>
<field eval="[(6,0,[])]" name="allowed_groups"/>
<field model="ir.actions.act_window" name="ref_ir_act_window" search="[('name', '=', u'For OpenERP OnDemand Free Trial 2010 Mail Form')]"/>
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="object_name" ref="crm.model_crm_lead"/>
<field eval="0" name="use_sign"/>
<field name="def_body_text">Hello,Thanks for showing intrest and for subscribing to the Open ERP Discovery Day.
<field name="def_body_text">Hello,Thanks for showing intrest and for subscribing to the OpenERP Discovery Day.
If any further information required kindly revert back.
I really appreciate your co-operation on this.
Regards,OpenERP Team,</field>
<field name="template_language">mako</field>
<field name="name">For Open ERP Discovery Day</field>
<field name="name">For OpenERP Discovery Day</field>
<field name="model_int_name">crm.lead</field>
</record>
<record id="email_template_4" model="email.template">
<field name="def_subject">Thanks for buying the Open ERP book</field>
<field name="def_subject">Thanks for buying the OpenERP book</field>
<field name="def_to">info@tinyerp.com</field>
<field eval="[(6,0,[])]" name="allowed_groups"/>
<field model="ir.actions.act_window" name="ref_ir_act_window" search="[('name', '=', u'For OpenERP OnDemand Free Trial 2010 Mail Form')]"/>
<field model="ir.values" name="ref_ir_value" search="[('name', '=', u'Send Mail (For OpenERP OnDemand Free Trial 2010)')]"/>
<field name="object_name" ref="crm.model_crm_lead"/>
<field eval="0" name="use_sign"/>
<field name="def_body_text">Hello,Thanks for showing intrest and buying the Open ERP book.
<field name="def_body_text">Hello,Thanks for showing intrest and buying the OpenERP book.
If any further information required kindly revert back.
I really appreciate your co-operation on this.
Regards,OpenERP Team,</field>
<field name="template_language">mako</field>
<field name="name">For Open ERP book</field>
<field name="name">For OpenERP book</field>
<field name="model_int_name">crm.lead</field>
</record>
@@ -203,20 +203,20 @@
</record>
<record id="marketing_campaign_activity_2" model="marketing.campaign.activity">
<field name="name">Propose to subscribe to the Open ERP Discovery Day on May 2010</field>
<field name="name">Propose to subscribe to the OpenERP Discovery Day on May 2010</field>
<field name="server_action_id" ref="action_dummy"/>
<field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_2"/>
</record>
<record id="marketing_campaign_activity_3" model="marketing.campaign.activity">
<field name="name">Thanks for subscribing to the Open ERP Discovery Day</field>
<field name="name">Thanks for subscribing to the OpenERP Discovery Day</field>
<field name="server_action_id" ref="action_dummy"/>
<field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_3"/>
</record>
<record id="marketing_campaign_activity_4" model="marketing.campaign.activity">
<field name="name">Propose to buy the Open ERP Book</field>
<field name="name">Propose to buy the OpenERP Book</field>
<field name="server_action_id" ref="action_dummy"/>
<field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="report_directory_id" ref="document_directory_campaign1"/>
@@ -225,7 +225,7 @@
</record>
<record id="marketing_campaign_activity_5" model="marketing.campaign.activity">
<field name="name">Thanks for buying the Open ERP book</field>
<field name="name">Thanks for buying the OpenERP book</field>
<field name="server_action_id" ref="action_dummy"/>
<field model="marketing.campaign" name="campaign_id" ref="marketing_campaign_openerpondemandfreetrial0"/>
<field name="email_template_id" ref="email_template_4"/>
+1 -1
View File
@@ -53,7 +53,7 @@ class mrp_workcenter(osv.osv):
help="Complete this only if you want automatic analytic accounting entries on production orders."),
'costs_journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal'),
'costs_general_account_id': fields.many2one('account.account', 'General Account', domain=[('type','<>','view')]),
'resource_id': fields.many2one('resource.resource','Resource',ondelete='cascade'),
'resource_id': fields.many2one('resource.resource','Resource', ondelete='cascade', required=True),
}
_defaults = {
'capacity_per_cycle': 1.0,
+2 -2
View File
@@ -769,7 +769,7 @@
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="view_mrp_production_filter"/>
<field name="context">{'search_default_Current':1}</field>
<field name="help">Manufacturing Orders describe the operations that need to be carried out and the raw materials usage for each stage of production. You use specifications (bills of materials) to work out the raw material requirements and the manufacturing orders needed for the finished products. Once the bills of materials have been defined, Open ERP becomes capable of automatically deciding on the manufacturing route depending on the needs of the company.</field>
<field name="help">Manufacturing Orders describe the operations that need to be carried out and the raw materials usage for each stage of production. You use specifications (bills of materials) to work out the raw material requirements and the manufacturing orders needed for the finished products. Once the bills of materials have been defined, OpenERP becomes capable of automatically deciding on the manufacturing route depending on the needs of the company.</field>
</record>
<menuitem action="mrp_production_action" id="menu_mrp_production_action" parent="menu_mrp_manufacturing" groups="base.group_system,mrp.group_mrp_user,mrp.group_mrp_manager" sequence="1"/>
@@ -780,7 +780,7 @@
<field name="view_type">form</field>
<field name="view_mode">gantt,tree,form,calendar,graph</field>
<field name="domain">[('state','in',('ready','confirmed','in_production'))]</field>
<field name="help">Manufacturing Orders describe the operations that need to be carried out and the raw materials usage for each stage of production. You use specifications (bills of materials or BoM) to work out the raw material requirements and the manufacturing orders needed for the finished products. Once the bills of materials have been defined, Open ERP becomes capable of automatically deciding on the manufacturing route depending on the needs of the company.</field>
<field name="help">Manufacturing Orders describe the operations that need to be carried out and the raw materials usage for each stage of production. You use specifications (bills of materials or BoM) to work out the raw material requirements and the manufacturing orders needed for the finished products. Once the bills of materials have been defined, OpenERP becomes capable of automatically deciding on the manufacturing route depending on the needs of the company.</field>
</record>
<record id="mrp_production_action2" model="ir.actions.act_window">
+1 -1
View File
@@ -7,7 +7,7 @@ CUSTOM CUBE FOR CRM
-->
<record model="olap.fact.database" id="fact_databases_BI">
<field name="name">Open ERP CRM Database</field>
<field name="name">OpenERP CRM Database</field>
<field name="db_name">crm</field>
<field name="db_login">postgres</field>
<field name="db_password">postgres</field>
+1 -1
View File
@@ -291,7 +291,7 @@ class pos_order(osv.osv):
'sale_manager': fields.many2one('res.users', 'Salesman Manager'),
'amount_tax': fields.function(_amount_all, method=True, string='Taxes', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
'amount_total': fields.function(_amount_total, method=True, string='Total'),
'amount_paid': fields.function(_amount_all, 'Paid', states={'draft': [('readonly', False)]}, readonly=True, method=True, digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
'amount_paid': fields.function(_amount_all, string='Paid', states={'draft': [('readonly', False)]}, readonly=True, method=True, digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
'amount_return': fields.function(_amount_all, 'Returned', method=True, digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True),
'price_type': fields.selection([
+1 -1
View File
@@ -202,7 +202,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_pos_order_tree"/>
<field name="domain">[('state','!=', 'invoiced')]</field>
<field name="domain">[('state','not in', ('invoiced','done')),('invoice_id','=',False)]</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="search_view_id" ref="view_pos_order_filter"/>
@@ -55,7 +55,7 @@ class pos_payment_report_date(report_sxw.rml_parse):
"where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id " \
"and po.state IN ('paid','invoiced') and po.date_order >= %s and po.date_order <= %s and po.user_id IN %s " \
,(dt1,dt2,tuple(form['user_id'])))
res=self.cr.fetchone()[0]
res=self.cr.fetchone()[0] or 0.0
return res
+4 -3
View File
@@ -22,15 +22,16 @@
</field>
</record>
<menuitem name="Cash Register" parent="point_of_sale.menu_point_root" id="menu_cash_register" sequence="4"/>
<menuitem name="Cash Register" parent="point_of_sale.menu_point_root" id="menu_cash_register"
sequence="4" groups="group_pos_manager"/>
<menuitem
<!--<menuitem
name="All Cash Registers"
parent="menu_cash_register"
action="account.action_view_bank_statement_tree"
id="menu_all_menu_cash_register"
sequence="4"
/>
/>-->
<record id="action_new_bank_statement_tree" model="ir.actions.act_window">
<field name="name">Cash Register</field>
+2 -2
View File
@@ -12,7 +12,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Add payment :">
<group colspan="4" width="600" height="230">
<group colspan="4" width="600" height="200">
<field name="journal"/>
<field name="amount" />
<field name="payment_date" />
@@ -20,7 +20,7 @@
<field name="invoice_wanted" />
<field name="num_sale" />
<field name="is_acc" />
<group attrs="{'readonly':[('is_acc','=',False)]}" colspan="4" col="2">
<group attrs="{'invisible':[('is_acc','=',False)]}" colspan="4" col="2">
<field name="product_id" attrs="{'required':[('is_acc', '=', True)]}" domain="[('type','=','service')]"/>
</group>
<newline/>
+1 -1
View File
@@ -140,7 +140,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','=','exception')]</field>
<field name="help"> For each customer order line or raw materials in a manufacturing order, there is a procurement form . In normal system use, procurement orders are automatically generated by Open ERP. But if there are configuration problems, the system can remain blocked by a procurement without generating a corresponding document. It is a procurement exception. Some problems are link to timing and will be correct automatically by the system. If there is no procurement rule, the exception must be corrected manually.</field>
<field name="help"> For each customer order line or raw materials in a manufacturing order, there is a procurement form . In normal system use, procurement orders are automatically generated by OpenERP. But if there are configuration problems, the system can remain blocked by a procurement without generating a corresponding document. It is a procurement exception. Some problems are link to timing and will be correct automatically by the system. If there is no procurement rule, the exception must be corrected manually.</field>
</record>
<record id="procurement_action4" model="ir.actions.act_window">
+1 -1
View File
@@ -429,7 +429,7 @@ class product_product(osv.osv):
'default_code' : fields.char('Reference', size=64),
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the product without removing it."),
'variants': fields.char('Variants', size=64),
'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=False),
'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade"),
'ean13': fields.char('EAN13', size=13),
'packaging' : fields.one2many('product.packaging', 'product_id', 'Logistical Units', help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."),
'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Sale Price')),
@@ -13,14 +13,6 @@
<act_window domain="[('user_id','=',uid),('state','&lt;&gt;','close')]" id="act_my_account" name="My accounts to invoice" res_model="account.analytic.account" view_id="view_account_analytic_simplified" view_mode="tree,form" view_type="form"/>
<!-- <record id="action_project_pipeline_user" model="ir.actions.act_window">-->
<!-- <field name="name">Pipeline of tasks</field>-->
<!-- <field name="res_model">report.task.user.pipeline.open</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">graph,tree</field>-->
<!-- <field name="domain">[('user_id','in',department_users_get())]</field>-->
<!-- </record>-->
<record id="board_project_manager_form" model="ir.ui.view">
<field name="name">board.project.manager.form</field>
<field name="model">board.board</field>
+11 -3
View File
@@ -21,7 +21,7 @@
from lxml import etree
import time
from datetime import date, datetime
from datetime import datetime, date
from tools.translate import _
from osv import fields, osv
@@ -163,7 +163,7 @@ class project(osv.osv):
'complete_name': fields.function(_complete_name, method=True, string="Project Name", type='char', size=250),
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the project without removing it."),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of Projects."),
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', help="Link this project to an analytic account if you need financial management on projects. It enables you to connect projects with budgets, planning, cost and revenue analysis, timesheets on projects, etc."),
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', help="Link this project to an analytic account if you need financial management on projects. It enables you to connect projects with budgets, planning, cost and revenue analysis, timesheets on projects, etc.", ondelete="cascade", required=True),
'priority': fields.integer('Sequence', help="Gives the sequence order when displaying a list of task"),
'warn_manager': fields.boolean('Warn Manager', help="If you check this field, the project manager will receive a request each time a task is completed by his team.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members', help="Project's member. Not used in any computation, just for information purpose.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
@@ -257,11 +257,19 @@ class project(osv.osv):
task_obj = self.pool.get('project.task')
result = []
for proj in self.browse(cr, uid, ids, context=context):
parent_id = context.get('parent_id', False) # check me where to pass context for parent id ??
parent_id = context.get('parent_id', False)
context.update({'analytic_project_copy': True})
new_date_start = time.strftime('%Y-%m-%d')
new_date_end = False
if proj.date_start and proj.date:
start_date = date(*time.strptime(proj.date_start,'%Y-%m-%d')[:3])
end_date = date(*time.strptime(proj.date,'%Y-%m-%d')[:3])
new_date_end = (datetime(*time.strptime(new_date_start,'%Y-%m-%d')[:3])+(end_date-start_date)).strftime('%Y-%m-%d')
new_id = project_obj.copy(cr, uid, proj.id, default = {
'name': proj.name +_(' (copy)'),
'state':'open',
'date_start':new_date_start,
'date':new_date_end,
'parent_id':parent_id}, context=context)
result.append(new_id)
cr.execute('select id from project_task where project_id=%s', (proj.id,))
+3 -3
View File
@@ -15,9 +15,9 @@
<field name="object">project.task</field>
</record>
<!--
Resource: project.project
-->
<!--
Resource: project.project
-->
<record id="all_projects_account" model="account.analytic.account">
<field name="name">Projects</field>
<field name="code">3</field>
+1 -1
View File
@@ -30,7 +30,7 @@
<!-- Projects -->
<record id="project_project_9" model="project.project">
<field name="warn_manager">1</field>
<field name="name">Open ERP Integration</field>
<field name="name">OpenERP Integration</field>
<field name="parent_id" ref="all_projects_account"/>
<field name="user_id" ref="base.user_root"/>
<field eval="[(6, 0, [ref('project_tt_specification'),ref('project_tt_development'),ref('project_tt_testing'),ref('project_tt_merge')])]" name="type_ids"/>
+3 -62
View File
@@ -19,16 +19,11 @@
#
##############################################################################
from mx import DateTime
from mx.DateTime import now
import time
import tools
import netsvc
import sys
from osv import fields, osv
import ir
from tools.translate import _
import sys
import tools
from tools.translate import _
try:
@@ -61,59 +56,6 @@ class project_gtd_timebox(osv.osv):
'icon': fields.selection(tools.icons, 'Icon', size=64),
}
# def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
# res = super(project_gtd_timebox,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
# if (res['type']=='form') and ('record_id' in context):
# if context['record_id']:
# rec = self.browse(cr, uid, int(context['record_id']), context)
# else:
# iids = self.search(cr,uid, [('user_id','=',uid),('parent_id','=',False)], context=context)
# if len(iids):
# rec = self.browse(cr, uid, int(iids[0]), context=context)
# else:
# return res
# res['arch'] = """
# <form string="Daily Timebox">
# <field name="name" readonly="1"/>
# <notebook position="top">
# """
# for i in range(1,7):
# if not getattr(rec, 'context%d_id'%i):
# continue
# res['arch']+= """
# <page string="%s">
# <field name="%s" colspan="4" nolabel="1">
# <tree editable="bottom" colors="grey:state in ('done','pending');red:state=='cancelled'" string="Tasks">
# <field name="name"/>
# """ % (getattr(rec, 'context%d_id'%(i,)).name.encode('utf-8'), 'task%d_ids'%(i,))
# if rec.col_project:
# res['arch'] += '<field name="project_id" required="1"/>\n'
# if rec.col_date_start:
# res['arch'] += '<field name="date_start"/>\n'
# if rec.col_priority:
# res['arch'] += '<field name="priority"/>\n'
# if rec.col_deadline:
# res['arch'] += '<field name="date_deadline"/>\n'
# if rec.col_planned_hours:
# res['arch'] += '<field name="planned_hours" widget="float_time" sum="Est. Hours"/>\n'
# if rec.col_effective_hours:
# res['arch'] += '<field name="effective_hours" widget="float_time" sum="%s"/>\n' % (_('Eff. Hours'),)
# res['arch'] += """
# <field name="state" readonly="1"/>
# </tree>
# </field>
# </page>
# """
# res['arch']+="""
# </notebook>
# </form>
# """
# doc = etree.XML(res['arch'])
# xarch, xfields = self._view_look_dom_arch(cr, uid, doc, view_id, context=context)
# res['arch'] = xarch
# res['fields'] = xfields
# return res
project_gtd_timebox()
class project_task(osv.osv):
@@ -173,7 +115,6 @@ class project_task(osv.osv):
tt = timebox_obj.browse(cr, uid, timebox_obj.search(cr,uid,[]))
search_extended ='''<newline/><group col="%d" expand="0" string="%s" groups="project_gtd.group_project_getting">''' % (len(tt)+7,_('Getting Things Done'))
search_extended += '''<filter domain="[('timebox_id','=', False)]" context="{'set_editable':True,'set_visible':True,'gtd_visible':True}" icon="gtk-new" string="%s"/>''' % (_('Inbox'),)
# search_extended += '''<filter domain="[('state', 'in', ('draft','open','pending'))]" context="{'set_editable':True,'set_visible':True,'gtd_visible':True}" icon="gtk-new" string="%s"/>''' % (_('Editable'),)
search_extended += '''<separator orientation="vertical"/>'''
for time in tt:
if time.icon:
@@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
from tools.translate import _
+1
View File
@@ -23,4 +23,5 @@
import project_issue
import report
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -1
View File
@@ -20,7 +20,6 @@
#
##############################################################################
{
'name': 'Issue Management in Project Management',
'version': '1.0',
@@ -54,4 +53,5 @@
'installable': True,
'active': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+6 -7
View File
@@ -23,7 +23,6 @@ import base64
import os
import re
import time
import mx.DateTime
from datetime import datetime, timedelta
import binascii
import collections
@@ -101,8 +100,8 @@ class project_issue(osv.osv, crm.crm_case):
date_until = issue.date_open
#Calculating no. of working hours to open the issue
hours = cal_obj.interval_hours_get(cr, uid, issue.project_id.resource_calendar_id.id,
mx.DateTime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'),
mx.DateTime.strptime(issue.date_open, '%Y-%m-%d %H:%M:%S'))
datetime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'),
datetime.strptime(issue.date_open, '%Y-%m-%d %H:%M:%S'))
elif field in ['working_hours_close','day_close']:
if issue.date_closed:
date_create = datetime.strptime(issue.create_date, "%Y-%m-%d %H:%M:%S")
@@ -111,8 +110,8 @@ class project_issue(osv.osv, crm.crm_case):
ans = date_close - date_create
#Calculating no. of working hours to close the issue
hours = cal_obj.interval_hours_get(cr, uid, issue.project_id.resource_calendar_id.id,
mx.DateTime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'),
mx.DateTime.strptime(issue.date_closed, '%Y-%m-%d %H:%M:%S'))
datetime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'),
datetime.strptime(issue.date_closed, '%Y-%m-%d %H:%M:%S'))
if ans:
resource_id = False
if issue.user_id:
@@ -122,9 +121,9 @@ class project_issue(osv.osv, crm.crm_case):
duration = float(ans.days)
if issue.project_id and issue.project_id.resource_calendar_id:
duration = float(ans.days) * 24
new_dates = cal_obj.interval_min_get(cr, uid, issue.project_id.resource_calendar_id.id, mx.DateTime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'), duration, resource=resource_id)
new_dates = cal_obj.interval_min_get(cr, uid, issue.project_id.resource_calendar_id.id, datetime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'), duration, resource=resource_id)
no_days = []
date_until = mx.DateTime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
date_until = datetime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
for in_time, out_time in new_dates:
if in_time.date not in no_days:
no_days.append(in_time.date)
@@ -1,3 +1,25 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields,osv
import tools
from crm import crm
@@ -126,8 +148,7 @@ class project_issue_report(osv.osv):
project_issue c
WHERE c.categ_id IN (select res_id from ir_model_data WHERE model = 'crm.case.categ' and name='bug_categ')
)""")
project_issue_report()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="group_project_supporter" model="res.groups">
<field name="name">Project / Support Manager</field>
</record>
<record id="group_project_supporter" model="res.groups">
<field name="name">Project / Support Manager</field>
</record>
</data>
</openerp>
+1
View File
@@ -21,4 +21,5 @@
##############################################################################
import project_issue_sheet
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -1
View File
@@ -20,7 +20,6 @@
#
##############################################################################
{
'name': 'Add the Timesheet support for Issue Management in Project Management',
'version': '1.0',
@@ -44,4 +43,5 @@
'installable': True,
'active': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -1
View File
@@ -46,7 +46,6 @@
],
"update_xml": [
"security/ir.model.access.csv",
"project_long_term_wizard.xml" ,
"wizard/project_schedule_tasks_view.xml",
"project_long_term_view.xml",
"project_long_term_workflow.xml",
@@ -58,4 +57,5 @@
'active': False,
'certificate': None,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -18,9 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from lxml import etree
import mx.DateTime
import time
from datetime import date, datetime, timedelta
from tools.translate import _
from osv import fields, osv
@@ -126,13 +126,12 @@ class project_phase(osv.osv):
def onchange_project(self, cr, uid, ids, project, context=None):
result = {}
result['date_start'] = False
project_obj = self.pool.get('project.project')
if project:
project_id = project_obj.browse(cr, uid, project, context=context)
if project_id.date_start:
result['date_start'] = mx.DateTime.strptime(project_id.date_start, "%Y-%m-%d").strftime('%Y-%m-%d')
return {'value': result}
return {'value': {'date_start': []}}
result['date_start'] = project_id.date_start
return {'value': result}
def _check_date_start(self, cr, uid, phase, date_end, context=None):
if context is None:
@@ -201,18 +200,17 @@ class project_phase(osv.osv):
calendar_id = cal_id
default_uom_id = self._get_default_uom_id(cr, uid)
avg_hours = uom_obj._compute_qty(cr, uid, phase.product_uom.id, phase.duration, default_uom_id)
# Change the date_start and date_end
# for previous and next phases respectively based on valid condition
if vals.get('date_start', False) and vals['date_start'] < phase.date_start:
dt_start = mx.DateTime.strptime(vals['date_start'], '%Y-%m-%d')
dt_start = datetime.strptime(vals['date_start'], '%Y-%m-%d')
work_times = resource_calendar_obj.interval_get(cr, uid, calendar_id, dt_start, avg_hours or 0.0, resource_id and resource_id[0] or False)
if work_times:
vals['date_end'] = work_times[-1][1].strftime('%Y-%m-%d')
for prv_phase in phase.previous_phase_ids:
self._check_date_start(cr, uid, prv_phase, dt_start, context=context)
if vals.get('date_end', False) and vals['date_end'] > phase.date_end:
dt_end = mx.DateTime.strptime(vals['date_end'],'%Y-%m-%d')
dt_end = datetime.strptime(vals['date_end'], '%Y-%m-%d')
work_times = resource_calendar_obj.interval_min_get(cr, uid, calendar_id, dt_end, avg_hours or 0.0, resource_id and resource_id[0] or False)
if work_times:
vals['date_start'] = work_times[0][0].strftime('%Y-%m-%d')
@@ -189,9 +189,6 @@
<field name="project_id" on_change="onchange_project(project_id)"/>
<field name="responsible_id"/>
<field name="date_start"/>
<!--<field name="date_end"/>
<field name="duration"/>
<field name="product_uom"/>-->
<field name="state"/>
</tree>
</field>
@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--<wizard id="wizard_compute_phase" menu="False" model="project.phase" name="wizard.compute.phases" string="Compute Phase Scheduling"/>-->
<!--<wizard id="wizard_schedule_task" menu="False" model="project.phase" name="phase.schedule.tasks" string="Schedule Tasks"/>-->
<!--<wizard id="wizard_compute_task" model="project.task" menu="False" name="wizard.compute.tasks" string="Compute Task Scheduling"/>-->
<!--<menuitem icon="terp-project" id="base.menu_main" name="Project Management" sequence="1"/>-->
<!--<menuitem id="base.menu_pm_planning" name="Planning" parent="base.menu_main" sequence="3"/>-->
<!-- <menuitem
action="wizard_compute_phase"
id="menu_wizard_compute_phase"
parent="base.menu_pm_planning"
type="wizard"
sequence="1"/>
-->
<!-- <menuitem
action="wizard_compute_task"
id="menu_wizard_compute_task"
parent="base.menu_pm_planning"
type="wizard"
sequence="1"/>
-->
</data>
</openerp>
@@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import datetime
from resource.faces import *
from new import classobj
@@ -139,4 +140,5 @@ class project_compute_tasks(osv.osv_memory):
return {}
project_compute_tasks()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import datetime
from resource.faces import *
from new import classobj
@@ -120,4 +120,5 @@ def compute_working_calendar(cr, uid, calendar_id, context=None):
if non_working:
wktime_cal.append((non_working[:-1], time_range))
return wktime_cal
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1
View File
@@ -37,4 +37,5 @@
'installable': True,
'active': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+7 -7
View File
@@ -9,7 +9,7 @@
<field name="tasks">[24, 25, 28, 26, 27, 29, 30, 31, 32, 33, 34, 35, 37, 36, 38]</field>
<field model="res.users" name="manager" search="[('login','=','demo')]"/>
<field name="expected_hours">156.0</field>
<field name="name">Open ERP - dev branch</field>
<field name="name">OpenERP - dev branch</field>
<field model="res.users" name="product_owner_id" search="[('login','=','demo')]"/>
</record>
@@ -30,7 +30,7 @@
<field name="priority">3</field>
<field name="name">Automatic migration system</field>
<field name="expected_hours">6.0</field>
<field name="note">This new system will enable you to migrate automatically from an old version of Open ERP to a new one. This system will migrate not only the Open ERP system but also the customers particularities. This happens without any kind of script or programming. It has been possible to carry out such a system thanks to the descriptive approach of Open ERP components. </field>
<field name="note">This new system will enable you to migrate automatically from an old version of OpenERP to a new one. This system will migrate not only the OpenERP system but also the customers particularities. This happens without any kind of script or programming. It has been possible to carry out such a system thanks to the descriptive approach of OpenERP components. </field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="state">done</field>
<field name="project_id" ref="scrum_project_1"/>
@@ -39,7 +39,7 @@
<field name="priority">3</field>
<field name="name">New accounting module</field>
<field name="expected_hours">111.0</field>
<field name="note">The accounting module of Open ERP (financial accounting and management accounting) is being reshaped. New functionnalities will be added: intangible assets, a new way of presenting ledgers and bookings, new stock valuation calculation, and lots of predefined reports. </field>
<field name="note">The accounting module of OpenERP (financial accounting and management accounting) is being reshaped. New functionalities will be added: intangible assets, a new way of presenting ledgers and bookings, new stock valuation calculation, and lots of predefined reports. </field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="state">open</field>
<field name="project_id" ref="scrum_project_1"/>
@@ -48,7 +48,7 @@
<field name="priority">3</field>
<field name="name">Automated Plugin System to install/uninstall modules</field>
<field name="expected_hours">4.0</field>
<field name="note">We have to develop a plug-in system which will enable to install/remove modules. The basic version of Open ERP will include only the required minimum, and you will select the modules thanks to the plug-in manager. This allows you to limit your system to your real needs: quality management, localisations, project and service management, marketing campaigns, and so on... </field>
<field name="note">We have to develop a plug-in system which will enable to install/remove modules. The basic version of OpenERP will include only the required minimum, and you will select the modules thanks to the plug-in manager. This allows you to limit your system to your real needs: quality management, localisations, project and service management, marketing campaigns, and so on... </field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="state">open</field>
<field name="project_id" ref="scrum_project_1"/>
@@ -70,14 +70,14 @@
<record id="scrum_product_backlog_5" model="project.scrum.product.backlog">
<field name="name">Test for 3.2.0 Publishing</field>
<field name="expected_hours">5.0</field>
<field name="note">Test Open ERP to release stable 3.2.0 version. (may be 3.2.0-pre1 ?)</field>
<field name="note">Test OpenERP to release stable 3.2.0 version. (may be 3.2.0-pre1 ?)</field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="project_id" ref="scrum_project_1"/>
</record>
<record id="scrum_product_backlog_6" model="project.scrum.product.backlog">
<field name="name">Reshape the complete menu</field>
<field name="expected_hours">4.0</field>
<field name="note">Restructure the Open ERP menu to be more like others ERP.</field>
<field name="note">Restructure the OpenERP menu to be more like other ERPs.</field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="state">open</field>
<field name="project_id" ref="scrum_project_1"/>
@@ -223,7 +223,7 @@ Admin: Worked on the Automatic migration system
Demo: Worked on the Test 3.2.0 before releasing
</field>
<field name="question_today">
Admin:Work on Restructure the Open ERP menu to be more like others ERP.
Admin:Work on Restructure the OpenERP menu to be more like other ERPs.
Demo: Work on Editable trees</field>
<field name="question_blocks">
Demo :Bugfix - memory leak
+23 -21
View File
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import mx.DateTime
from datetime import datetime, timedelta
import time
import math
@@ -46,17 +46,18 @@ class resource_calendar(osv.osv):
res_leaves = resource_cal_leaves.read(cr, uid, resource_leave_ids, ['date_from', 'date_to'])
for leave in res_leaves:
dtf = mx.DateTime.strptime(leave['date_from'], '%Y-%m-%d %H:%M:%S')
dtt = mx.DateTime.strptime(leave['date_to'], '%Y-%m-%d %H:%M:%S')
dtf = datetime.strptime(leave['date_from'], '%Y-%m-%d %H:%M:%S')
dtt = datetime.strptime(leave['date_to'], '%Y-%m-%d %H:%M:%S')
no = dtt - dtf
[dt_leave.append((dtf + mx.DateTime.RelativeDateTime(days=x)).strftime('%Y-%m-%d')) for x in range(int(no.days + 1))]
[dt_leave.append((dtf + timedelta(days=x)).strftime('%Y-%m-%d')) for x in range(int(no.days + 1))]
dt_leave.sort()
return dt_leave
def interval_min_get(self, cr, uid, id, dt_from, hours, resource=False):
if not id:
return [(dt_from - mx.DateTime.RelativeDateTime(hours=int(hours)*3), dt_from)]
td = int(hours)*3
return [(dt_from - timedelta(hours=td), dt_from)]
dt_leave = self._get_leaves(cr, uid, id, resource)
dt_leave.reverse()
todo = hours
@@ -65,7 +66,7 @@ class resource_calendar(osv.osv):
maxrecur = 100
current_hour = dt_from.hour
while (todo>0) and maxrecur:
cr.execute("select hour_from,hour_to from resource_calendar_attendance where dayofweek='%s' and calendar_id=%s order by hour_from desc", (dt_from.day_of_week,id))
cr.execute("select hour_from,hour_to from resource_calendar_attendance where dayofweek='%s' and calendar_id=%s order by hour_from desc", (dt_from.weekday(),id))
for (hour_from,hour_to) in cr.fetchall():
leave_flag = False
if (hour_from<current_hour) and (todo>0):
@@ -75,17 +76,17 @@ class resource_calendar(osv.osv):
dt_check = dt_from.strftime('%Y-%m-%d')
for leave in dt_leave:
if dt_check == leave:
dt_check = mx.DateTime.strptime(dt_check,"%Y-%m-%d") - mx.DateTime.RelativeDateTime(days=1)
dt_check = datetime.strptime(dt_check, '%Y-%m-%d') + timedelta(days=1)
leave_flag = True
if leave_flag:
break
else:
d1 = mx.DateTime.DateTime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(hour_from)), int((hour_from%1) * 60))
d2 = mx.DateTime.DateTime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(m)), int((m%1) * 60))
d1 = datetime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(hour_from)), int((hour_from%1) * 60))
d2 = datetime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(m)), int((m%1) * 60))
result.append((d1, d2))
current_hour = hour_from
todo -= (m-hour_from)
dt_from -= mx.DateTime.RelativeDateTime(days=1)
dt_from -= timedelta(days=1)
current_hour = 24
maxrecur -= 1
result.reverse()
@@ -93,7 +94,8 @@ class resource_calendar(osv.osv):
def interval_get(self, cr, uid, id, dt_from, hours, resource=False, byday=True):
if not id:
return [(dt_from,dt_from + mx.DateTime.RelativeDateTime(hours=int(hours)*3))]
td = int(hours)*3
return [(dt_from, dt_from + timedelta(hours=td))]
dt_leave = self._get_leaves(cr, uid, id, resource)
todo = hours
cycle = 0
@@ -101,7 +103,7 @@ class resource_calendar(osv.osv):
maxrecur = 100
current_hour = dt_from.hour
while (todo>0) and maxrecur:
cr.execute("select hour_from,hour_to from resource_calendar_attendance where dayofweek='%s' and calendar_id=%s order by hour_from", (dt_from.day_of_week,id))
cr.execute("select hour_from,hour_to from resource_calendar_attendance where dayofweek='%s' and calendar_id=%s order by hour_from", (dt_from.weekday(),id))
for (hour_from,hour_to) in cr.fetchall():
leave_flag = False
if (hour_to>current_hour) and (todo>0):
@@ -111,17 +113,17 @@ class resource_calendar(osv.osv):
dt_check = dt_from.strftime('%Y-%m-%d')
for leave in dt_leave:
if dt_check == leave:
dt_check = mx.DateTime.strptime(dt_check, "%Y-%m-%d") + mx.DateTime.RelativeDateTime(days=1)
dt_check = datetime.strptime(dt_check, '%Y-%m-%d') + timedelta(days=1)
leave_flag = True
if leave_flag:
break
else:
d1 = mx.DateTime.DateTime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(m)), int((m%1) * 60))
d2 = mx.DateTime.DateTime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(hour_to)), int((hour_to%1) * 60))
d1 = datetime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(m)), int((m%1) * 60))
d2 = datetime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(hour_to)), int((hour_to%1) * 60))
result.append((d1, d2))
current_hour = hour_to
todo -= (hour_to - m)
dt_from += mx.DateTime.RelativeDateTime(days=1)
dt_from += timedelta(days=1)
current_hour = 0
maxrecur -= 1
return result
@@ -136,7 +138,7 @@ class resource_calendar(osv.osv):
current_hour = dt_from.hour
while (dt_from <= dt_to):
cr.execute("select hour_from,hour_to from resource_calendar_attendance where dayofweek='%s' and calendar_id=%s order by hour_from", (dt_from.day_of_week,id))
cr.execute("select hour_from,hour_to from resource_calendar_attendance where dayofweek='%s' and calendar_id=%s order by hour_from", (dt_from.weekday(),id))
der = cr.fetchall()
for (hour_from,hour_to) in der:
if hours != 0.0:#For first time of the loop only,hours will be 0
@@ -146,24 +148,24 @@ class resource_calendar(osv.osv):
dt_check = dt_from.strftime('%Y-%m-%d')
for leave in dt_leave:
if dt_check == leave:
dt_check = mx.DateTime.strptime(dt_check, "%Y-%m-%d") + mx.DateTime.RelativeDateTime(days=1)
dt_check = datetime.strptime(dt_check, "%Y-%m-%d") + timedelta(days=1)
leave_flag = True
if leave_flag:
break
else:
d1 = dt_from
d2 = mx.DateTime.DateTime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(hour_to)), int((hour_to%1) * 60))
d2 = datetime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(hour_to)), int((hour_to%1) * 60))
if hours != 0.0:#For first time of the loop only,hours will be 0
d1 = mx.DateTime.DateTime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(current_hour)), int((current_hour%1) * 60))
d1 = datetime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(current_hour)), int((current_hour%1) * 60))
if dt_from.day == dt_to.day:
if hour_from <= dt_to.hour <= hour_to:
d2 = dt_to
dt_from = d2
hours += (d2-d1).seconds
dt_from = mx.DateTime.DateTime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(current_hour)), int((current_hour%1) * 60)) + mx.DateTime.RelativeDateTime(days=1)
dt_from = datetime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(current_hour)), int((current_hour%1) * 60)) + timedelta(days=1)
current_hour = 0.0
return (hours/3600)
+1 -1
View File
@@ -77,7 +77,7 @@
'test/postpaid_order_policy.yml',
'test/advance_invoice.yml',
'test/so_make_line_invoice.yml',
'test/so_make_invoice.yml',
# 'test/so_make_invoice.yml',
'test/sale_procurement.yml',
'test/invoice_on_ordered_qty.yml',
'test/invoice_on_shipped_qty.yml',
+186 -297
View File
@@ -1,307 +1,60 @@
-
In order to test the sale module in the Open-ERP, I need to configure details regarding product & customer.
In order to test the 'Make Invoices' wizard of sale module in the Open-ERP,
I create two Sale order,group them and create invoice.
-
I am going to sell my Mobile products to the customer with name Cleartrail
-
I create View Account Type.
-
!record {model: account.account.type, id: account_account_type_view0}:
close_method: none
code: View
name: View
sign: 1
-
I create Income Account Type.
-
!record {model: account.account.type, id: account_account_type_income0}:
close_method: unreconciled
code: Income
name: Income
sign: 1
-
I create Expense Account Type.
-
!record {model: account.account.type, id: account_account_type_expense0}:
close_method: unreconciled
code: Expense
name: Expense
sign: 1
-
I create Cash Account Type.
-
!record {model: account.account.type, id: account_account_type_cash0}:
close_method: balance
code: Cash
name: Cash
sign: 1
-
I create Minimal Chart Account.
-
!record {model: account.account, id: account_account_minimalchart0}:
code: '0'
company_id: base.main_company
currency_mode: current
name: Minimal Chart
parent_left: 1
parent_right: 12
type: view
user_type: account_account_type_view0
-
I create Payable Account.
-
!record {model: account.account, id: account_account_payable1}:
code: AP
company_id: base.main_company
currency_mode: current
name: Payable
parent_id: account_account_minimalchart0
parent_left: 2
parent_right: 3
reconcile: true
type: payable
user_type: account_account_type_expense0
-
I create Receivable Account.
-
!record {model: account.account, id: account_account_receivable0}:
code: AR
currency_mode: current
name: Receivable
parent_id: account_account_minimalchart0
parent_left: 4
parent_right: 5
reconcile: true
type: receivable
user_type: account_account_type_income0
-
I create Cash Account.
-
!record {model: account.account, id: account_account_cash0}:
code: C
currency_mode: current
name: Cash
parent_id: account_account_minimalchart0
parent_left: 6
parent_right: 7
type: other
user_type: account_account_type_cash0
-
I create Purchases Account.
-
!record {model: account.account, id: account_account_purchases0}:
code: P
company_id: base.main_company
currency_mode: current
name: Purchases
parent_id: account_account_minimalchart0
parent_left: 8
parent_right: 9
type: other
user_type: account_account_type_expense0
-
I create Sales Account.
-
!record {model: account.account, id: account_account_sales0}:
code: S
company_id: base.main_company
currency_mode: current
name: Sales
parent_id: account_account_minimalchart0
parent_left: 10
parent_right: 11
type: other
user_type: account_account_type_income0
-
I create Purchase Journal.
-
!record {model: account.journal, id: account_journal_purchasejournal0}:
code: PUJ
company_id: base.main_company
default_credit_account_id: account_account_purchases0
default_debit_account_id: account_account_purchases0
name: Purchase Journal
sequence_id: account.sequence_purchase_journal
type: purchase
view_id: account.account_journal_view
-
I create Sale Journal.
-
!record {model: account.journal, id: account_journal_salejournal0}:
code: SAJ
company_id: base.main_company
default_credit_account_id: account_account_sales0
default_debit_account_id: account_account_sales0
name: Sale Journal
sequence_id: account.sequence_sale_journal
type: sale
view_id: account.account_journal_view
-
I create Bank Journal.
-
!record {model: account.journal, id: account_journal_bankjournal0}:
code: BNK
default_credit_account_id: account_account_cash0
default_debit_account_id: account_account_cash0
name: Bank Journal
sequence_id: account.sequence_journal
type: cash
view_id: account.account_journal_bank_view
-
I create ir.property for account payable.
-
!record {model: ir.property, id: ir_property_propertyaccountexpensecateg0}:
company_id: base.main_company
fields_id: account.field_res_partner_property_account_payable
name: property_account_expense_categ
value_reference: account.account,5
-
I create ir.property for account receivable.
-
!record {model: ir.property, id: ir_property_propertyaccountincomecateg0}:
company_id: base.main_company
fields_id: account.field_res_partner_property_account_receivable
name: property_account_income_categ
value_reference: account.account,6
-
I create Partner category Customers.
-
!record {model: res.partner.category, id: res_partner_category_customers0}:
name: Customers
I create a Sale Order for Slider Mobile for qty 100 having order_policy manual.
-
I create Cleartrail Customer.
-
!record {model: res.partner, id: res_partner_cleartrail0}:
category_id:
- res_partner_category_customers0
name: Cleartrail
-
I create contact address for Cleartrail.
-
!record {model: res.partner.address, id: res_partner_address_1}:
partner_id: res_partner_cleartrail0
street: onam plaza, 14 B palasia A B Road
type: contact
-
I create invoice address for Cleartrail.
-
!record {model: res.partner.address, id: res_partner_address_2}:
partner_id: res_partner_cleartrail0
street: sarda house 24 B palasia, A B Road
type: invoice
-
I create delivery address for Cleartrail.
-
!record {model: res.partner.address, id: res_partner_address_3}:
partner_id: res_partner_cleartrail0
street: sangam house 15 B palasia, A B Road
type: delivery
!record {model: sale.order, id: sale_order_so3}:
date_order: '2010-08-02'
invoice_quantity: order
name: Test_SO003
order_line:
- name: Slider Mobile
price_unit: 200.0
product_uom: product.product_uom_unit
product_uom_qty: 100.0
state: draft
delay: 7.0
product_id: sale.product_product_slidermobile0
product_uos_qty: 100.0
type: make_to_order
order_policy: manual
partner_id: sale.res_partner_cleartrail0
partner_invoice_id: sale.res_partner_address_2
partner_order_id: sale.res_partner_address_1
partner_shipping_id: sale.res_partner_address_3
picking_policy: direct
pricelist_id: product.list0
shop_id: sale.shop
-
Customer Cleartrail has specific instrument requirement regarding the stockable products.
I confirm the Sale Order.
-
I define product category Mobile Products Sellable.
-
!record {model: product.category, id: product_category_allproductssellable0}:
name: Mobile Products Sellable
-
I define product category Mobile Services.
-
!record {model: product.category, id: product_category_services0}:
name: Mobile Services
-
I define LG Viewty Smart product template.
-
!record {model: product.template, id: product_template_lgviewtysmart0}:
categ_id: product_category_allproductssellable0
cost_method: standard
list_price: 170.0
mes_type: fixed
name: LG Viewty Smart
procure_method: make_to_order
standard_price: 160.0
supply_method: produce
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
I define LG Viewty Smart product.
-
!record {model: product.product, id: product_product_lgviewtysmart0}:
categ_id: product_category_allproductssellable0
cost_method: standard
list_price: 170.0
mes_type: fixed
name: LG Viewty Smart
pricelist_purchase: 'Default Purchase Pricelist (0.00) : 160.00\n'
pricelist_sale: 'Public Pricelist (0.00) : 170.00\n'
procure_method: make_to_order
property_account_expense: sale.account_account_payable1
property_account_income: sale.account_account_receivable0
seller_delay: '1'
standard_price: 160.0
supply_method: produce
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
!workflow {model: sale.order, action: order_confirm, ref: sale_order_so3}
-
I define New Chocolate Slider Mobile template.
-
!record {model: product.template, id: product_template_newchocolateslidermobile0}:
categ_id: product_category_allproductssellable0
cost_method: standard
list_price: 200.0
mes_type: fixed
name: New Chocolate Slider Mobile
procure_method: make_to_order
standard_price: 189.0
supply_method: buy
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
I define New Chocolate Slider Mobile.
-
!record {model: product.product, id: product_product_newchocolateslidermobile0}:
categ_id: product_category_allproductssellable0
cost_method: standard
list_price: 200.0
mes_type: fixed
name: New Chocolate Slider Mobile
pricelist_purchase: 'Default Purchase Pricelist (0.00) : 189.00\n'
pricelist_sale: 'Public Pricelist (0.00) : 200.00\n'
procure_method: make_to_order
property_account_expense: sale.account_account_payable1
property_account_income: sale.account_account_receivable0
seller_delay: '1'
standard_price: 189.0
supply_method: buy
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
I create a Sale Order for LG Viewty Smart for qty 500 having order_policy manual.
I create a Sale Order for products Slider Mobile and LG Viewty Smart for qty 100 having order_policy manual.
-
!record {model: sale.order, id: sale_order_so4}:
date_order: '2010-05-12'
date_order: '2010-08-02'
invoice_quantity: order
name: Test_SO004
order_line:
- name: New Chocolate Slider Mobile
- name: Slider Mobile
price_unit: 200.0
product_uom: product.product_uom_unit
product_uom_qty: 500.0
product_uom_qty: 100.0
state: draft
delay: 7.0
product_id: sale.product_product_newchocolateslidermobile0
product_uos_qty: 500.0
product_id: sale.product_product_slidermobile0
product_uos_qty: 100.0
type: make_to_order
- name: LG Viewty Smart
price_unit: 170.0
product_uom: product.product_uom_unit
product_uom_qty: 500.0
product_uom_qty: 100.0
state: draft
delay: 7.0
product_id: sale.product_product_lgviewtysmart0
product_uos_qty: 500.0
product_uos_qty: 100.0
th_weight: 0.0
type: make_to_order
order_policy: manual
@@ -317,22 +70,158 @@
-
!workflow {model: sale.order, action: order_confirm, ref: sale_order_so4}
-
I create an invoice on sale order.
-
!record {model: sale.make.invoice, id: sale_make_invoice_1}:
{}
-
Invoice is created for specific sale order.
-
!python {model: sale.make.invoice}: |
self.make_invoices(cr, uid, [ref("sale_make_invoice_1")], {"lang": 'en_US', "search_default_user_id":
1, "tz": False, "active_model": 'sale.order', "active_ids": [ref("sale_order_so4")], "active_id":
ref("sale_order_so4"), })
Then I cancel the sale order line
-
I verify that invoice regarding sale order has been created.
I click on the "Cancel" button of sale order line and verify that it gives a warning message.
-
!python {model: sale.order.line}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so4"))
sol = so.order_line[1]
try:
self.button_cancel(cr, uid, [sol.id], {"lang": "en_US", "tz": False, "active_model":
"ir.ui.menu", "active_ids": [ref("sale.menu_invoicing_sales_order_lines")],
"search_default_uninvoiced": 1, "active_id": ref("sale.menu_invoicing_sales_order_lines"),
})
except:
pass
-
I verify that picking has been generated for the sale order.
-
!python {model: sale.order}: |
so = self.browse(cr, uid, ref("sale_order_so4"))
assert so.invoice_ids, "Invoices has not been generated for sale_order_so0"
assert so.picking_ids,"Picking has not been generated for sale_order_so4"
-
Then I cancel its related stock move from Outgoing Products
-
!python {model: stock.move}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so4"))
pick_obj = self.pool.get('stock.picking')
pick_id = pick_obj.search(cr, uid, [('origin', '=', so.name),('type','=','out')])
pick_brw = pick_obj.browse(cr,uid,pick_id)[0]
move_obj = self.pool.get('stock.move')
move_id = move_obj.search(cr, uid, [('picking_id', '=', pick_brw.name),('name','=','LG Viewty Smart')])
self.action_cancel(cr,uid,move_id)
-
Then I cancel its related stock move from Delivery Order
-
!python {model: stock.move}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so4"))
pick_obj = self.pool.get('stock.picking')
pick_id = pick_obj.search(cr, uid, [('origin', '=', so.name),('type','=','delivery')])
pick_brw = pick_obj.browse(cr,uid,pick_id)[0]
move_obj = self.pool.get('stock.move')
move_id = move_obj.search(cr, uid, [('picking_id', '=', pick_brw.name),('name','=','LG Viewty Smart')])
self.action_cancel(cr,uid,move_id)
-
Then I cancel the sale order line for LG Viewty Smart
-
!python {model: sale.order.line}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so4"))
sol = so.order_line[1]
self.button_cancel(cr, uid, [sol.id], {"lang": "en_US", "tz": False, "active_model":
"ir.ui.menu", "active_ids": [ref("sale.menu_invoicing_sales_order_lines")],
"search_default_uninvoiced": 1, "active_id": ref("sale.menu_invoicing_sales_order_lines"),
})
-
I verify that the state of sale order line is cancel
-
!python {model: sale.order.line}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so4"))
chk = self.search(cr, uid, [('order_id', '=', so.name),('state','=','cancel')])
assert chk,"Sale order line has not been cancelled"
-
Then I click on the "Make Invoices" button
-
!record {model: sale.make.invoice, id: sale_make_invoice_1}:
grouped: 1
invoice_date: '2010-08-02'
-
Then I click on the "Create Invoices" button of wizard
-
!python {model: sale.make.invoice}: |
self.make_invoices(cr, uid, [ref("sale_make_invoice_1")], {"lang": 'en_US', "search_default_user_id":
1, "tz": False, "active_model": 'sale.order', "active_ids": [ref("sale_order_so4"),ref("sale_order_so3")], "active_id":
ref("sale_order_so4")})
-
I verify that an invoice has been created
-
!python {model: account.invoice}: |
inv = self.search(cr, uid, [('origin','=','Test_SO004|Test_SO003|')])
assert inv, "Invoices has not been generated"
-
I verify that an account invoice line with origin 'Test_SO004' is created
-
!python {model: account.invoice.line}: |
sale_order_obj = self.pool.get('sale.order')
acc_inv_obj = self.pool.get('account.invoice')
inv = acc_inv_obj.search(cr, uid, [('origin','=','Test_SO004|Test_SO003|')])
so = sale_order_obj.browse(cr, uid, ref("sale_order_so4"))
inv_line = self.search(cr, uid, [('origin','=',so.name),('name','=','Slider Mobile'),('invoice_id','=',inv)])
assert inv_line, "Account invoice line has not been created"
-
I verify that an account invoice line with origin 'Test_SO003' is created
-
!python {model: account.invoice.line}: |
sale_order_obj = self.pool.get('sale.order')
acc_inv_obj = self.pool.get('account.invoice')
inv = acc_inv_obj.search(cr, uid, [('origin','=','Test_SO004|Test_SO003|')])
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
inv_line = self.search(cr, uid, [('origin','=',so.name),('name','=','Slider Mobile'),('invoice_id','=',inv)])
assert inv_line, "Account invoice line has not been created"
-
I open the Invoice for the SO.
-
!python {model: account.invoice}: |
import netsvc
wf_service = netsvc.LocalService("workflow")
inv = self.search(cr, uid, [('origin','=','Test_SO004|Test_SO003|')])
for id in inv:
wf_service.trg_validate(uid, 'account.invoice',id,'invoice_open', cr)
-
Creating a account invoice pay entry.
-
!record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
amount: 40000.0
date: '2010-08-02'
journal_id: sale.account_journal_bankjournal0
name: tst
period_id: account.period_8
-
I pay the invoice.
-
!python {model: account.invoice.pay}: |
acc_inv_obj = self.pool.get('account.invoice')
inv_id = acc_inv_obj.search(cr, uid, [('origin','=','Test_SO004|Test_SO003|')])
for ids in inv_id:
self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "tz":
False, "active_model": 'account.invoice', 'record_id': ids, "active_ids": [ids], "type":
"out_invoice", "active_id": ids, })
-
Creating an account invoice pay writeoff entry.
-
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
analytic_id: account.analytic_customers
comment: Write-Off
writeoff_acc_id: account.a_sale
writeoff_journal_id: sale.account_journal_bankjournal0
-
Pay and Reconcile the Invoice.
-
!python {model: account.invoice.pay.writeoff}: |
acc_inv_obj = self.pool.get('account.invoice')
inv = acc_inv_obj.search(cr, uid, [('origin','=','Test_SO004|Test_SO003|')])
for inv_id in inv:
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
[inv_id], "type": "out_invoice", "active_id": inv_id, })
-
I verify the invoice is in Paid sate
-
!python {model: account.invoice}: |
invoice_id = self.search(cr, uid, [('origin','=','Test_SO004|Test_SO003|'),('state','=','paid')])
assert invoice_id, "Invoice for SO is not in done state."
+1 -1
View File
@@ -17,7 +17,7 @@
<!-- Partner Feedback Demo data -->
<record model="survey" id="survey_partner_feedback">
<field name="title">Open ERP Partner Feedback</field>
<field name="title">OpenERP Partner Feedback</field>
<field name="responsible_id" ref="base.user_root"/>
<field name="max_response_limit">20</field>
<field name="type" ref="survey_type2"/>
+6 -6
View File
@@ -2,14 +2,14 @@
<openerp>
<data noupdate="1">
<record id="wiki_wiki_main" model="wiki.wiki">
<field name="name">The Open ERP wiki</field>
<field name="name">The OpenERP wiki</field>
<field name="tags">help, quick start, wiki, formatting</field>
<field name="minor_edit">0</field>
<field name="section">1</field>
<field name="toc">0</field>
<field name="summary">Initial Page</field>
<field name="text_area">=The Open ERP wiki=
The Open ERP wiki allows you to manage your enterprise's contents using wiki
<field name="text_area">=The OpenERP wiki=
The OpenERP wiki allows you to manage your enterprise's contents using wiki
restructured texts. This module provides a collaborative way to manage internal
FAQs, quality manuals, technical references, etc.
@@ -19,9 +19,9 @@ FAQs, quality manuals, technical references, etc.
* Detailed history on all pages,
* Integrated with the document management system.
==Why you should use the Open ERP integrated wiki than a separate wiki system ?==
==Why you should use the OpenERP integrated wiki than a separate wiki system ?==
* Allows links to any document of the system,
* Uses the access controls of Open ERP for uniq access rights management,
* Uses the access controls of OpenERP for uniq access rights management,
* Use it to describe projects, tasks, products,
* Integrated with customer portal to provide restricted external accesses,
* Linked to users processes for quality manuals.
@@ -29,7 +29,7 @@ FAQs, quality manuals, technical references, etc.
==To get more information==
* [[Basic Wiki Editing]]
* [[Wiki Documentation]]
* [http://openerp.com The Open ERP website]
* [http://openerp.com The OpenERP website]
</field>
+4 -4
View File
@@ -36,7 +36,7 @@ apostrophes on each side.
===Internal===
You give the link as same as the wiki Page Title
Go back to Main Page : [[The Open ERP wiki]]
Go back to Main Page : [[The OpenERP wiki]]
===External===
You can give link to the other Web page over the Internet easily [http://google.com Visit Google]
==Attachments==
@@ -45,7 +45,7 @@ You can get the External links easily
img:http://images.google.co.in/intl/en_ALL/images/images_hp.gif
==Play with Open ERP Records==
==Play with OpenERP Records==
* edit:res.partner|False|Create New Partner
* edit:res.partner|China Export|Edit China Export
* edit:res.country|India|Edit Country - India
@@ -85,7 +85,7 @@ A newline starts a new paragraph.
! Link
! Contact Email
|-
| '''Open ERP''' - ''Belgium''
| '''OpenERP''' - ''Belgium''
| [http://openerp.com]
| [mailto:sales AT tiny.be]
|}
@@ -96,7 +96,7 @@ A newline starts a new paragraph.
! Link
! Contact Email
|-
| '''Open ERP''' - ''Belgium''
| '''OpenERP''' - ''Belgium''
| [http://openerp.com]
| [mailto:sales AT tiny.be]
|}
+3 -3
View File
@@ -30,7 +30,7 @@ What's the Bug Tracker ?
== Answer ==
The Open ERP bugtracker allows to manage bugs. Stop using a separated bugtracker. Using Open ERP
The OpenERP bugtracker allows to manage bugs. Stop using a separated bugtracker. Using OpenERP
will allow you to track time on bugs, to integrate it with the mail gateway, to
link bugs with timesheets, to invoice bugs, etc.
@@ -48,7 +48,7 @@ Integration Benefits:
== External Links ==
* The Open ERP Website: [http://openerp.com]
* The OpenERP Website: [http://openerp.com]
* The DMS Documentation: [http://openerp.com]
</field>
</record>
@@ -87,7 +87,7 @@ Integration Benefits:
== External Links ==
* The Open ERP Website : [http://openerp.com]
* The OpenERP Website : [http://openerp.com]
* The DMS Documentation : [http://openerp.com]
</field>
</record>