[MERGE] forward port of branch 8.0 up to 35233db
This commit is contained in:
@@ -416,6 +416,7 @@ Jay Vora <jvo@tinyerp.com> jvo(OpenERP) <>
|
||||
Jay Vora <jvo@tinyerp.com> jvo@tinyerp.com <>
|
||||
Jay Vora (Serpent CS) <jay.vora@serpentcs.com>
|
||||
Jay Vora (Serpent CS) <jay.vora@serpentcs.com> <serpentcs.lp@gmail.com>
|
||||
Jay Vora (Serpent CS) <jay.vora@serpentcs.com> <support@serpentcs.com>
|
||||
Jaydeep Barot <jar@tinyerp.com>
|
||||
Jaydeep Barot <jar@tinyerp.com> <jar@openerp.com>
|
||||
Jaydeep Barot <jar@tinyerp.com> <jaydeep.gvp@gmail.com>
|
||||
@@ -724,6 +725,7 @@ Quentin De Paoli <qdp@odoo.com> <qdp-launchpad@openerp.com>
|
||||
Quentin De Paoli <qdp@odoo.com> <qdp-launchpad@tinyerp.com>
|
||||
Quentin De Paoli <qdp@odoo.com> <qdp@openerp.com>
|
||||
Quentin De Paoli <qdp@odoo.com> <qdp@tinyerp.com>
|
||||
Quentin De Paoli <qdp@odoo.com> OpenERP <openerp@ubuntu>
|
||||
Quentin De Paoli <qdp@odoo.com> Quentin <qdp@jade>
|
||||
Quentin De Paoli <qdp@odoo.com> Quentin De Paoli <>
|
||||
Quentin De Paoli <qdp@odoo.com> Quentin De Paoli <qdp@cyan>
|
||||
@@ -823,8 +825,10 @@ Rolv Råen <rolv.raen@gmail.com>
|
||||
Rolv Råen <rolv.raen@gmail.com> rora@adego.no <>
|
||||
Ronak Baxi <rba@tinyerp.com>
|
||||
Ronak Baxi <rba@tinyerp.com> Ronak Baxi <rba@openerp.com>
|
||||
Ronald Portier <ronald@therp.nl>
|
||||
Ronald Portier <ronald@therp.nl> Ronald Portier (Therp) <>
|
||||
Ronald Portier <rportier@therp.nl>
|
||||
Ronald Portier <rportier@therp.nl> Ronald Portier (Therp) <>
|
||||
Ronald Portier <rportier@therp.nl> Ronald Portier (Therp) <>
|
||||
Ronald Portier <rportier@therp.nl> <ronald@therp.nl>
|
||||
Rucha Patel <rpa@tinyerp.com>
|
||||
Rucha Patel <rpa@tinyerp.com> <rpa@openerp.co.in>
|
||||
Rucha Patel <rpa@tinyerp.com> <rpa@openerp.com>
|
||||
|
||||
@@ -39,6 +39,9 @@ class CashBox(osv.osv_memory):
|
||||
return {}
|
||||
|
||||
def _create_bank_statement_line(self, cr, uid, box, record, context=None):
|
||||
if record.state == 'confirm':
|
||||
raise osv.except_osv(_('Error!'),
|
||||
_("You cannot put/take money in/out for a bank statement which is closed."))
|
||||
values = self._compute_values_for_statement_line(cr, uid, box, record, context=context)
|
||||
return self.pool.get('account.bank.statement').write(cr, uid, [record.id], {'line_ids': [(0, False, values)]}, context=context)
|
||||
|
||||
@@ -55,6 +58,7 @@ class CashBoxIn(CashBox):
|
||||
if not record.journal_id.internal_account_id.id:
|
||||
raise UserError(_("You should have defined an 'Internal Transfer Account' in your cash register's journal!"))
|
||||
return {
|
||||
'date': record.date,
|
||||
'statement_id': record.id,
|
||||
'journal_id': record.journal_id.id,
|
||||
'amount': box.amount or 0.0,
|
||||
@@ -74,6 +78,7 @@ class CashBoxOut(CashBox):
|
||||
raise UserError(_("You should have defined an 'Internal Transfer Account' in your cash register's journal!"))
|
||||
amount = box.amount or 0.0
|
||||
return {
|
||||
'date': record.date,
|
||||
'statement_id': record.id,
|
||||
'journal_id': record.journal_id.id,
|
||||
'amount': -amount if amount > 0.0 else amount,
|
||||
|
||||
@@ -92,12 +92,12 @@ class account_invoice_line(osv.osv):
|
||||
cacc = i_line.product_id.categ_id.property_account_expense_categ and i_line.product_id.categ_id.property_account_expense_categ.id
|
||||
if dacc and cacc:
|
||||
if i_line.move_id:
|
||||
price = i_line.move_id.product_id.standard_price
|
||||
from_unit = i_line.move_id.product_tmpl_id.uom_id.id
|
||||
to_unit = i_line.move_id.product_uom.id
|
||||
price_unit = self.pool['product.uom']._compute_price(cr, uid, from_unit, price, to_uom_id=to_unit)
|
||||
price_unit = i_line.move_id.price_unit
|
||||
else:
|
||||
price_unit = i_line.product_id.standard_price
|
||||
from_unit = i_line.product_id.uom_id.id
|
||||
to_unit = i_line.uos_id.id
|
||||
price_unit = self.pool['product.uom']._compute_price(cr, uid, from_unit, price_unit, to_uom_id=to_unit)
|
||||
return [
|
||||
{
|
||||
'type':'src',
|
||||
|
||||
@@ -44,6 +44,17 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="bank_statement_draft_form_inherit2" model="ir.ui.view">
|
||||
<field name="name">bank.statement.draft.form.inherit2</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form2"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='button_cancel']" position="after">
|
||||
<button name="button_draft" states="confirm" string="Reset to New" type="object"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="bank_statement_cancel_form_inherit" model="ir.ui.view">
|
||||
<field name="name">bank.statement.cancel.form.inherit</field>
|
||||
@@ -59,5 +70,19 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="bank_statement_cancel_form_inherit2" model="ir.ui.view">
|
||||
<field name="name">bank.statement.cancel.form.inherit2</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form2"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="line_ids" position="attributes">
|
||||
<attribute name="options">{'reload_on_button': true}</attribute>
|
||||
</field>
|
||||
<xpath expr="//field[@name='amount']" position="after">
|
||||
<field name="journal_entry_id" invisible="1"/>
|
||||
<button name="cancel" attrs="{'invisible': [('journal_entry_id', '=', False)]}" string="Cancel" type="object" icon="gtk-undo"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -50,7 +50,10 @@ class crm_lead_forward_to_partner(osv.TransientModel):
|
||||
values = {}
|
||||
else:
|
||||
stage = 'stage_portal_lead_recycle'
|
||||
message = _('<p>I am not interested by this lead. I %scontacted the lead.</p>') % (not wizard.contacted and 'have not ' or '')
|
||||
if wizard.contacted:
|
||||
message = _('<p>I am not interested by this lead. I %scontacted the lead.</p>') % ''
|
||||
else:
|
||||
message = _('<p>I am not interested by this lead. I have not contacted the lead.</p>')
|
||||
values = {'partner_assigned_id': False}
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
partner_ids = self.pool.get('res.partner').search(cr, SUPERUSER_ID, [('id', 'child_of', user.partner_id.commercial_partner_id.id)], context=context)
|
||||
|
||||
@@ -78,7 +78,7 @@ class sale_order(osv.Model):
|
||||
|
||||
grid = grid_obj.browse(cr, uid, grid_id, context=context)
|
||||
|
||||
taxes = grid.carrier_id.product_id.taxes_id
|
||||
taxes = grid.carrier_id.product_id.taxes_id.filtered(lambda t: t.company_id.id == order.company_id.id)
|
||||
fpos = order.fiscal_position or False
|
||||
taxes_ids = acc_fp_obj.map_tax(cr, uid, fpos, taxes)
|
||||
price_unit = grid_obj.get_price(cr, uid, grid.id, order, time.strftime('%Y-%m-%d'), context)
|
||||
|
||||
@@ -206,7 +206,7 @@ class google_calendar(osv.AbstractModel):
|
||||
context = {}
|
||||
if event.allday:
|
||||
start_date = fields.datetime.context_timestamp(cr, uid, datetime.strptime(event.start, tools.DEFAULT_SERVER_DATETIME_FORMAT), context=context).isoformat('T').split('T')[0]
|
||||
final_date = fields.datetime.context_timestamp(cr, uid, datetime.strptime(event.start, tools.DEFAULT_SERVER_DATETIME_FORMAT) + timedelta(hours=event.duration) + timedelta(days=isCreating and 1 or 0), context=context).isoformat('T').split('T')[0]
|
||||
final_date = fields.datetime.context_timestamp(cr, uid, datetime.strptime(event.stop, tools.DEFAULT_SERVER_DATETIME_FORMAT) + timedelta(days=1), context=context).isoformat('T').split('T')[0]
|
||||
type = 'date'
|
||||
vstype = 'dateTime'
|
||||
else:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
# coding: utf-8
|
||||
@@ -0,0 +1,28 @@
|
||||
# coding: utf-8
|
||||
|
||||
{
|
||||
'name': 'Saudi Arabia - Accounting',
|
||||
'version': '1.1',
|
||||
'sequence': 1,
|
||||
'author': 'DVIT.ME',
|
||||
'category': 'Localization/Account Charts',
|
||||
'description': """
|
||||
Odoo Arabic localization for most arabic countries and Saudi Arabia.
|
||||
|
||||
This initially includes chart of accounts of USA translated to Arabic.
|
||||
|
||||
In future this module will include some payroll rules for ME .
|
||||
""",
|
||||
'website': 'http://www.dvit.me',
|
||||
'depends': ['account_chart', 'l10n_multilang'],
|
||||
'data': [
|
||||
'account_type.xml',
|
||||
'account.account.template.csv',
|
||||
'account.chart.template.xml',
|
||||
'wizard.xml',
|
||||
],
|
||||
'demo': [],
|
||||
'test': [],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
id,code,name,type,user_type:id,parent_id:id,reconcile
|
||||
coa_basic,0,Basic,view,user_type_view,,False
|
||||
asset,1,Assets,view,user_type_current_asset,coa_basic,False
|
||||
current_asset,100,Current Assets,view,user_type_current_asset,asset,False
|
||||
cash_expenditure,1000,Cash and Bank,view,user_type_cash,current_asset,False
|
||||
receivables,1200,Receivable,view,user_type_current_asset,current_asset,False
|
||||
account_receivable,12001,Account Receivable,receivable,user_type_account_receivable,receivables,True
|
||||
fixed_asset,150,Fixed Assets,view,user_type_fixed_asset,asset,False
|
||||
15000_furniture_equipments,15000,Furniture and Equipment,other,user_type_fixed_asset,fixed_asset,False
|
||||
17000_accu_deprec,17000,Accumulated Depreciation,other,user_type_accumulated_depreciation,fixed_asset,False
|
||||
liability_equity,2,Liabilities and Equity,view,user_type_liability,coa_basic,False
|
||||
liability,20,Liabilities,view,user_type_liability,liability_equity,False
|
||||
current_liability,200,Current Liabilities,view,user_type_current_liability,liability,False
|
||||
payable,2000,Payable,view,user_type_account_payable,current_liability,False
|
||||
account_payable,20001,Account Payable,payable,user_type_account_payable,payable,True
|
||||
other_current_liability,240,Other Current Liabilities,view,user_type_other_current_liability,liability,False
|
||||
24000_payroll_exp,24000,Payroll Liabilities,other,user_type_other_current_liability,other_current_liability,False
|
||||
25500_sales_tax_pay,25500,Sales Tax Payable,other,user_type_other_current_liability,other_current_liability,False
|
||||
26500_use_tax_pay,26500,Use Tax Payable,other,user_type_other_current_liability,other_current_liability,False
|
||||
equity,30,Equity,view,user_type_equity,liability_equity,False
|
||||
30100_capital_stock,30100,Capital Stock,other,user_type_equity,equity,False
|
||||
30200_divid_paid,30200,Dividends Paid,other,user_type_equity,equity,False
|
||||
30000_open_balance,30000,Opening Balance Equity,other,user_type_equity,equity,False
|
||||
32000_retain_earn,32000,Retained Earnings,other,user_type_equity,equity,False
|
||||
expense,60,Expenses,view,user_type_expense,coa_basic,False
|
||||
60000_advert_promo,60000,Advertising and Promotion,other,user_type_expense,expense,False
|
||||
60200_auto_exp,60200,Automobile Expense,other,user_type_expense,expense,False
|
||||
60400_bank_charge,60400,Bank Service Charges,other,user_type_expense,expense,False
|
||||
61000_license_permit,61000,Business Licenses and Permits,other,user_type_expense,expense,False
|
||||
62000_financial_services,62000,Continuing Education,other,user_type_expense,expense,False
|
||||
61400_charit_contrib,61400,Charitable Contributions,other,user_type_expense,expense,False
|
||||
61700_computer_internet,61700,Computer and Internet Expenses,other,user_type_expense,expense,False
|
||||
62400_depreciation_exp,62400,Depreciation Expense,other,user_type_expense,expense,False
|
||||
62500_dues_subscrip,62500,Dues and Subscriptions,other,user_type_expense,expense,False
|
||||
62600_equip_rent,62600,Equipment Rental,other,user_type_expense,expense,False
|
||||
63400_interest_exp,63400,Interest Expense,other,user_type_expense,expense,False
|
||||
64300_meals_entertain,64300,Meals and Entertainment,other,user_type_expense,expense,False
|
||||
64900_office_supp,64900,Office Supplies,other,user_type_expense,expense,False
|
||||
66000_payroll_exp,66000,Payroll Expenses,other,user_type_expense,expense,False
|
||||
66500_postage_deliver,66500,Postage and Delivery,other,user_type_expense,expense,False
|
||||
66660_printing_reporduction,66600,Printing and Reproduction,other,user_type_expense,expense,False
|
||||
66700_prof_fees,66700,Professional Fees,other,user_type_expense,expense,False
|
||||
67100_rent_exp,67100,Rent Expense,other,user_type_expense,expense,False
|
||||
67200_repair_mainten,67200,Repairs and Maintenance,other,user_type_expense,expense,False
|
||||
68000_tax_property,68000,Taxes - Property,other,user_type_expense,expense,False
|
||||
68100_telephone_exp,68100,Telephone Expense,other,user_type_expense,expense,False
|
||||
68400_transport_travel,68400,Travel Expense,other,user_type_expense,expense,False
|
||||
68600_utilities,68600,Utilities,other,user_type_expense,expense,False
|
||||
64200_marketing_exp,64200,Marketing Expense,other,user_type_expense,expense,False
|
||||
63200_gas_oil_exp,63200,"Gasoline, Fuel and Oil",other,user_type_expense,expense,False
|
||||
base_miscexpense,69000,Miscellaneous Expense,other,user_type_expense,expense,False
|
||||
insurance,693,Insurance Expense,view,user_type_expense,expense,False
|
||||
69310_general_liab_insurance,69310,General Liability Insurance,other,user_type_expense,insurance,False
|
||||
69320_health_insurance,69320,Health Insurance,other,user_type_expense,insurance,False
|
||||
69330_life_insurance,69330,Life and Disability Insurance,other,user_type_expense,insurance,False
|
||||
69350_prof_insurance,69350,Professional Liability,other,user_type_expense,insurance,False
|
||||
69360_worker_compons,69360,Worker's Compensation,other,user_type_expense,insurance,False
|
||||
income,40,Income,view,user_type_income,coa_basic,False
|
||||
42400_commission_income,42400,Commission income,other,user_type_income,income,False
|
||||
47400_rent_income,47400,Rent Income,other,user_type_income,income,False
|
||||
47900_general_service_sales,47900,Service Sales,other,user_type_income,income,False
|
||||
47910_general_product_sales,47910,Product Sales,other,user_type_income,income,False
|
||||
48310_product_sales_discount,48310,Sales Discounts,other,user_type_income,income,False
|
||||
48900_product_shipping_income,48900,Shipping and Delivery Income,other,user_type_income,income,False
|
||||
base_miscincome,49000,Miscellaneous Income,other,user_type_income,income,False
|
||||
other_income,70,Other Income,view,user_type_other_income,coa_basic,False
|
||||
70000_finance_income,70000,Finance Charge Income,other,user_type_other_income,other_income,False
|
||||
70200_interest_income,70200,Interest Income,other,user_type_other_income,other_income,False
|
||||
70500_assets_sold,70500,Proceeds from Sale of Assets,other,user_type_other_income,other_income,False
|
||||
70100_insurance_income,70100,Insurance Proceeds Received,other,user_type_other_income,other_income,False
|
||||
cost_of_goods_sold,50,Cost of Goods Sold,view,user_type_cogs,coa_basic,False
|
||||
53600_other_related_costs,53600,Other Job Related Costs,other,user_type_cogs,cost_of_goods_sold,False
|
||||
51100_product_shipping_cost,51100,Freight and Shipping Costs,other,user_type_cogs,cost_of_goods_sold,False
|
||||
52500_product_purchase_discount,52500,Purchase Discounts,other,user_type_cogs,cost_of_goods_sold,False
|
||||
52900_general_product_cost,52900,Purchases - Resale Items,other,user_type_cogs,cost_of_goods_sold,False
|
||||
50300_commissions_paid,50300,Commissions Paid,other,user_type_cogs,cost_of_goods_sold,False
|
||||
53500_subcontracted_services,53500,Subcontractors Expense,other,user_type_cogs,cost_of_goods_sold,False
|
||||
52000_merchant_fees,52000,Merchant Account Fees,other,user_type_cogs,cost_of_goods_sold,False
|
||||
53800_subcontract_exp,53800,Subcontractors Expense,other,user_type_cogs,cost_of_goods_sold,False
|
||||
54100_tools_equip,54100,Tools and Small Equipment,other,user_type_cogs,cost_of_goods_sold,False
|
||||
24600_customer_deposit,24600,Customer Deposits Received,other,user_type_other_current_liability,other_current_liability,False
|
||||
|
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_arabic_coa_general" model="account.chart.template">
|
||||
<field name="name">Arabic General CoA</field>
|
||||
<field name="spoken_languages" eval="'en_US;ar_EG;ar_SY'"/>
|
||||
<field name="account_root_id" ref="coa_basic"/>
|
||||
<field name="complete_tax_set" eval="False" />
|
||||
<field name="tax_code_root_id" ref="account.tax_code_chart_root"/>
|
||||
<field name="bank_account_view_id" ref="cash_expenditure"/>
|
||||
<field name="property_account_receivable" ref="account_receivable"/>
|
||||
<field name="property_account_payable" ref="account_payable"/>
|
||||
<field name="property_account_expense_categ" ref="cost_of_goods_sold"/>
|
||||
<field name="property_account_income_categ" ref="income"/>
|
||||
<field name="property_account_expense" ref="52900_general_product_cost"/>
|
||||
<field name="property_account_income" ref="47910_general_product_sales"/>
|
||||
<field name="property_account_income_opening" ref="account.conf_o_income"/>
|
||||
<field name="property_account_expense_opening" ref="account.conf_o_expense"/>
|
||||
<field name="currency_id" ref="base.EGP"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- account.account.type -->
|
||||
<record id="user_type_view" model="account.account.type">
|
||||
<field name="name">View</field>
|
||||
<field name="code">view</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<!-- Asset -->
|
||||
|
||||
<record id="user_type_current_asset" model="account.account.type">
|
||||
<field name="name">Current Asset</field>
|
||||
<field name="code">current asset</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="user_type_cash" model="account.account.type">
|
||||
<field name="name">Cash</field>
|
||||
<field name="code">cash</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="user_type_account_receivable" model="account.account.type">
|
||||
<field name="name">Account Receivable</field>
|
||||
<field name="code">account rec</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record id="user_type_other_current_asset" model="account.account.type">
|
||||
<field name="name">Other Current Asset</field>
|
||||
<field name="code">other -current asset</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="user_type_fixed_asset" model="account.account.type">
|
||||
<field name="name">Fixed Asset</field>
|
||||
<field name="code">fixed asset</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="user_type_accumulated_depreciation" model="account.account.type">
|
||||
<field name="name">Accumulated Depreciation</field>
|
||||
<field name="code">Accumulated Depreciation</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="user_type_other_asset" model="account.account.type">
|
||||
<field name="name">Other Asset</field>
|
||||
<field name="code">other -asset</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<!-- liability -->
|
||||
<record id="user_type_account_payable" model="account.account.type">
|
||||
<field name="name">Account Payable</field>
|
||||
<field name="code">account -pay</field>
|
||||
<field name="report_type">liability</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record id="user_type_credit_card" model="account.account.type">
|
||||
<field name="name">Credit Card</field>
|
||||
<field name="code">credit -card</field>
|
||||
<field name="report_type">liability</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="user_type_current_liability" model="account.account.type">
|
||||
<field name="name">Current Liability</field>
|
||||
<field name="code">current -liability</field>
|
||||
<field name="report_type">liability</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="user_type_other_current_liability" model="account.account.type">
|
||||
<field name="name">Other Current Liability</field>
|
||||
<field name="code">other current -liability</field>
|
||||
<field name="report_type">liability</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="user_type_long_term_liability" model="account.account.type">
|
||||
<field name="name">Long term Liability</field>
|
||||
<field name="code">long term -liability</field>
|
||||
<field name="report_type">liability</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record id="user_type_liability" model="account.account.type">
|
||||
<field name="name">Liability</field>
|
||||
<field name="code">liability</field>
|
||||
<field name="report_type">liability</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<!-- Equity -->
|
||||
<record id="user_type_equity" model="account.account.type">
|
||||
<field name="name">Equity</field>
|
||||
<field name="code">equity</field>
|
||||
<field name="report_type">liability</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<!-- Income -->
|
||||
<record id="user_type_income" model="account.account.type">
|
||||
<field name="name">Income</field>
|
||||
<field name="code">income</field>
|
||||
<field name="report_type">income</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record id="user_type_other_income" model="account.account.type">
|
||||
<field name="name">Other Income</field>
|
||||
<field name="code">other -income</field>
|
||||
<field name="report_type">income</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<!-- Expense -->
|
||||
<record id="user_type_expense" model="account.account.type">
|
||||
<field name="name">Expense</field>
|
||||
<field name="code">expense</field>
|
||||
<field name="report_type">expense</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record id="user_type_other_expense" model="account.account.type">
|
||||
<field name="name">Other Expense</field>
|
||||
<field name="code">other -expense</field>
|
||||
<field name="report_type">expense</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record id="user_type_cogs" model="account.account.type">
|
||||
<field name="name">Cost of Goods Sold</field>
|
||||
<field name="code">cogs</field>
|
||||
<field name="report_type">expense</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,588 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_sa
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0-20150526\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-07-04 00:06+0000\n"
|
||||
"PO-Revision-Date: 2015-07-04 02:06+0200\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: \n"
|
||||
"Language: ar\n"
|
||||
"X-Generator: Poedit 1.7.5\n"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:hr.holidays.status,name:l10n_sa.hr_holiday_absence
|
||||
msgid "ABS"
|
||||
msgstr "ABS"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.account_payable
|
||||
#: model:account.account.type,name:l10n_sa.user_type_account_payable
|
||||
msgid "Account Payable"
|
||||
msgstr "حـ.الدائنون/المدفوعات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.account_receivable
|
||||
#: model:account.account.type,name:l10n_sa.user_type_account_receivable
|
||||
msgid "Account Receivable"
|
||||
msgstr "حـ.المدينون/المقبوضات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.17000_accu_deprec
|
||||
#: model:account.account.type,name:l10n_sa.user_type_accumulated_depreciation
|
||||
msgid "Accumulated Depreciation"
|
||||
msgstr "مجمع اهلاك"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.60000_advert_promo
|
||||
msgid "Advertising and Promotion"
|
||||
msgstr "دعاية واعلان"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.asset
|
||||
msgid "Assets"
|
||||
msgstr "اصول"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.60200_auto_exp
|
||||
msgid "Automobile Expense"
|
||||
msgstr "مصاريف سيارات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.60400_bank_charge
|
||||
msgid "Bank Service Charges"
|
||||
msgstr "رسوم خدمات بنكية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.coa_basic
|
||||
msgid "Basic"
|
||||
msgstr "أساسي"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.61000_license_permit
|
||||
msgid "Business Licenses and Permits"
|
||||
msgstr "تصاريح وتراخيص"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.30100_capital_stock
|
||||
msgid "Capital Stock"
|
||||
msgstr "رأس المال"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_cash
|
||||
msgid "Cash"
|
||||
msgstr "نقدي"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.cash_expenditure
|
||||
msgid "Cash and Bank"
|
||||
msgstr "التقدية والبنك"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.61400_charit_contrib
|
||||
msgid "Charitable Contributions"
|
||||
msgstr "تبرعات خيرية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.42400_commission_income
|
||||
msgid "Commission income"
|
||||
msgstr "ايراد عمولات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.50300_commissions_paid
|
||||
msgid "Commissions Paid"
|
||||
msgstr "عمولات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.61700_computer_internet
|
||||
msgid "Computer and Internet Expenses"
|
||||
msgstr "مصاريف تقنية ومعلومات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.62000_financial_services
|
||||
msgid "Continuing Education"
|
||||
msgstr "تعليم مستمر"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.cost_of_goods_sold
|
||||
#: model:account.account.type,name:l10n_sa.user_type_cogs
|
||||
msgid "Cost of Goods Sold"
|
||||
msgstr "تكاليف بضاعة"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_credit_card
|
||||
msgid "Credit Card"
|
||||
msgstr "بطاقة ائتمان"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_current_asset
|
||||
msgid "Current Asset"
|
||||
msgstr "اصول متداولة"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.current_asset
|
||||
msgid "Current Assets"
|
||||
msgstr "اصول متداولة"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.current_liability
|
||||
msgid "Current Liabilities"
|
||||
msgstr "التزامات حالية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_current_liability
|
||||
msgid "Current Liability"
|
||||
msgstr "التزامات حالية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.24600_customer_deposit
|
||||
msgid "Customer Deposits Received"
|
||||
msgstr "ايداعات عملاء"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.62400_depreciation_exp
|
||||
msgid "Depreciation Expense"
|
||||
msgstr "مصروفات اهلاك"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.30200_divid_paid
|
||||
msgid "Dividends Paid"
|
||||
msgstr "ارباح موزعة"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.62500_dues_subscrip
|
||||
msgid "Dues and Subscriptions"
|
||||
msgstr "اشتراكات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:hr.holidays.status,name:l10n_sa.hr_holiday_early
|
||||
msgid "ERLY"
|
||||
msgstr "ERLY"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.62600_equip_rent
|
||||
msgid "Equipment Rental"
|
||||
msgstr "ايجار معدات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.equity
|
||||
#: model:account.account.type,name:l10n_sa.user_type_equity
|
||||
msgid "Equity"
|
||||
msgstr "ملكية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_expense
|
||||
msgid "Expense"
|
||||
msgstr "مصروف"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.expense
|
||||
msgid "Expenses"
|
||||
msgstr "مصروفات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.70000_finance_income
|
||||
msgid "Finance Charge Income"
|
||||
msgstr "إيرادات ودائع"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_fixed_asset
|
||||
msgid "Fixed Asset"
|
||||
msgstr "اصول ثابتة"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.fixed_asset
|
||||
msgid "Fixed Assets"
|
||||
msgstr "اصول ثابتة"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.51100_product_shipping_cost
|
||||
msgid "Freight and Shipping Costs"
|
||||
msgstr "تكاليف شحن وتوصيل"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.15000_furniture_equipments
|
||||
msgid "Furniture and Equipment"
|
||||
msgstr "اثاث ومعدات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.63200_gas_oil_exp
|
||||
msgid "Gasoline, Fuel and Oil"
|
||||
msgstr "مصروفات محروقات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.chart.template,name:l10n_sa.account_arabic_coa_general
|
||||
msgid "General Arabic CoA"
|
||||
msgstr "شجرة عامة عربية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.69310_general_liab_insurance
|
||||
msgid "General Liability Insurance"
|
||||
msgstr "تأمينات اجتماعية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:hr.holidays.status,name:l10n_sa.hr_holiday_halfday
|
||||
msgid "HDL"
|
||||
msgstr "HDL"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.69320_health_insurance
|
||||
msgid "Health Insurance"
|
||||
msgstr "تامين صحي"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.income
|
||||
#: model:account.account.type,name:l10n_sa.user_type_income
|
||||
msgid "Income"
|
||||
msgstr "الدخل"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.insurance
|
||||
msgid "Insurance Expense"
|
||||
msgstr "مصروفات تأمينات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.70100_insurance_income
|
||||
msgid "Insurance Proceeds Received"
|
||||
msgstr "ايرادات تأمينات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.63400_interest_exp
|
||||
msgid "Interest Expense"
|
||||
msgstr "مصروفات فوائد"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.70200_interest_income
|
||||
msgid "Interest Income"
|
||||
msgstr "ايرادات فوائد"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:ir.model,name:l10n_sa.model_account_journal
|
||||
msgid "Journal"
|
||||
msgstr "يومية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:hr.holidays.status,name:l10n_sa.hr_holiday_late
|
||||
msgid "LATE"
|
||||
msgstr "LATE"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.liability
|
||||
msgid "Liabilities"
|
||||
msgstr "التزامات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.liability_equity
|
||||
msgid "Liabilities and Equity"
|
||||
msgstr "التزامات وملكية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_liability
|
||||
msgid "Liability"
|
||||
msgstr "الخصوم"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.69330_life_insurance
|
||||
msgid "Life and Disability Insurance"
|
||||
msgstr "تأمينات على الحياة وضد الاصابات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_long_term_liability
|
||||
msgid "Long term Liability"
|
||||
msgstr "إلتزامات طويلة الأمد"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: code:addons/l10n_sa/account.py:112
|
||||
#, python-format
|
||||
msgid "MISC"
|
||||
msgstr "MISC"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.64200_marketing_exp
|
||||
msgid "Marketing Expense"
|
||||
msgstr "مصروفات تسويق"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.64300_meals_entertain
|
||||
msgid "Meals and Entertainment"
|
||||
msgstr "وجبات وترفيه"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.52000_merchant_fees
|
||||
msgid "Merchant Account Fees"
|
||||
msgstr "رسوم حساب تجاري"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.base_miscexpense
|
||||
msgid "Miscellaneous Expense"
|
||||
msgstr "مصروفات نثرية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.base_miscincome
|
||||
msgid "Miscellaneous Income"
|
||||
msgstr "ايرادات متنوعة"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: code:addons/l10n_sa/account.py:104
|
||||
#, python-format
|
||||
msgid "Miscellaneous Journal"
|
||||
msgstr "يومية متنوعة ونثريات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: code:addons/l10n_sa/account.py:113
|
||||
#, python-format
|
||||
msgid "OPEN"
|
||||
msgstr "OPEN"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.64900_office_supp
|
||||
msgid "Office Supplies"
|
||||
msgstr "مستلزمات مكتب"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.30000_open_balance
|
||||
msgid "Opening Balance Equity"
|
||||
msgstr "ارصدة ملكية افتتاحية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: code:addons/l10n_sa/account.py:105
|
||||
#, python-format
|
||||
msgid "Opening Entries Journal"
|
||||
msgstr "يومية افتتاحية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_other_asset
|
||||
msgid "Other Asset"
|
||||
msgstr "أصول أخرى"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_other_current_asset
|
||||
msgid "Other Current Asset"
|
||||
msgstr "أصول متداولة أخرى"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.other_current_liability
|
||||
msgid "Other Current Liabilities"
|
||||
msgstr "التزامات حالية اخرى"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_other_current_liability
|
||||
msgid "Other Current Liability"
|
||||
msgstr "إلتزامات حالية أخرى"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_other_expense
|
||||
msgid "Other Expense"
|
||||
msgstr "مصروفات أخرى"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.other_income
|
||||
#: model:account.account.type,name:l10n_sa.user_type_other_income
|
||||
msgid "Other Income"
|
||||
msgstr "ايرادات متنوعة"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.53600_other_related_costs
|
||||
msgid "Other Job Related Costs"
|
||||
msgstr "تكاليف عمل"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: code:addons/l10n_sa/account.py:111
|
||||
#, python-format
|
||||
msgid "PRFD"
|
||||
msgstr "PRFD"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: code:addons/l10n_sa/account.py:109
|
||||
#, python-format
|
||||
msgid "PURC"
|
||||
msgstr "PURC"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.payable
|
||||
msgid "Payable"
|
||||
msgstr "دائنون/مدفوعات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.66000_payroll_exp
|
||||
msgid "Payroll Expenses"
|
||||
msgstr "مصروفات مرتبات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.24000_payroll_exp
|
||||
msgid "Payroll Liabilities"
|
||||
msgstr "التزامات مرتبات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.66500_postage_deliver
|
||||
msgid "Postage and Delivery"
|
||||
msgstr "بريد وشحن"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.66660_printing_reporduction
|
||||
msgid "Printing and Reproduction"
|
||||
msgstr "طباعة واعلان"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.70500_assets_sold
|
||||
msgid "Proceeds from Sale of Assets"
|
||||
msgstr "مبيعات اصول"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.47910_general_product_sales
|
||||
msgid "Product Sales"
|
||||
msgstr "مبيعات بضاعة"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.66700_prof_fees
|
||||
msgid "Professional Fees"
|
||||
msgstr "رسوم مهنية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.69350_prof_insurance
|
||||
msgid "Professional Liability"
|
||||
msgstr "نقابة ومسؤلية مهنية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.52500_product_purchase_discount
|
||||
msgid "Purchase Discounts"
|
||||
msgstr "خصومات مشتريات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: code:addons/l10n_sa/account.py:103
|
||||
#, python-format
|
||||
msgid "Purchase Refund Journal"
|
||||
msgstr "يومية مرتجع مشتريات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: code:addons/l10n_sa/account.py:101
|
||||
#, python-format
|
||||
msgid "Purchase/Expenses Journal"
|
||||
msgstr "يومية مشتريات ومصروفات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.52900_general_product_cost
|
||||
msgid "Purchases - Resale Items"
|
||||
msgstr "تكاليف بضاعة"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.receivables
|
||||
msgid "Receivable"
|
||||
msgstr "مدينون/مقبوضات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.67100_rent_exp
|
||||
msgid "Rent Expense"
|
||||
msgstr "مصروفات استإجار"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.47400_rent_income
|
||||
msgid "Rent Income"
|
||||
msgstr "ايرادات تأجير"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.67200_repair_mainten
|
||||
msgid "Repairs and Maintenance"
|
||||
msgstr "صيانة واصلاح"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.32000_retain_earn
|
||||
msgid "Retained Earnings"
|
||||
msgstr "ارباح محجوزة"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: code:addons/l10n_sa/account.py:108
|
||||
#, python-format
|
||||
msgid "SALE"
|
||||
msgstr "SALE"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: code:addons/l10n_sa/account.py:110
|
||||
#, python-format
|
||||
msgid "SRFD"
|
||||
msgstr "SRFD"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.48310_product_sales_discount
|
||||
msgid "Sales Discounts"
|
||||
msgstr "خصومات مبيعات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: code:addons/l10n_sa/account.py:102
|
||||
#, python-format
|
||||
msgid "Sales Refund Journal"
|
||||
msgstr "يومية مرتجع مبيعات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.25500_sales_tax_pay
|
||||
msgid "Sales Tax Payable"
|
||||
msgstr "التزامات ضرائب مبيعات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: code:addons/l10n_sa/account.py:100
|
||||
#, python-format
|
||||
msgid "Sales/Income Journal"
|
||||
msgstr "يومية مبيعات وايرادات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.47900_general_service_sales
|
||||
msgid "Service Sales"
|
||||
msgstr "مبيعات خدمات"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.48900_product_shipping_income
|
||||
msgid "Shipping and Delivery Income"
|
||||
msgstr "ايرادات شحن وتوصيل"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.53500_subcontracted_services
|
||||
#: model:account.account.template,name:l10n_sa.53800_subcontract_exp
|
||||
msgid "Subcontractors Expense"
|
||||
msgstr "مصاريف خدمات خارجية"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.68000_tax_property
|
||||
msgid "Taxes - Property"
|
||||
msgstr "ضريبة املاك"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.68100_telephone_exp
|
||||
msgid "Telephone Expense"
|
||||
msgstr "مصروفات هاتف"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.54100_tools_equip
|
||||
msgid "Tools and Small Equipment"
|
||||
msgstr "معدات وادوات بناء"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.68400_transport_travel
|
||||
msgid "Travel Expense"
|
||||
msgstr "مصروفات انتقال وسفر"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.26500_use_tax_pay
|
||||
msgid "Use Tax Payable"
|
||||
msgstr "التزامات ضرائب استخدام"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.68600_utilities
|
||||
msgid "Utilities"
|
||||
msgstr "فواتير مرافق"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.type,name:l10n_sa.user_type_view
|
||||
msgid "View"
|
||||
msgstr "عرض"
|
||||
|
||||
#. module: l10n_sa
|
||||
#: model:account.account.template,name:l10n_sa.69360_worker_compons
|
||||
msgid "Worker's Compensation"
|
||||
msgstr "تعويضات عمال"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,9 @@
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -634,6 +634,7 @@ class MassMailing(osv.Model):
|
||||
'reply_to': lambda self, cr, uid, ctx=None: self.pool['mail.message']._get_default_from(cr, uid, context=ctx),
|
||||
'mailing_model': 'mail.mass_mailing.contact',
|
||||
'contact_ab_pc': 100,
|
||||
'mailing_domain': [],
|
||||
}
|
||||
|
||||
def onchange_mass_mailing_campaign_id(self, cr, uid, id, mass_mailing_campaign_ids, context=None):
|
||||
@@ -709,7 +710,7 @@ class MassMailing(osv.Model):
|
||||
else:
|
||||
value['mailing_domain'] = "[('list_id', '=', False)]"
|
||||
else:
|
||||
value['mailing_domain'] = False
|
||||
value['mailing_domain'] = []
|
||||
value['body_html'] = "on_change_model_and_list"
|
||||
return {'value': value}
|
||||
|
||||
|
||||
@@ -228,10 +228,17 @@ class TxPaypal(osv.Model):
|
||||
if tx.partner_reference and data.get('payer_id') != tx.partner_reference:
|
||||
invalid_parameters.append(('payer_id', data.get('payer_id'), tx.partner_reference))
|
||||
# check seller
|
||||
if data.get('receiver_email') != tx.acquirer_id.paypal_email_account:
|
||||
invalid_parameters.append(('receiver_email', data.get('receiver_email'), tx.acquirer_id.paypal_email_account))
|
||||
if data.get('receiver_id') and tx.acquirer_id.paypal_seller_account and data['receiver_id'] != tx.acquirer_id.paypal_seller_account:
|
||||
invalid_parameters.append(('receiver_id', data.get('receiver_id'), tx.acquirer_id.paypal_seller_account))
|
||||
if not data.get('receiver_id') or not tx.acquirer_id.paypal_seller_account:
|
||||
# Check receiver_email only if receiver_id was not checked.
|
||||
# In Paypal, this is possible to configure as receiver_email a different email than the business email (the login email)
|
||||
# In Odoo, there is only one field for the Paypal email: the business email. This isn't possible to set a receiver_email
|
||||
# different than the business email. Therefore, if you want such a configuration in your Paypal, you are then obliged to fill
|
||||
# the Merchant ID in the Paypal payment acquirer in Odoo, so the check is performed on this variable instead of the receiver_email.
|
||||
# At least one of the two checks must be done, to avoid fraudsters.
|
||||
if data.get('receiver_email') != tx.acquirer_id.paypal_email_account:
|
||||
invalid_parameters.append(('receiver_email', data.get('receiver_email'), tx.acquirer_id.paypal_email_account))
|
||||
|
||||
return invalid_parameters
|
||||
|
||||
|
||||
@@ -1279,7 +1279,7 @@ class pos_order(osv.osv):
|
||||
'credit': ((tax_amount>0) and tax_amount) or 0.0,
|
||||
'debit': ((tax_amount<0) and -tax_amount) or 0.0,
|
||||
'tax_code_id': key[tax_code_pos],
|
||||
'tax_amount': abs(tax_amount),
|
||||
'tax_amount': tax_amount,
|
||||
'partner_id': order.partner_id and self.pool.get("res.partner")._find_accounting_partner(order.partner_id).id or False
|
||||
})
|
||||
|
||||
|
||||
@@ -690,6 +690,9 @@ openerp.point_of_sale.load_screens = function load_screens(instance, module){ //
|
||||
this.product_list_widget.set_product_list(products); // FIXME: this should be moved elsewhere ...
|
||||
|
||||
this.el.querySelector('.searchbox input').addEventListener('keyup',this.search_handler);
|
||||
$('.searchbox input', this.el).keypress(function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
this.el.querySelector('.search-clear').addEventListener('click',this.clear_search_handler);
|
||||
|
||||
|
||||
@@ -1499,7 +1499,7 @@ class procurement_order(osv.osv):
|
||||
if qty != po_line.product_qty:
|
||||
pricelist_obj = self.pool.get('product.pricelist')
|
||||
pricelist_id = po_line.order_id.partner_id.property_product_pricelist_purchase.id
|
||||
price = pricelist_obj.price_get(cr, uid, [pricelist_id], procurement.product_id.id, qty, po_line.order_id.partner_id.id, {'uom': procurement.product_uom.id})[pricelist_id]
|
||||
price = pricelist_obj.price_get(cr, uid, [pricelist_id], procurement.product_id.id, qty, po_line.order_id.partner_id.id, {'uom': procurement.product_id.uom_po_id.id})[pricelist_id]
|
||||
|
||||
return qty, price
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class stock_move(osv.osv):
|
||||
invoice_line_vals['purchase_line_id'] = move.purchase_line_id.id
|
||||
invoice_line_vals['account_analytic_id'] = move.purchase_line_id.account_analytic_id.id or False
|
||||
invoice_line_id = super(stock_move, self)._create_invoice_line_from_vals(cr, uid, move, invoice_line_vals, context=context)
|
||||
if move.purchase_line_id:
|
||||
if context.get('inv_type') in ('in_invoice', 'in_refund') and move.purchase_line_id:
|
||||
purchase_line = move.purchase_line_id
|
||||
self.pool.get('purchase.order.line').write(cr, uid, [purchase_line.id], {
|
||||
'invoice_lines': [(4, invoice_line_id)]
|
||||
|
||||
+1
-1
@@ -1054,7 +1054,7 @@ class sale_order_line(osv.osv):
|
||||
return {'value': value}
|
||||
|
||||
def create(self, cr, uid, values, context=None):
|
||||
if values.get('order_id') and values.get('product_id') and any(f not in values for f in ['name', 'price_unit', 'type', 'product_uom_qty', 'product_uom']):
|
||||
if values.get('order_id') and values.get('product_id') and any(f not in values for f in ['name', 'price_unit', 'product_uom_qty', 'product_uom']):
|
||||
order = self.pool['sale.order'].read(cr, uid, values['order_id'], ['pricelist_id', 'partner_id', 'date_order', 'fiscal_position'], context=context)
|
||||
defaults = self.product_id_change(cr, uid, [], order['pricelist_id'][0], values['product_id'],
|
||||
qty=float(values.get('product_uom_qty', False)),
|
||||
|
||||
@@ -1529,7 +1529,7 @@ class stock_picking(osv.osv):
|
||||
op = operation
|
||||
if (operation.qty_done < operation.product_qty):
|
||||
new_operation = stock_operation_obj.copy(cr, uid, operation.id, {'product_qty': operation.qty_done,'qty_done': operation.qty_done}, context=context)
|
||||
stock_operation_obj.write(cr, uid, operation.id, {'product_qty': operation.product_qty - operation.qty_done,'qty_done': 0, 'lot_id': False}, context=context)
|
||||
stock_operation_obj.write(cr, uid, operation.id, {'product_qty': operation.product_qty - operation.qty_done,'qty_done': 0}, context=context)
|
||||
op = stock_operation_obj.browse(cr, uid, new_operation, context=context)
|
||||
pack_operation_ids.append(op.id)
|
||||
if op.product_id and op.location_id and op.location_dest_id:
|
||||
@@ -4164,7 +4164,7 @@ class stock_pack_operation(osv.osv):
|
||||
if pack_op.qty_done < pack_op.product_qty:
|
||||
# we split the operation in two
|
||||
op = self.copy(cr, uid, pack_op.id, {'product_qty': pack_op.qty_done, 'qty_done': pack_op.qty_done}, context=context)
|
||||
self.write(cr, uid, [pack_op.id], {'product_qty': pack_op.product_qty - pack_op.qty_done, 'qty_done': 0, 'lot_id': False}, context=context)
|
||||
self.write(cr, uid, [pack_op.id], {'product_qty': pack_op.product_qty - pack_op.qty_done, 'qty_done': 0}, context=context)
|
||||
processed_ids.append(op)
|
||||
self.write(cr, uid, processed_ids, {'processed': 'true'}, context=context)
|
||||
|
||||
|
||||
@@ -65,12 +65,11 @@ class stock_landed_cost(osv.osv):
|
||||
if move.product_id.valuation != 'real_time' or move.product_id.cost_method != 'real':
|
||||
continue
|
||||
total_cost = 0.0
|
||||
total_qty = move.product_qty
|
||||
weight = move.product_id and move.product_id.weight * move.product_qty
|
||||
volume = move.product_id and move.product_id.volume * move.product_qty
|
||||
for quant in move.quant_ids:
|
||||
total_cost += quant.cost
|
||||
vals = dict(product_id=move.product_id.id, move_id=move.id, quantity=move.product_uom_qty, former_cost=total_cost * total_qty, weight=weight, volume=volume)
|
||||
total_cost += quant.cost * quant.qty
|
||||
vals = dict(product_id=move.product_id.id, move_id=move.id, quantity=move.product_uom_qty, former_cost=total_cost, weight=weight, volume=volume)
|
||||
lines.append(vals)
|
||||
if not lines:
|
||||
raise UserError(_('The selected picking does not contain any move that would be impacted by landed costs. Landed costs are only possible for products configured in real time valuation with real price costing method. Please make sure it is the case, or you selected the correct picking'))
|
||||
|
||||
@@ -153,7 +153,7 @@ class sale_order(osv.osv):
|
||||
for order in self.browse(cr, uid, ids, context=context):
|
||||
total = 0.0
|
||||
for line in order.order_line:
|
||||
total += (line.product_uom_qty * line.price_unit)
|
||||
total += line.price_subtotal + line.price_unit * ((line.discount or 0.0) / 100.0) * line.product_uom_qty
|
||||
res[order.id] = total
|
||||
return res
|
||||
|
||||
|
||||
@@ -925,16 +925,30 @@ class website_sale(http.Controller):
|
||||
""" Transforms a list of order lines into a dict for google analytics """
|
||||
ret = []
|
||||
for line in order_lines:
|
||||
product = line.product_id
|
||||
ret.append({
|
||||
'id': line.order_id and line.order_id.id,
|
||||
'sku': line.product_id.id,
|
||||
'name': line.product_id.name or '-',
|
||||
'category': line.product_id.categ_id and line.product_id.categ_id.name or '-',
|
||||
'sku': product.ean13 or product.id,
|
||||
'name': product.name or '-',
|
||||
'category': product.categ_id and product.categ_id.name or '-',
|
||||
'price': line.price_unit,
|
||||
'quantity': line.product_uom_qty,
|
||||
})
|
||||
return ret
|
||||
|
||||
def order_2_return_dict(self, order):
|
||||
""" Returns the tracking_cart dict of the order for Google analytics basically defined to be inherited """
|
||||
return {
|
||||
'transaction': {
|
||||
'id': order.id,
|
||||
'affiliation': order.company_id.name,
|
||||
'revenue': order.amount_total,
|
||||
'tax': order.amount_tax,
|
||||
'currency': order.currency_id.name
|
||||
},
|
||||
'lines': self.order_lines_2_google_api(order.order_line)
|
||||
}
|
||||
|
||||
@http.route(['/shop/tracking_last_order'], type='json', auth="public")
|
||||
def tracking_cart(self, **post):
|
||||
""" return data about order in JSON needed for google analytics"""
|
||||
@@ -943,13 +957,7 @@ class website_sale(http.Controller):
|
||||
sale_order_id = request.session.get('sale_last_order_id')
|
||||
if sale_order_id:
|
||||
order = request.registry['sale.order'].browse(cr, SUPERUSER_ID, sale_order_id, context=context)
|
||||
ret['transaction'] = {
|
||||
'id': sale_order_id,
|
||||
'affiliation': order.company_id.name,
|
||||
'revenue': order.amount_total,
|
||||
'currency': order.currency_id.name
|
||||
}
|
||||
ret['lines'] = self.order_lines_2_google_api(order.order_line)
|
||||
ret = self.order_2_return_dict(order)
|
||||
return ret
|
||||
|
||||
@http.route(['/shop/get_unit_price'], type='json', auth="public", methods=['POST'], website=True)
|
||||
|
||||
@@ -26,3 +26,11 @@ class website_sale(openerp.addons.website_sale.controllers.main.website_sale):
|
||||
""" Transforms a list of order lines into a dict for google analytics """
|
||||
order_lines_not_delivery = [line for line in order_lines if not line.is_delivery]
|
||||
return super(website_sale, self).order_lines_2_google_api(order_lines_not_delivery)
|
||||
|
||||
def order_2_return_dict(self, order):
|
||||
""" Returns the tracking_cart dict of the order for Google analytics """
|
||||
ret = super(website_sale, self).order_2_return_dict(order)
|
||||
for line in order.order_line:
|
||||
if line.is_delivery:
|
||||
ret['transaction']['shipping'] = line.price_unit
|
||||
return ret
|
||||
|
||||
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 221 KiB |
@@ -19,10 +19,12 @@ Yannick Vaucher yannick.vaucher@camptocamp.com https://github.com/yvaucher
|
||||
Nicolas Bessi nicolas.bessi@camptocamp.com https://github.com/nbessi
|
||||
Frédéric Clementi frederic.clementi@camptocamp.com https://github.com/fclementic2c
|
||||
Laurent Meuwly laurent.meuwly@camptocamp.com https://github.com/laurentmeuwly
|
||||
Vincent Renaville vincet.renaville@camptocamp.com https://github.com/vrenaville
|
||||
Vincent Renaville vincent.renaville@camptocamp.com https://github.com/vrenaville
|
||||
Matthieu Dietrich matthieu.dietrich@camptocamp.com https://github.com/mdietrichc2c
|
||||
Alexandre Fayolle alexandre.fayolle@camptocamp.com https://github.com/gurneyalex
|
||||
Leonardo Pistone leonardo.pistone@camptocamp.com https://github.com/lepistone
|
||||
Romain Deheele romain.deheele@camptocamp.com https://github.com/rdeheele
|
||||
Maxime Wiot maxime.wiot@camptocamp.com https://github.com/maxime-c2c
|
||||
Ferdinand Gassauer ferdinand.gassauer@camptocamp.com https://github.com/ferdiga
|
||||
Jean-Baptiste Aubort jean-baptiste.aubort@camptocamp.com
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
Belgium, 18/7/2015
|
||||
|
||||
Lubon bvba agrees to the terms of the Odoo Corporate Contributor License
|
||||
Agreement v1.0.
|
||||
|
||||
I declare that I am authorized and able to make this agreement and sign this
|
||||
declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Luc Bonjean luc@lubon.bvba https://github.com/lubonbvba
|
||||
|
||||
List of contributors:
|
||||
|
||||
Luc Bonjean luc@lubon.be https://github.com/lubonbvba
|
||||
@@ -0,0 +1,11 @@
|
||||
China, 2015-09-02
|
||||
|
||||
I hereby agree to the terms of the Odoo Individual Contributor License
|
||||
Agreement v1.0.
|
||||
|
||||
I declare that I am authorized and able to make this agreement and sign this
|
||||
declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Joshua Jan popkar77@gmail.com https://github.com/joshuajan
|
||||
@@ -0,0 +1,12 @@
|
||||
Egypt, 2015-07-20
|
||||
|
||||
I hereby agree to the terms of the Odoo Individual Contributor License
|
||||
Agreement v1.0.
|
||||
|
||||
I declare that I am authorized and able to make this agreement and sign this
|
||||
declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Mohamed Hagag mohamedhagag1981@gmail.com https://github.com/mohamedhagag
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
Spain, 2015-09-04
|
||||
|
||||
I hereby agree to the terms of the Odoo Individual Contributor License Agreement v1.0.
|
||||
|
||||
I declare that I am authorized and able to make this agreement and sign this declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Pedro Rodriguez Gil pedro@otherway.es https://github.com/pedrorgil
|
||||
|
||||
@@ -21,3 +21,4 @@ Reference
|
||||
reference/reports
|
||||
reference/workflows
|
||||
reference/guidelines
|
||||
reference/upgrade_api
|
||||
|
||||
@@ -0,0 +1,501 @@
|
||||
:banner: banners/upgrade_api.jpg
|
||||
:types: api
|
||||
|
||||
|
||||
:code-column:
|
||||
|
||||
.. _reference/upgrade-api:
|
||||
|
||||
===========
|
||||
Upgrade API
|
||||
===========
|
||||
|
||||
This document describes the API used to upgrade an Odoo database to a
|
||||
higher version.
|
||||
|
||||
It allows a database to be upgraded without ressorting to the html form at
|
||||
https://upgrade.odoo.com/database/upload
|
||||
Although the database will follow the same process described on that form.
|
||||
|
||||
|
||||
The required steps are:
|
||||
|
||||
* creating a request
|
||||
* uploading a database dump
|
||||
* running the upgrade process
|
||||
* obtaining the status of the database request
|
||||
* downloading the upgraded database dump
|
||||
|
||||
.. _upgrade-api-create-method:
|
||||
|
||||
Creating a database upgrade request
|
||||
===================================
|
||||
|
||||
This action creates a database request with the following information:
|
||||
|
||||
* your contract reference
|
||||
* your email address
|
||||
* the target version (the Odoo version you want to upgrade to)
|
||||
* the purpose of your request (test or production)
|
||||
* the database dump name (required but purely informative)
|
||||
* optionally the server timezone (for Odoo source version < 6.1)
|
||||
|
||||
create method
|
||||
-------------
|
||||
|
||||
.. py:function:: https://upgrade.odoo.com/database/v1/create
|
||||
|
||||
Creates a database upgrade request
|
||||
|
||||
:param str contract: (required) your enterprise contract reference
|
||||
:param str email: (required) your email address
|
||||
:param str target: (required) the Odoo version you want to upgrade to. Valid choices: 6.0, 6.1, 7.0, 8.0
|
||||
:param str aim: (required) the purpose of your upgrade database request. Valid choices: test, production.
|
||||
:param str filename: (required) a purely informative name for you database dump file
|
||||
:param str timezone: (optional) the timezone used by your server. Only for Odoo source version < 6.1
|
||||
:return: request result
|
||||
:rtype: json dictionary
|
||||
|
||||
|
||||
The *create* method returns a json dictionary containing the following keys:
|
||||
|
||||
failures
|
||||
''''''''
|
||||
|
||||
The list of errors.
|
||||
|
||||
A list of dictionaries, each dictionary giving information about one particular
|
||||
error. Each dictionary can contain various keys depending of the type of error
|
||||
but you will always get the *reason* and the *message* keys:
|
||||
|
||||
* ``reason``: the error type
|
||||
* ``message``: a human friendly message
|
||||
|
||||
Some possible keys:
|
||||
|
||||
* ``code``: a faulty value
|
||||
* ``value``: a faulty value
|
||||
* ``expected``: a list of valid values
|
||||
|
||||
See a sample output aside.
|
||||
|
||||
.. rst-class:: setup doc-aside
|
||||
|
||||
.. switcher::
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"failures": [
|
||||
{
|
||||
"expected": [
|
||||
"6.0",
|
||||
"6.1",
|
||||
"7.0",
|
||||
"8.0",
|
||||
],
|
||||
"message": "Invalid value \"5.0\"",
|
||||
"reason": "TARGET:INVALID",
|
||||
"value": "5.0"
|
||||
},
|
||||
{
|
||||
"code": "M123456-abcxyz",
|
||||
"message": "Can not find contract M123456-abcxyz",
|
||||
"reason": "CONTRACT:NOT_FOUND"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
request
|
||||
'''''''
|
||||
|
||||
If the *create* method is successful, the value associated to the *request* key
|
||||
will be a dictionary containing various information about the created request:
|
||||
|
||||
The most important keys are:
|
||||
|
||||
* ``id``: the request id
|
||||
* ``key``: your private key for this request
|
||||
|
||||
These 2 values will be requested by the other methods (upload, process and status)
|
||||
|
||||
The other keys will be explained in the section describing the :ref:`status method <upgrade-api-status-method>`.
|
||||
|
||||
|
||||
Sample script
|
||||
'''''''''''''
|
||||
|
||||
Here are 2 examples of database upgrade request creation using:
|
||||
|
||||
* one in the python programming language using the pycurl library
|
||||
* one in the bash programming language using `curl <http://curl.haxx.se>`_ (tool
|
||||
for transfering data using http) and `jq <https://stedolan.github.io/jq>`_ (JSON processor):
|
||||
|
||||
.. rst-class:: setup doc-aside
|
||||
|
||||
.. switcher::
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from urllib import urlencode
|
||||
from io import BytesIO
|
||||
import pycurl
|
||||
import json
|
||||
|
||||
CREATE_URL = "https://upgrade.odoo.com/database/v1/create"
|
||||
CONTRACT = "M123456-abcdef"
|
||||
AIM = "test"
|
||||
TARGET = "8.0"
|
||||
EMAIL = "john.doe@example.com"
|
||||
FILENAME = "db_name.dump"
|
||||
|
||||
fields = dict([
|
||||
('aim', AIM),
|
||||
('email', EMAIL),
|
||||
('filename', DB_SOURCE),
|
||||
('contract', CONTRACT),
|
||||
('target', TARGET),
|
||||
])
|
||||
postfields = urlencode(fields)
|
||||
|
||||
c = pycurl.Curl()
|
||||
c.setopt(pycurl.URL, CREATE_URL)
|
||||
c.setopt(c.POSTFIELDS, postfields)
|
||||
data = BytesIO()
|
||||
c.setopt(c.WRITEFUNCTION, data.write)
|
||||
c.perform()
|
||||
|
||||
# transform output into a dict:
|
||||
response = json.loads(data.getvalue())
|
||||
|
||||
# get http status:
|
||||
http_code = c.getinfo(pycurl.HTTP_CODE)
|
||||
c.close()
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
CONTRACT=M123456-abcdef
|
||||
AIM=test
|
||||
TARGET=8.0
|
||||
EMAIL=john.doe@example.com
|
||||
FILENAME=db_name.dump
|
||||
CREATE_URL="https://upgrade.odoo.com/database/v1/create"
|
||||
URL_PARAMS="contract=${CONTRACT}&aim=${AIM}&target=${TARGET}&email=${EMAIL}&filename=${FILENAME}"
|
||||
curl -sS "${CREATE_URL}?${URL_PARAMS}" > create_result.json
|
||||
|
||||
# check for failures
|
||||
failures=$(cat create_result.json | jq -r '.failures[]')
|
||||
if [ "$failures" != "" ]; then
|
||||
echo $failures | jq -r '.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
.. _upgrade-api-upload-method:
|
||||
|
||||
Uploading your database dump
|
||||
============================
|
||||
|
||||
This action upload your database dump.
|
||||
|
||||
upload method
|
||||
-------------
|
||||
|
||||
.. py:function:: https://upgrade.odoo.com/database/v1/upload
|
||||
|
||||
Uploads a database dump
|
||||
|
||||
:param str key: (required) your private key
|
||||
:param str request: (required) your request id
|
||||
:return: request result
|
||||
:rtype: json dictionary
|
||||
|
||||
The request id and the private key are obtained using the :ref:`create method
|
||||
<upgrade-api-create-method>`
|
||||
|
||||
The result is a json dictionary containing the list of ``failures``, which
|
||||
should be empty if everything went fine.
|
||||
|
||||
.. rst-class:: setup doc-aside
|
||||
|
||||
.. switcher::
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import os
|
||||
import pycurl
|
||||
from urllib import urlencode
|
||||
from io import BytesIO
|
||||
import json
|
||||
|
||||
UPLOAD_URL = "https://upgrade.odoo.com/database/v1/upload"
|
||||
DUMPFILE = "openchs.70.cdump"
|
||||
|
||||
fields = dict([
|
||||
('request', '10534'),
|
||||
('key', 'Aw7pItGVKFuZ_FOR3U8VFQ=='),
|
||||
])
|
||||
headers = {"Content-Type": "application/octet-stream"}
|
||||
postfields = urlencode(fields)
|
||||
|
||||
c = pycurl.Curl()
|
||||
c.setopt(pycurl.URL, UPLOAD_URL+"?"+postfields)
|
||||
c.setopt(pycurl.POST, 1)
|
||||
filesize = os.path.getsize(DUMPFILE)
|
||||
c.setopt(pycurl.POSTFIELDSIZE, filesize)
|
||||
fp = open(DUMPFILE, 'rb')
|
||||
c.setopt(pycurl.READFUNCTION, fp.read)
|
||||
c.setopt(
|
||||
pycurl.HTTPHEADER,
|
||||
['%s: %s' % (k, headers[k]) for k in headers])
|
||||
|
||||
c.perform()
|
||||
c.close()
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
UPLOAD_URL="https://upgrade.odoo.com/database/v1/upload"
|
||||
DUMPFILE="openchs.70.cdump"
|
||||
KEY="Aw7pItGVKFuZ_FOR3U8VFQ=="
|
||||
REQUEST_ID="10534"
|
||||
URL_PARAMS="key=${KEY}&request=${REQUEST_ID}"
|
||||
HEADER="Content-Type: application/octet-stream"
|
||||
curl -H $HEADER --data-binary "@${DUMPFILE}" "${UPLOAD_URL}?${URL_PARAMS}"
|
||||
|
||||
.. _upgrade-api-process-method:
|
||||
|
||||
Asking to process your request
|
||||
==============================
|
||||
|
||||
This action ask the Upgrade Platform to process your database dump.
|
||||
|
||||
process method
|
||||
--------------
|
||||
|
||||
.. py:function:: https://upgrade.odoo.com/database/v1/process
|
||||
|
||||
Process a database dump
|
||||
|
||||
:param str key: (required) your private key
|
||||
:param str request: (required) your request id
|
||||
:return: request result
|
||||
:rtype: json dictionary
|
||||
|
||||
The request id and the private key are obtained using the :ref:`create method
|
||||
<upgrade-api-create-method>`
|
||||
|
||||
The result is a json dictionary containing the list of ``failures``, which
|
||||
should be empty if everything went fine.
|
||||
|
||||
.. rst-class:: setup doc-aside
|
||||
|
||||
.. switcher::
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from urllib import urlencode
|
||||
from io import BytesIO
|
||||
import pycurl
|
||||
import json
|
||||
|
||||
PROCESS_URL = "https://upgrade.odoo.com/database/v1/process"
|
||||
|
||||
fields = dict([
|
||||
('request', '10534'),
|
||||
('key', 'Aw7pItGVKFuZ_FOR3U8VFQ=='),
|
||||
])
|
||||
postfields = urlencode(fields)
|
||||
|
||||
c = pycurl.Curl()
|
||||
c.setopt(pycurl.URL, PROCESS_URL)
|
||||
c.setopt(c.POSTFIELDS, postfields)
|
||||
data = BytesIO()
|
||||
c.setopt(c.WRITEFUNCTION, data.write)
|
||||
c.perform()
|
||||
|
||||
# transform output into a dict:
|
||||
response = json.loads(data.getvalue())
|
||||
|
||||
# get http status:
|
||||
http_code = c.getinfo(pycurl.HTTP_CODE)
|
||||
c.close()
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
PROCESS_URL="https://upgrade.odoo.com/database/v1/process"
|
||||
KEY="Aw7pItGVKFuZ_FOR3U8VFQ=="
|
||||
REQUEST_ID="10534"
|
||||
URL_PARAMS="key=${KEY}&request=${REQUEST_ID}"
|
||||
curl -sS "${PROCESS_URL}?${URL_PARAMS}"
|
||||
|
||||
.. _upgrade-api-status-method:
|
||||
|
||||
Obtaining your request status
|
||||
=============================
|
||||
|
||||
This action ask the status of your database upgrade request.
|
||||
|
||||
status method
|
||||
-------------
|
||||
|
||||
.. py:function:: https://upgrade.odoo.com/database/v1/status
|
||||
|
||||
Ask the status of a database upgrade request
|
||||
|
||||
:param str key: (required) your private key
|
||||
:param str request: (required) your request id
|
||||
:return: request result
|
||||
:rtype: json dictionary
|
||||
|
||||
The request id and the private key are obtained using the :ref:`create method
|
||||
<upgrade-api-create-method>`
|
||||
|
||||
The result is a json dictionary containing various information about your
|
||||
database upgrade request.
|
||||
|
||||
.. rst-class:: setup doc-aside
|
||||
|
||||
.. switcher::
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from urllib import urlencode
|
||||
from io import BytesIO
|
||||
import pycurl
|
||||
import json
|
||||
|
||||
STATUS_URL = "https://upgrade.odoo.com/database/v1/status"
|
||||
|
||||
fields = dict([
|
||||
('request', '10534'),
|
||||
('key', 'Aw7pItGVKFuZ_FOR3U8VFQ=='),
|
||||
])
|
||||
postfields = urlencode(fields)
|
||||
|
||||
c = pycurl.Curl()
|
||||
c.setopt(pycurl.URL, PROCESS_URL)
|
||||
c.setopt(c.POSTFIELDS, postfields)
|
||||
data = BytesIO()
|
||||
c.setopt(c.WRITEFUNCTION, data.write)
|
||||
c.perform()
|
||||
|
||||
# transform output into a dict:
|
||||
response = json.loads(data.getvalue())
|
||||
|
||||
c.close()
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
STATUS_URL="https://upgrade.odoo.com/database/v1/status"
|
||||
KEY="Aw7pItGVKFuZ_FOR3U8VFQ=="
|
||||
REQUEST_ID="10534"
|
||||
URL_PARAMS="key=${KEY}&request=${REQUEST_ID}"
|
||||
curl -sS "${PROCESS_URL}?${URL_PARAMS}"
|
||||
|
||||
|
||||
Sample output
|
||||
-------------
|
||||
|
||||
The ``request`` key contains various useful information about your request:
|
||||
|
||||
``id``
|
||||
the request id
|
||||
``key``
|
||||
your private key
|
||||
``email``
|
||||
the email address you supplied when creating the request
|
||||
``target``
|
||||
the target Odoo version you supplied when creating the request
|
||||
``aim``
|
||||
the purpose (test, production) of your database upgrade request you supplied when creating the request
|
||||
``filename``
|
||||
the filename you supplied when creating the request
|
||||
``timezone``
|
||||
the timezone you supplied when creating the request
|
||||
``state``
|
||||
the state of your request
|
||||
``issue_stage``
|
||||
the stage of the issue we have create on Odoo main server
|
||||
``issue``
|
||||
the id of the issue we have create on Odoo main server
|
||||
``status_url``
|
||||
the URL to access your database upgrade request html page
|
||||
``notes_url``
|
||||
the URL to get the notes about your database upgrade
|
||||
``original_sql_url``
|
||||
the URL used to get your uploaded (not upgraded) database as an SQL stream
|
||||
``original_dump_url``
|
||||
the URL used to get your uploaded (not upgraded) database as an archive file
|
||||
``upgraded_sql_url``
|
||||
the URL used to get your upgraded database as an SQL stream
|
||||
``upgraded_dump_url``
|
||||
the URL used to get your upgraded database as an archive file
|
||||
``modules_url``
|
||||
the URL used to get your custom modules
|
||||
``filesize``
|
||||
the size of your uploaded database file
|
||||
``database_uuid``
|
||||
the Unique ID of your database
|
||||
``created_at``
|
||||
the date when you created the request
|
||||
``estimated_time``
|
||||
an estimation of the time it takes to upgrade your database
|
||||
``processed_at``
|
||||
time when your database upgrade was started
|
||||
``elapsed``
|
||||
the time it takes to upgrade your database
|
||||
``filestore``
|
||||
your attachments were converted to the filestore
|
||||
``customer_message``
|
||||
an important message related to your request
|
||||
``database_version``
|
||||
the guessed Odoo version of your uploaded (not upgraded) database
|
||||
``postgresql``
|
||||
the guessed Postgresql version of your uploaded (not upgraded) database
|
||||
``compressions``
|
||||
the compression methods used by your uploaded database
|
||||
|
||||
.. rst-class:: setup doc-aside
|
||||
|
||||
.. switcher::
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"failures": [],
|
||||
"request": {
|
||||
"id": 10534,
|
||||
"key": "Aw7pItGVKFuZ_FOR3U8VFQ==",
|
||||
"email": "john.doe@example.com",
|
||||
"target": "8.0",
|
||||
"aim": "test",
|
||||
"filename": "db_name.dump",
|
||||
"timezone": null,
|
||||
"state": "draft",
|
||||
"issue_stage": "new",
|
||||
"issue": 648398,
|
||||
"status_url": "https://upgrade.odoo.com/database/eu1/10534/Aw7pItGVKFuZ_FOR3U8VFQ==/status",
|
||||
"notes_url": "https://upgrade.odoo.com/database/eu1/10534/Aw7pItGVKFuZ_FOR3U8VFQ==/upgraded/notes",
|
||||
"original_sql_url": "https://upgrade.odoo.com/database/eu1/10534/Aw7pItGVKFuZ_FOR3U8VFQ==/original/sql",
|
||||
"original_dump_url": "https://upgrade.odoo.com/database/eu1/10534/Aw7pItGVKFuZ_FOR3U8VFQ==/original/archive",
|
||||
"upgraded_sql_url": "https://upgrade.odoo.com/database/eu1/10534/Aw7pItGVKFuZ_FOR3U8VFQ==/upgraded/sql",
|
||||
"upgraded_dump_url": "https://upgrade.odoo.com/database/eu1/10534/Aw7pItGVKFuZ_FOR3U8VFQ==/upgraded/archive",
|
||||
"modules_url": "https://upgrade.odoo.com/database/eu1/10534/Aw7pItGVKFuZ_FOR3U8VFQ==/modules/archive",
|
||||
"filesize": "912.99 Kb",
|
||||
"database_uuid": null,
|
||||
"created_at": "2015-09-09 07:13:49",
|
||||
"estimated_time": null,
|
||||
"processed_at": null,
|
||||
"elapsed": "00:00",
|
||||
"filestore": false,
|
||||
"customer_message": null,
|
||||
"database_version": null,
|
||||
"postgresql": "9.4",
|
||||
"compressions": [
|
||||
"pgdmp_custom",
|
||||
"sql"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -153,11 +153,6 @@ class view(osv.osv):
|
||||
result.update(map(itemgetter('res_id', 'id'), data_ids))
|
||||
return result
|
||||
|
||||
def _views_from_model_data(self, cr, uid, ids, context=None):
|
||||
IMD = self.pool['ir.model.data']
|
||||
data_ids = IMD.search_read(cr, uid, [('id', 'in', ids), ('model', '=', 'ir.ui.view')], ['res_id'], context=context)
|
||||
return map(itemgetter('res_id'), data_ids)
|
||||
|
||||
def _arch_get(self, cr, uid, ids, name, arg, context=None):
|
||||
result = {}
|
||||
|
||||
@@ -211,11 +206,7 @@ class view(osv.osv):
|
||||
'inherit_id': fields.many2one('ir.ui.view', 'Inherited View', ondelete='restrict', select=True),
|
||||
'inherit_children_ids': fields.one2many('ir.ui.view','inherit_id', 'Inherit Views'),
|
||||
'field_parent': fields.char('Child Field'),
|
||||
'model_data_id': fields.function(_get_model_data, type='many2one', relation='ir.model.data', string="Model Data",
|
||||
store={
|
||||
_name: (lambda s, c, u, i, ctx=None: i, None, 10),
|
||||
'ir.model.data': (_views_from_model_data, ['model', 'res_id'], 10),
|
||||
}),
|
||||
'model_data_id': fields.function(_get_model_data, type='many2one', relation='ir.model.data', string="Model Data", store=True),
|
||||
'xml_id': fields.function(osv.osv.get_xml_id, type='char', size=128, string="External ID",
|
||||
help="ID of the view defined in xml file"),
|
||||
'groups_id': fields.many2many('res.groups', 'ir_ui_view_group_rel', 'view_id', 'group_id',
|
||||
|
||||
@@ -49,6 +49,7 @@ from openerp.modules.db import create_categories
|
||||
from openerp.modules import get_module_resource
|
||||
from openerp.tools.parse_version import parse_version
|
||||
from openerp.tools.translate import _
|
||||
from openerp.tools import html_sanitize
|
||||
from openerp.osv import osv, orm, fields
|
||||
from openerp import api, fields as fields2
|
||||
|
||||
@@ -176,7 +177,7 @@ class module(osv.osv):
|
||||
for element, attribute, link, pos in html.iterlinks():
|
||||
if element.get('src') and not '//' in element.get('src') and not 'static/' in element.get('src'):
|
||||
element.set('src', "/%s/static/description/%s" % (module.name, element.get('src')))
|
||||
res[module.id] = lxml.html.tostring(html)
|
||||
res[module.id] = html_sanitize(lxml.html.tostring(html))
|
||||
else:
|
||||
overrides = {
|
||||
'embed_stylesheet': False,
|
||||
@@ -185,7 +186,7 @@ class module(osv.osv):
|
||||
'xml_declaration': False,
|
||||
}
|
||||
output = publish_string(source=module.description or '', settings_overrides=overrides, writer=MyWriter())
|
||||
res[module.id] = output
|
||||
res[module.id] = html_sanitize(output)
|
||||
return res
|
||||
|
||||
def _get_latest_version(self, cr, uid, ids, field_name=None, arg=None, context=None):
|
||||
|
||||
@@ -515,5 +515,12 @@ class test_expression(common.TransactionCase):
|
||||
ids = Country.search(self.cr, self.uid, domain)
|
||||
self.assertListEqual([be], ids)
|
||||
|
||||
def test_long_table_alias(self):
|
||||
# To test the 64 characters limit for table aliases in PostgreSQL
|
||||
self.patch_order('res.users', 'partner_id')
|
||||
self.patch_order('res.partner', 'commercial_partner_id,company_id,name')
|
||||
self.patch_order('res.company', 'parent_id')
|
||||
self.env['res.users'].search([('name', '=', 'test')])
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest2.main()
|
||||
|
||||
@@ -5,18 +5,6 @@ import openerp.tests.common as common
|
||||
|
||||
class test_search(common.TransactionCase):
|
||||
|
||||
def patch_order(self, model, order):
|
||||
m_e = self.env[model]
|
||||
m_r = self.registry(model)
|
||||
|
||||
old_order = m_e._order
|
||||
|
||||
@self.addCleanup
|
||||
def cleanup():
|
||||
m_r._order = type(m_e)._order = old_order
|
||||
|
||||
m_r._order = type(m_e)._order = order
|
||||
|
||||
def test_00_search_order(self):
|
||||
|
||||
registry, cr, uid = self.registry, self.cr, self.uid
|
||||
|
||||
@@ -1313,6 +1313,8 @@ class Root(object):
|
||||
path_static = os.path.join(addons_path, module, 'static')
|
||||
if os.path.isfile(manifest_path) and os.path.isdir(path_static):
|
||||
manifest = ast.literal_eval(open(manifest_path).read())
|
||||
if not manifest.get('installable', True):
|
||||
continue
|
||||
manifest['addons_path'] = addons_path
|
||||
_logger.debug("Loading %s", module)
|
||||
if 'openerp.addons' in sys.modules:
|
||||
|
||||
@@ -135,6 +135,7 @@ import collections
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
from zlib import crc32
|
||||
|
||||
import openerp.modules
|
||||
from . import fields
|
||||
@@ -343,7 +344,16 @@ def generate_table_alias(src_table_alias, joined_tables=[]):
|
||||
return '%s' % alias, '%s' % _quote(alias)
|
||||
for link in joined_tables:
|
||||
alias += '__' + link[1]
|
||||
assert len(alias) < 64, 'Table alias name %s is longer than the 64 characters size accepted by default in postgresql.' % alias
|
||||
# Use an alternate alias scheme if length exceeds the PostgreSQL limit
|
||||
# of 63 characters.
|
||||
if len(alias) >= 64:
|
||||
# We have to fit a crc32 hash and one underscore
|
||||
# into a 63 character alias. The remaining space we can use to add
|
||||
# a human readable prefix.
|
||||
alias_hash = hex(crc32(alias))[2:]
|
||||
ALIAS_PREFIX_LENGTH = 63 - len(alias_hash) - 1
|
||||
alias = "%s_%s" % (
|
||||
alias[:ALIAS_PREFIX_LENGTH], alias_hash)
|
||||
return '%s' % alias, '%s as %s' % (_quote(joined_tables[-1][0]), _quote(alias))
|
||||
|
||||
|
||||
|
||||
@@ -823,12 +823,9 @@ class one2many(_column):
|
||||
else:
|
||||
cr.execute('update '+_table+' set '+self._fields_id+'=null where id=%s', (act[1],))
|
||||
elif act[0] == 4:
|
||||
# table of the field (parent_model in case of inherit)
|
||||
field = obj.pool[self._obj]._fields[self._fields_id]
|
||||
field_model = field.base_field.model_name
|
||||
field_table = obj.pool[field_model]._table
|
||||
cr.execute("select 1 from {0} where id=%s and {1}=%s".format(field_table, self._fields_id), (act[1], id))
|
||||
if not cr.fetchone():
|
||||
# check whether the given record is already linked
|
||||
rec = obj.browse(cr, SUPERUSER_ID, act[1], {'prefetch_fields': False})
|
||||
if int(rec[self._fields_id]) != id:
|
||||
# Must use write() to recompute parent_store structure if needed and check access rules
|
||||
obj.write(cr, user, [act[1]], {self._fields_id:id}, context=context or {})
|
||||
elif act[0] == 5:
|
||||
|
||||
@@ -151,6 +151,18 @@ class TransactionCase(BaseCase):
|
||||
self.cr.rollback()
|
||||
self.cr.close()
|
||||
|
||||
def patch_order(self, model, order):
|
||||
m_e = self.env[model]
|
||||
m_r = self.registry(model)
|
||||
|
||||
old_order = m_e._order
|
||||
|
||||
@self.addCleanup
|
||||
def cleanup():
|
||||
m_r._order = type(m_e)._order = old_order
|
||||
|
||||
m_r._order = type(m_e)._order = order
|
||||
|
||||
|
||||
class SingleTransactionCase(BaseCase):
|
||||
""" TestCase in which all test methods are run in the same transaction,
|
||||
|
||||
@@ -54,6 +54,12 @@ safe_attrs = clean.defs.safe_attrs | frozenset(
|
||||
])
|
||||
|
||||
|
||||
class _Cleaner(clean.Cleaner):
|
||||
def allow_element(self, el):
|
||||
if el.tag == 'object' and el.get('type') == "image/svg+xml":
|
||||
return True
|
||||
return super(_Cleaner, self).allow_element(el)
|
||||
|
||||
def html_sanitize(src, silent=True, strict=False, strip_style=False):
|
||||
if not src:
|
||||
return src
|
||||
@@ -99,7 +105,7 @@ def html_sanitize(src, silent=True, strict=False, strip_style=False):
|
||||
|
||||
try:
|
||||
# some corner cases make the parser crash (such as <SCRIPT/XSS SRC=\"http://ha.ckers.org/xss.js\"></SCRIPT> in test_mail)
|
||||
cleaner = clean.Cleaner(**kwargs)
|
||||
cleaner = _Cleaner(**kwargs)
|
||||
cleaned = cleaner.clean_html(src)
|
||||
# MAKO compatibility: $, { and } inside quotes are escaped, preventing correct mako execution
|
||||
cleaned = cleaned.replace('%24', '$')
|
||||
|
||||
@@ -502,6 +502,7 @@ ALL_LANGUAGES = {
|
||||
'es_UY': u'Spanish (UY) / Español (UY)',
|
||||
'es_VE': u'Spanish (VE) / Español (VE)',
|
||||
'et_EE': u'Estonian / Eesti keel',
|
||||
'eu_ES': u'Basque / Euskara',
|
||||
'fa_IR': u'Persian / فارس',
|
||||
'fi_FI': u'Finnish / Suomi',
|
||||
'fr_BE': u'French (BE) / Français (BE)',
|
||||
|
||||
@@ -843,16 +843,19 @@ def trans_generate(lang, modules, cr):
|
||||
lambda m: m['name'],
|
||||
registry['ir.module.module'].search_read(cr, uid, [('state', '=', 'installed')], fields=['name']))
|
||||
|
||||
path_list = list(openerp.modules.module.ad_paths)
|
||||
path_list = [(path, True) for path in openerp.modules.module.ad_paths]
|
||||
# Also scan these non-addon paths
|
||||
for bin_path in ['osv', 'report' ]:
|
||||
path_list.append(os.path.join(config.config['root_path'], bin_path))
|
||||
for bin_path in ['osv', 'report', 'modules', 'service', 'tools']:
|
||||
path_list.append((os.path.join(config.config['root_path'], bin_path), True))
|
||||
|
||||
# non-recursive scan for individual files in root directory but without
|
||||
# scanning subdirectories that may contain addons
|
||||
path_list.append((config.config['root_path'], False))
|
||||
_logger.debug("Scanning modules at paths: %s", path_list)
|
||||
|
||||
def get_module_from_path(path):
|
||||
for mp in path_list:
|
||||
if path.startswith(mp) and os.path.dirname(path) != mp:
|
||||
for (mp, rec) in path_list:
|
||||
if rec and path.startswith(mp) and os.path.dirname(path) != mp:
|
||||
path = path[len(mp)+1:]
|
||||
return path.split(os.path.sep)[0]
|
||||
return 'base' # files that are not in a module are considered as being in 'base' module
|
||||
@@ -887,7 +890,7 @@ def trans_generate(lang, modules, cr):
|
||||
finally:
|
||||
src_file.close()
|
||||
|
||||
for path in path_list:
|
||||
for (path, recursive) in path_list:
|
||||
_logger.debug("Scanning files of modules at %s", path)
|
||||
for root, dummy, files in osutil.walksymlinks(path):
|
||||
for fname in fnmatch.filter(files, '*.py'):
|
||||
@@ -906,6 +909,9 @@ def trans_generate(lang, modules, cr):
|
||||
for fname in fnmatch.filter(files, '*.xml'):
|
||||
babel_extract_terms(fname, path, root, 'openerp.tools.translate:babel_extract_qweb',
|
||||
extra_comments=[WEB_TRANSLATION_COMMENT])
|
||||
if not recursive:
|
||||
# due to topdown, first iteration is in first level
|
||||
break
|
||||
|
||||
out = []
|
||||
# translate strings marked as to be translated
|
||||
|
||||
Reference in New Issue
Block a user