[MERGE] merge with dev-addons3
bzr revid: psi@tinyerp.co.in-20110117045827-ezzbwitavjcp8nxi
This commit is contained in:
commit
424f217e3f
|
@ -430,7 +430,7 @@ class account_account(osv.osv):
|
|||
|
||||
_constraints = [
|
||||
(_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id']),
|
||||
(_check_type, 'You cannot create an account! \nMake sure if the account has children then it should be type "View"! ', ['type']),
|
||||
(_check_type, 'Configuration Error! \nYou cannot define children to an account with internal type different of "View"! ', ['type']),
|
||||
]
|
||||
_sql_constraints = [
|
||||
('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !')
|
||||
|
@ -2317,7 +2317,7 @@ class account_account_template(osv.osv):
|
|||
_check_recursion = check_cycle
|
||||
_constraints = [
|
||||
(_check_recursion, 'Error ! You can not create recursive account templates.', ['parent_id']),
|
||||
(_check_type, 'You cannot create an account template! \nMake sure if the account template has parent then it should be type "View"! ', ['type']),
|
||||
(_check_type, 'Configuration Error! \nYou cannot define children to an account with internal type different of "View"! ', ['type']),
|
||||
|
||||
]
|
||||
|
||||
|
|
|
@ -954,6 +954,7 @@ class account_move_line(osv.osv):
|
|||
if view_type == 'search' and result['fields'].get('journal_id', False):
|
||||
result['fields']['journal_id']['selection'] = journal_pool.name_search(cr, uid, '', [], context=context)
|
||||
ctx = context.copy()
|
||||
#we add the refunds journal in the selection field of journal
|
||||
if context.get('journal_type', False) == 'sale':
|
||||
ctx.update({'journal_type': 'sale_refund'})
|
||||
result['fields']['journal_id']['selection'] += journal_pool.name_search(cr, uid, '', [], context=ctx)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<openerp>
|
||||
<data>
|
||||
<report auto="False" id="account_general_ledger" menu="False" model="account.account" name="account.general.ledger" rml="account/report/account_general_ledger.rml" string="General Ledger"/>
|
||||
<report auto="False" id="account_general_ledger_landscape" menu="False" model="account.account" name="account.general.ledger_landscape" rml="account/report/account_general_ledger.rml" string="General Ledger"/>
|
||||
<report auto="False" id="account_general_ledger_landscape" menu="False" model="account.account" name="account.general.ledger_landscape" rml="account/report/account_general_ledger_landscape.rml" string="General Ledger"/>
|
||||
<report auto="False" id="account_3rdparty_ledger" menu="False" model="res.partner" name="account.third_party_ledger" rml="account/report/account_partner_ledger.rml" string="Partner Ledger"/>
|
||||
<report auto="False" id="account_3rdparty_ledger_other" menu="False" model="res.partner" name="account.third_party_ledger_other" rml="account/report/account_partner_ledger_other.rml" string="Partner Ledger"/>
|
||||
<report auto="False" id="account_account_balance" menu="False" model="account.account" name="account.account.balance" rml="account/report/account_balance.rml" string="Trial Balance"/>
|
||||
|
|
|
@ -170,6 +170,8 @@
|
|||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
<field name="active" groups="base.group_extended" />
|
||||
<newline/>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Currency" colspan="2"/>
|
||||
<field name="currency_id"/>
|
||||
|
@ -179,7 +181,6 @@
|
|||
<separator string="Reconcile" colspan="2"/>
|
||||
<field name="reconcile"/>
|
||||
</group>
|
||||
<field name="active" groups="base.group_extended" />
|
||||
<separator string="Default Taxes" colspan="4"/>
|
||||
<field colspan="4" name="tax_ids" nolabel="1" domain="[('parent_id','=',False)]"/>
|
||||
<separator string="Consolidated Children" colspan="4"/>
|
||||
|
@ -2387,6 +2388,7 @@
|
|||
<group string="res_config_contents" position="replace">
|
||||
<field name="company_id" widget="selection"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
|
||||
<field name ="code_digits" groups="base.group_extended"/>
|
||||
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)"/>
|
||||
<field name ="seq_journal" groups="base.group_extended"/>
|
||||
<field name="sale_tax" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
|
||||
<field name="purchase_tax" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
|
||||
|
|
|
@ -540,7 +540,7 @@ class account_invoice(osv.osv):
|
|||
journal_ids = obj_journal.search(cr, uid, [('company_id','=',company_id), ('type', '=', journal_type)])
|
||||
if journal_ids:
|
||||
val['journal_id'] = journal_ids[0]
|
||||
res_journal_default = self.pool.get('ir.values').get(cr, uid, 'default', False, ['account.invoice'])
|
||||
res_journal_default = self.pool.get('ir.values').get(cr, uid, 'default', 'type=%s' % (type), ['account.invoice'])
|
||||
for r in res_journal_default:
|
||||
if r[1] == 'journal_id' and r[2] in journal_ids:
|
||||
val['journal_id'] = r[2]
|
||||
|
|
|
@ -121,7 +121,7 @@ class general_ledger(report_sxw.rml_parse, common_report_header):
|
|||
res.append(child_account)
|
||||
elif self.display_account == 'bal_solde':
|
||||
if child_account.type != 'view' and num_entry <> 0:
|
||||
if currency_obj.is_zero(self.cr, self.uid, currency, sold_account) != 0:
|
||||
if not currency_obj.is_zero(self.cr, self.uid, currency, sold_account):
|
||||
res.append(child_account)
|
||||
else:
|
||||
res.append(child_account)
|
||||
|
|
|
@ -37,6 +37,6 @@ items and the chart of accounts.
|
|||
'test': [],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '',
|
||||
'certificate': '00395091383933390541',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
'demo_xml': [],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '',
|
||||
'certificate': '00475376442024623469',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -22,6 +22,7 @@ anonymization_field_account_move_line_credit,account.move.line,credit
|
|||
anonymization_field_account_move_line_tax_amount,account.move.line,tax_amount
|
||||
anonymization_field_account_move_line_amount_currency,account.move.line,amount_currency
|
||||
anonymization_field_account_move_line_amount_taxed,account.move.line,amount_taxed
|
||||
anonymization_field_account_analytic_line_amount,account.analytic.line,amount
|
||||
anonymization_field_sale_order_amount_tax,sale.order,amount_tax
|
||||
anonymization_field_sale_order_amount_total,sale.order,amount_total
|
||||
anonymization_field_sale_order_amount_untaxed,sale.order,amount_untaxed
|
||||
|
@ -33,3 +34,6 @@ anonymization_field_purchase_order_amount_untaxed,purchase.order,amount_untaxed
|
|||
anonymization_field_purchase_order_line_price_unit,purchase.order.line,price_unit
|
||||
anonymization_field_account_invoice_tax_amount,account.invoice.tax,amount
|
||||
anonymization_field_account_invoice_tax_base,account.invoice.tax,base
|
||||
anonymization_field_product_name,product.template,name
|
||||
anonymization_field_res_users_name,res.users,name
|
||||
anonymization_field_res_users_signature,res.users,signature
|
||||
|
|
|
|
@ -3,8 +3,8 @@
|
|||
-
|
||||
!record {model: calendar.event, id: calendar_event_technicalpresentation0}:
|
||||
class: private
|
||||
date: !eval "'%s-04-30 16:00:00' %(datetime.now().year)"
|
||||
date_deadline: !eval "'%s-04-30 18:30:00' %(datetime.now().year)"
|
||||
date: '2011-04-30 16:00:00'
|
||||
date_deadline: '2011-04-30 18:30:00'
|
||||
description: The Technical Presentation will cover following topics:\n* Creating OpenERP
|
||||
class\n* Views\n* Wizards\n* Workflows
|
||||
duration: 2.5
|
||||
|
@ -35,8 +35,8 @@
|
|||
!record {model: calendar.event, id: calendar_event_alldaytestevent0}:
|
||||
allday: 1
|
||||
class: confidential
|
||||
date: !eval "'%s-04-30 00:00:00' %(datetime.now().year)"
|
||||
date_deadline: !eval "'%s-04-30 00:00:00' %(datetime.now().year)"
|
||||
date: '2011-04-30 00:00:00'
|
||||
date_deadline: '2011-04-30 00:00:00'
|
||||
description: 'All day technical test '
|
||||
location: School
|
||||
name: All day test event
|
||||
|
|
|
@ -37,25 +37,30 @@ class base_contact_installer(osv.osv_memory):
|
|||
"""
|
||||
obj = self.pool.get("base.contact.installer").browse(cr, uid, uid, context=context)
|
||||
if obj.migrate:
|
||||
cr.execute("""DROP TRIGGER IF EXISTS contactjob on res_partner_contact;
|
||||
CREATE OR REPLACE FUNCTION add_to_job() RETURNS TRIGGER AS $contactjob$
|
||||
# Enable PL/pgSQL if not enabled yet in the database
|
||||
cr.execute("SELECT 1 FROM pg_language WHERE lanname = 'plpgsql'")
|
||||
if not cr.fetchone():
|
||||
cr.execute("CREATE LANGUAGE plpgsql;")
|
||||
|
||||
cr.execute("""DROP TRIGGER IF EXISTS contactjob on res_partner_contact;
|
||||
CREATE OR REPLACE FUNCTION add_to_job() RETURNS TRIGGER AS $contactjob$
|
||||
DECLARE
|
||||
new_name varchar;
|
||||
new_phonenum varchar;
|
||||
BEGIN
|
||||
IF(TG_OP='INSERT') THEN
|
||||
INSERT INTO res_partner_job(contact_id, address_id, function, state) VALUES(NEW.id, NEW.website::integer,NEW.first_name, 'current');
|
||||
UPDATE res_partner_contact set first_name=Null, website=Null, active=True where id=NEW.id;
|
||||
IF(TG_OP='INSERT') THEN
|
||||
INSERT INTO res_partner_job(contact_id, address_id, function, state) VALUES(NEW.id, NEW.website::integer,NEW.first_name, 'current');
|
||||
UPDATE res_partner_contact set first_name=Null, website=Null, active=True where id=NEW.id;
|
||||
END IF;
|
||||
RETURN NEW;
|
||||
END;
|
||||
$contactjob$ LANGUAGE plpgsql;
|
||||
CREATE TRIGGER contactjob AFTER INSERT ON res_partner_contact FOR EACH ROW EXECUTE PROCEDURE add_to_job();""")
|
||||
$contactjob$ LANGUAGE plpgsql;
|
||||
CREATE TRIGGER contactjob AFTER INSERT ON res_partner_contact FOR EACH ROW EXECUTE PROCEDURE add_to_job();""")
|
||||
|
||||
cr.execute("INSERT into res_partner_contact (name, title, email, first_name, website) (SELECT coalesce(name, 'Noname'), title, email, function , to_char(id, '99999999') from res_partner_address)")
|
||||
|
||||
cr.execute("DROP TRIGGER IF EXISTS contactjob on res_partner_contact")
|
||||
|
||||
|
||||
cr.execute("DROP FUNCTION IF EXISTS add_to_job()")
|
||||
|
||||
base_contact_installer()
|
||||
|
|
|
@ -36,6 +36,6 @@
|
|||
'update_xml': ['base_module_doc_rst_view.xml', 'base_module_doc_rst_wizard.xml', 'module_report.xml'],
|
||||
'demo_xml': [],
|
||||
'installable': True,
|
||||
'certificate': '',
|
||||
'certificate': '001288481437217734509',
|
||||
}
|
||||
|
||||
|
|
|
@ -39,5 +39,5 @@ based on geolocalization.
|
|||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': False,
|
||||
'certificate': '00503409558942442061',
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': None,
|
||||
'certificate': '00934787762705016005',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
'update_xml': ['security/ir.model.access.csv','html_view.xml',],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '',
|
||||
'certificate': '001302129363003126557',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
],
|
||||
"demo_xml" : [],
|
||||
"installable" : True,
|
||||
"certificate" : ''
|
||||
"certificate" : '00941680933773696173',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -39,9 +39,9 @@
|
|||
"l10n_chart_cn_wizard.xml",
|
||||
],
|
||||
"license": "GPL-3",
|
||||
"certificate":"",
|
||||
"active": False,
|
||||
"installable": True
|
||||
"active": False,
|
||||
"installable": True,
|
||||
"certificate": '00925445983542952285',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
"demo_xml" : [],
|
||||
"update_xml" : ["account_types.xml","account_chart.xml", "account_full_chart.xml",
|
||||
"account_tax.xml","l10n_gr_wizard.xml"],
|
||||
"installable": True
|
||||
"installable": True,
|
||||
'certificate': '001146244418929008029',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -49,6 +49,6 @@
|
|||
],
|
||||
'demo_xml': [],
|
||||
'installable': True,
|
||||
'certificate': '',
|
||||
'certificate': '00815146661827601309',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -120,7 +120,7 @@ Dit is een basismodule om een uitgebreid grootboek- en BTW schema voor Nederland
|
|||
],
|
||||
|
||||
"installable": True,
|
||||
'certificate': '',
|
||||
'certificate': '00976041422960053277',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -39,6 +39,6 @@
|
|||
'demo_xml': [],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': None,
|
||||
'certificate': '001056784984222247309',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -201,6 +201,7 @@
|
|||
<field name="name">Members</field>
|
||||
<field name="res_model">res.partner</field>
|
||||
<field name="search_view_id" ref="view_res_partner_member_filter"/>
|
||||
<field name="context">{"search_default_all_members": 1}</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_membership_members_view_tree">
|
||||
|
|
|
@ -48,6 +48,6 @@
|
|||
'demo_xml': ['stock_orderpoint.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '',
|
||||
'certificate': '00954248826881074509',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -60,7 +60,7 @@ Features.
|
|||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': None,
|
||||
'certificate': '001227470751077315069',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -40,7 +40,7 @@ Moreover, it keeps track of all further communications and task states.
|
|||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '',
|
||||
'certificate': '001075048780413258261',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -50,9 +50,9 @@
|
|||
Create a timesheet sheet for HR manager
|
||||
-
|
||||
!record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_sheetforhrmanager0}:
|
||||
date_current: !eval time.strftime('%Y-%m-%d')
|
||||
date_from: !eval "'%s-%s-01' %(datetime.now().year, datetime.now().month)"
|
||||
date_to: !eval "'%s-%s-30' %(datetime.now().year, datetime.now().month)"
|
||||
date_current: !eval time.strftime('%Y-06-%d')
|
||||
date_from: !eval "'%s-06-01' %(datetime.now().year)"
|
||||
date_to: !eval "'%s-06-30' %(datetime.now().year)"
|
||||
name: Sheet for hr manager
|
||||
state: new
|
||||
user_id: res_users_hrmanager0
|
||||
|
@ -70,7 +70,7 @@
|
|||
Create a task 'Get all timesheet records'
|
||||
-
|
||||
!record {model: project.task, id: project_task_getalltimesheetrecords0}:
|
||||
date_start: !eval time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
date_start: !eval time.strftime('%Y-06-%d %H:%M:%S')
|
||||
name: Get all timesheet records
|
||||
planned_hours: 20.0
|
||||
project_id: project_project_timesheetmanagement0
|
||||
|
@ -92,7 +92,7 @@
|
|||
-
|
||||
!record {model: project.task, id: project_task_getalltimesheetrecords0}:
|
||||
work_ids:
|
||||
- date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
- date: !eval time.strftime('%Y-06-%d %H:%M:%S')
|
||||
hours: 10.0
|
||||
name: Get work calendar of all employees
|
||||
user_id: res_users_hrmanager0
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': None,
|
||||
'certificate': '00746371192190459469',
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -43,6 +43,6 @@
|
|||
'test':['test/sale_mrp.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '',
|
||||
'certificate': '00395598976683092013',
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -2588,7 +2588,7 @@ class stock_inventory_line(osv.osv):
|
|||
'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
|
||||
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True),
|
||||
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM')),
|
||||
'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True, select=True),
|
||||
'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True, select=True, readonly=True),
|
||||
'prod_lot_id': fields.many2one('stock.production.lot', 'Production Lot', domain="[('product_id','=',product_id)]"),
|
||||
'state': fields.related('inventory_id','state',type='char',string='State',readonly=True),
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
I create a sale order for PC1-Basic PC and PC3-Medium PC.
|
||||
-
|
||||
!record {model: sale.order, id: sale_order_so0}:
|
||||
date_order: !eval time.strftime('%Y-%m-%d')
|
||||
date_order: !eval time.strftime('%Y-07-20')
|
||||
invoice_quantity: order
|
||||
name: SO006
|
||||
order_line:
|
||||
|
|
|
@ -32,7 +32,7 @@ class publisher_warranty_contract(osv.osv):
|
|||
|
||||
@cache(skiparg=3)
|
||||
def get_default_livechat_text(self, cr, uid):
|
||||
return '<a href="http://www.openerp.com/services/subscribe-onsite" target="_blank"><img src="/web_livechat/static/images/busy.png"/>Support</a>'
|
||||
return '<a href="http://www.openerp.com/support-or-publisher-warranty-contract" target="_blank"><img src="/web_livechat/static/images/busy.png"/>Support</a>'
|
||||
|
||||
publisher_warranty_contract()
|
||||
|
||||
|
|
Loading…
Reference in New Issue