diff --git a/addons/account/account.py b/addons/account/account.py
index b6fd7232a25..335822b7299 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1788,7 +1788,7 @@ class account_tax_code(osv.osv):
'line_ids': fields.one2many('account.move.line', 'tax_code_id', 'Lines'),
'company_id': fields.many2one('res.company', 'Company', required=True),
'sign': fields.float('Coefficent for parent', required=True, help='You can specify here the coefficient that will be used when consolidating the amount of this case into its parent. For example, set 1/-1 if you want to add/substract it.'),
- 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any VAT related to this Tax Code to appear on invoices"),
+ 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any tax related to this tax code to appear on invoices"),
'sequence': fields.integer('Sequence', help="Determine the display order in the report 'Accounting \ Reporting \ Generic Reporting \ Taxes \ Taxes Report'"),
}
@@ -1880,17 +1880,17 @@ class account_tax(osv.osv):
'python_applicable':fields.text('Python Code'),
#
- # Fields used for the VAT declaration
+ # Fields used for the Tax declaration
#
- 'base_code_id': fields.many2one('account.tax.code', 'Account Base Code', help="Use this code for the VAT declaration."),
- 'tax_code_id': fields.many2one('account.tax.code', 'Account Tax Code', help="Use this code for the VAT declaration."),
+ 'base_code_id': fields.many2one('account.tax.code', 'Account Base Code', help="Use this code for the tax declaration."),
+ 'tax_code_id': fields.many2one('account.tax.code', 'Account Tax Code', help="Use this code for the tax declaration."),
'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
# Same fields for refund invoices
- 'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the VAT declaration."),
- 'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the VAT declaration."),
+ 'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the tax declaration."),
+ 'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the tax declaration."),
'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
'include_base_amount': fields.boolean('Included in base amount', help="Indicates if the amount of tax must be included in the base amount for the computation of the next taxes"),
@@ -2217,7 +2217,7 @@ class account_tax(osv.osv):
def compute_inv(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, precision=None):
"""
Compute tax values for given PRICE_UNIT, QUANTITY and a buyer/seller ADDRESS_ID.
- Price Unit is a VAT included price
+ Price Unit is a Tax included price
RETURN:
[ tax ]
@@ -2673,7 +2673,7 @@ class account_tax_code_template(osv.osv):
'parent_id': fields.many2one('account.tax.code.template', 'Parent Code', select=True),
'child_ids': fields.one2many('account.tax.code.template', 'parent_id', 'Child Codes'),
'sign': fields.float('Sign For Parent', required=True),
- 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any VAT related to this Tax Code to appear on invoices"),
+ 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any tax related to this tax Code to appear on invoices."),
}
_defaults = {
@@ -2788,17 +2788,17 @@ class account_tax_template(osv.osv):
'python_applicable':fields.text('Python Code'),
#
- # Fields used for the VAT declaration
+ # Fields used for the Tax declaration
#
- 'base_code_id': fields.many2one('account.tax.code.template', 'Base Code', help="Use this code for the VAT declaration."),
- 'tax_code_id': fields.many2one('account.tax.code.template', 'Tax Code', help="Use this code for the VAT declaration."),
+ 'base_code_id': fields.many2one('account.tax.code.template', 'Base Code', help="Use this code for the tax declaration."),
+ 'tax_code_id': fields.many2one('account.tax.code.template', 'Tax Code', help="Use this code for the tax declaration."),
'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
# Same fields for refund invoices
- 'ref_base_code_id': fields.many2one('account.tax.code.template', 'Refund Base Code', help="Use this code for the VAT declaration."),
- 'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Refund Tax Code', help="Use this code for the VAT declaration."),
+ 'ref_base_code_id': fields.many2one('account.tax.code.template', 'Refund Base Code', help="Use this code for the tax declaration."),
+ 'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Refund Tax Code', help="Use this code for the tax declaration."),
'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
'include_base_amount': fields.boolean('Include in Base Amount', help="Set if the amount of tax must be included in the base amount before computing the next taxes."),
@@ -3351,15 +3351,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
# Create Bank journals
self._create_bank_journals_from_o2m(cr, uid, obj_wizard, company_id, acc_template_ref, context=context)
- action = {
- 'type': 'ir.actions.act_window',
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'board.board',
- 'view_id': self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'board_account_form')[1],
- 'menu_id': self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'menu_finance')[1]
- }
- return action
+ return {}
def _prepare_bank_journal(self, cr, uid, line, current_num, default_account_id, company_id, context=None):
'''
diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py
index bea48528f63..927ce94db31 100644
--- a/addons/account/account_cash_statement.py
+++ b/addons/account/account_cash_statement.py
@@ -132,18 +132,18 @@ class account_cash_statement(osv.osv):
for obj in self.browse(cr, uid, ids, context=context):
if obj.state == 'draft':
- self.search(cr, uid,
- [('journal_id', '=', journal_id),('state', '=', 'confirm')],
+ statement_ids = self.search(cr, uid,
+ [('journal_id', '=', obj.journal_id.id),('state', '=', 'confirm')],
order='create_date desc',
limit=1,
context=context
)
if not statement_ids:
- return result
-
- st = self.browse(cr, uid, statement_ids[0], context=context)
- result[obj.id] = st.balance_end_real
+ continue
+ else:
+ st = self.browse(cr, uid, statement_ids[0], context=context)
+ result[obj.id] = st.balance_end_real
return result
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 211a40f030f..1296d5c718a 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -177,11 +177,11 @@
domain="[('supplier', '=', True)]"/>
-
-
diff --git a/addons/account/test/account_cash_statement.yml b/addons/account/test/account_cash_statement.yml
index 5ead46522bd..6bff530bb54 100644
--- a/addons/account/test/account_cash_statement.yml
+++ b/addons/account/test/account_cash_statement.yml
@@ -1,5 +1,5 @@
-
- In order to test Cash statement I create a Cash statement and confirm it and check it's move created
+ In order to test Cash statement I create a Cash statement and confirm it and check its move created
-
!record {model: account.bank.statement, id: account_bank_statement_1}:
date: !eval time.strftime('%Y-%m-%d')
diff --git a/addons/account/wizard/account_chart_view.xml b/addons/account/wizard/account_chart_view.xml
index d7820caa647..553d83fa01c 100644
--- a/addons/account/wizard/account_chart_view.xml
+++ b/addons/account/wizard/account_chart_view.xml
@@ -7,13 +7,18 @@
form
- Send follow-ups
+ Send Follow-Upsir.actions.act_windowaccount.followup.print.allform
diff --git a/addons/account_payment/account_payment.py b/addons/account_payment/account_payment.py
index 80d7a5419e7..22b7fc5f6f2 100644
--- a/addons/account_payment/account_payment.py
+++ b/addons/account_payment/account_payment.py
@@ -87,9 +87,9 @@ class payment_order(osv.osv):
return res
_columns = {
- 'date_scheduled': fields.date('Scheduled date if fixed', states={'done':[('readonly', True)]}, help='Select a date if you have chosen Preferred Date to be fixed.'),
+ 'date_scheduled': fields.date('Scheduled Date', states={'done':[('readonly', True)]}, help='Select a date if you have chosen Preferred Date to be fixed.'),
'reference': fields.char('Reference', size=128, required=1, states={'done': [('readonly', True)]}),
- 'mode': fields.many2one('payment.mode', 'Payment mode', select=True, required=1, states={'done': [('readonly', True)]}, help='Select the Payment Mode to be applied.'),
+ 'mode': fields.many2one('payment.mode', 'Payment Mode', select=True, required=1, states={'done': [('readonly', True)]}, help='Select the Payment Mode to be applied.'),
'state': fields.selection([
('draft', 'Draft'),
('cancel', 'Cancelled'),
@@ -98,14 +98,14 @@ class payment_order(osv.osv):
help='When an order is placed the state is \'Draft\'.\n Once the bank is confirmed the state is set to \'Confirmed\'.\n Then the order is paid the state is \'Done\'.'),
'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}),
'total': fields.function(_total, string="Total", type='float'),
- 'user_id': fields.many2one('res.users', 'User', required=True, states={'done': [('readonly', True)]}),
+ 'user_id': fields.many2one('res.users', 'Responsible', required=True, states={'done': [('readonly', True)]}),
'date_prefered': fields.selection([
('now', 'Directly'),
('due', 'Due date'),
('fixed', 'Fixed date')
- ], "Preferred date", change_default=True, required=True, states={'done': [('readonly', True)]}, help="Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."),
- 'date_created': fields.date('Creation date', readonly=True),
- 'date_done': fields.date('Execution date', readonly=True),
+ ], "Preferred Date", change_default=True, required=True, states={'done': [('readonly', True)]}, help="Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."),
+ 'date_created': fields.date('Creation Date', readonly=True),
+ 'date_done': fields.date('Execution Date', readonly=True),
'company_id': fields.related('mode', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
}
diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml
index cf91dcc80a2..1577d1b86bd 100644
--- a/addons/account_payment/account_payment_view.xml
+++ b/addons/account_payment/account_payment_view.xml
@@ -112,16 +112,25 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -177,8 +186,6 @@
-
-
@@ -330,9 +337,9 @@
form
-
-
-
+
+
+
diff --git a/addons/account_sequence/account_sequence.xml b/addons/account_sequence/account_sequence.xml
index ba97025bae7..3ed16cfa58e 100644
--- a/addons/account_sequence/account_sequence.xml
+++ b/addons/account_sequence/account_sequence.xml
@@ -8,7 +8,7 @@
form
-
+
@@ -44,7 +44,7 @@
-
+
diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py
index a7899338b8e..c943724f5f2 100644
--- a/addons/account_voucher/__openerp__.py
+++ b/addons/account_voucher/__openerp__.py
@@ -23,6 +23,7 @@
"name" : "eInvoicing & Payments",
"version" : "1.0",
"author" : 'OpenERP SA',
+ "summary": 'Supplier & Customer Invoices, Payments',
"description": """
Account Voucher module includes all the basic requirements of Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc.
====================================================================================================================================
diff --git a/addons/account_voucher/account_voucher_view.xml b/addons/account_voucher/account_voucher_view.xml
index 2b6c7013af4..d1912a58d1c 100644
--- a/addons/account_voucher/account_voucher_view.xml
+++ b/addons/account_voucher/account_voucher_view.xml
@@ -52,6 +52,7 @@
+
@@ -209,11 +210,11 @@
form
-
-
+
diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml
index e70156e4032..833b7604bac 100644
--- a/addons/account_voucher/voucher_sales_purchase_view.xml
+++ b/addons/account_voucher/voucher_sales_purchase_view.xml
@@ -95,7 +95,7 @@
-
+
@@ -113,7 +113,7 @@
-
+
-
+
-
+
-
+
@@ -249,14 +249,15 @@
+ on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)"
+ groups="account.group_account_user"/>
-
+
diff --git a/addons/anonymous/anonymous.xml b/addons/anonymous/anonymous.xml
index 36be96db5ad..8ce9177aba1 100644
--- a/addons/anonymous/anonymous.xml
+++ b/addons/anonymous/anonymous.xml
@@ -1,12 +1,22 @@
-
+ Anonymousanonymousanonymous
+
iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAAAAAAZai4+AAAMQElEQVR4nO2ce4wV1R3Hv7/fmbvrPliQZWEXWFgWEFgQBRNI0dZW7euPxliTRhNbW5NatammoaaPNKmpKRYiUunDFzEU28YYkRaiaX0hYhUELApaKG90l2VZdmVl2WXvnPPrH/c1M3d2uWdmePzB75+9d+7Mmc/8zjm/+T3OWRJciMLnGyBcLmLZyEUsG7mIZSNOAm2IQAAQQAAEAhBRrCYprjkVI6GPpkXFIIuHJYYJ6D/Wsb+97fiJk339A0ZVDa8bP3lG4xhAjDofWGIUcOifW3ceOFr026Q5V980CSbq2I2B5To49dILL/YAQE4tkhlf0ABG3Pzta+FG7EqJKEZL1/IZANgJuzMrBpxvvCuio7QeFcsVWTsLUEMogxSh7IEBcc8dVlrabyeoM40cRfjS3ihc0bC0bJoOp5R5lkLT1ghckbC0WV1bqiF20PCB/fiKpq30VUiVRgUozOgUY3mDaHaFKkmXeq5O/XehsTVDEc2dzX3Szqp1XPJTZCRRD4KYw+yFyBJtaVSTxGIxRkKmp6ZNG9nYNZUQEgAyo66ZnQrTizLPw250JYfF+OmHG7ZsukWKuQzeH1B2XJEMhHt10fM4+HHGDPwQRf1IqD1oZ7uS0hbpkfcYDWj51VgT1Jeo4+12vZhYJ8qoOlaAkrqWsGdtt2stMW3lfC6RyWG/n7ZrLvnIh04mcJ+ksYzqWE8hNmqYXTMRAzJWAXvOxABgDN/XporeNEL1sLLzEbF6deDWGr0AtOKFzxa//8g01Nq1HxFrfmUq0FO6UYmb6r37GcctOptkyuhzoS1+NGibBMSU2nTfu1xMBZYpZdoqZoyGRcVevGF1YvGy/lQ65HQj11m+EyMHZH4xrpi/zRpkYhPVHbH0T5PBckVeuQYYJDpTuM82ykgEKy2d38Wg4RnzsI+MZZCRBJaWVy4DDzqkU1hsHZIlgOXKCmeIQMjBl11jG/nEx3JllaJB32GUwhWt1lTxsbS8VD44FQM3tEbIjsTFMuZkS7E7moNycMnP+qPkbOJiubJ8MJNMCvjKZrGOqBPAMiZ9HYUqixygeZVIOgpVeDq2dBFufR9hIaDSbt1d99RDR7tBXCx0HA+LTJUu+8G9U+CWlGxKHivcSSfS1y5aAM2RWz8rVQymn7+6QJsYifkkqhhBYf3gL030nDxwVrSlzNd/4cZs+CxgGbqbB7f7pUn8TuQAAUnVVbGfNjaWMUX2IV0et9H4WJWTHT8X6ZpYoz3TSNzCnT5VbAaq4hUTkQDW2ZH4Qz77XCIioEwKILayktJWvqKpQ3PN1pIMllY4/f7h42r8lfUwiZjCeP5WRlxp/3VLJQA0LjwWrYAYkCSwXHm1GQA7DgPTdyfBlUhAtiYFJzvYHUw7oiM5pAljabO7xjOhU7gtUr3VL/HHp9BDPZ6clque26zsKikhEhtL+MA6b7JUaGBN3DYTwDK0q0vEd2BT/D5IwMik/VUekb2nbJNsRZIAVlFWpNeyNhAiCah7Qk1ANzWXxG00PhaZGXN9LjLTnIqQ4p2dJGAg+E4fBcnXwsoYdhL/VS3QX329YLhS6VnvVMV3bWIbZDFycAJSTABIpVD/XgIvxWRe1R/NBaAUA5gfYY1IsSTk2PQsagaAinlP9SXi2CTjBhpG95ZuU9Ewj5JxAxNzmjOOjZELyWkGIEZAcWP8vFygAdkFukr3IpaNXMSykeg5CI/bEMgk5X/QkVeCRzMQIia8duE/iwDRFMXAWmPliU6o6uwhs9eT6qZ09dgsVNdT82aOBgAtbKk1m04UgYCZobt27HhLLctm14w8s2RYbkkGG17dIAyAzMhh1zW3tMyb05gCRJO3e0u4V0lidDoTK3e/ufLez9cqVG7PuwpGfwsOcsH+s/mg2pUHAaBq7veffKNLRETSbol5gBKwjE6ntYhI/4F/PXzjpDIAoIo3CyG9lr4FcEBE5GCRJ9R35TsoZwBINd+8fENbBi1dQo5iaCxjXNcVETndvfH3d3wus1BGOaqMVspA4TQthyeDATDu9FbqjHtyPhSxykyP8Tfc/+yeUyIi2nWH9soGxzI6nbnDwO7V919bT1kiJoLCbyTtPdeVrWNAYHzTrwotB5vAAIiVwwBQOev2Fe/1ioiYoXo0FMtoN3PJwKH1S2+9fExmMDu5ma5wh0n7r0jLYjhEFfsCvqkr/x6WNxCUXV0/fPpNi9d/rEVE9CBsRTNRRDKrP/p2bv5o5+4OAHBgRPJlAaVv/ENw1SuZk4DA9AXsjXIXPHkrZa2QaIDA9NmJXWtQP+PK2dc0OQxooMi0ebEERkgRYPbv2rHzncMaABPE+BYZsZ73VEVwQRLTAQiQPjozwOW4t+x5wJOSkCyFtLevR/nsBbNmT68BoIXYG8XlsTSYoKAPtW3btr31GAAwS3HlBISb69ygkknvgoDNkaKkCJvvLT4VMNoGADHM6S1bUFl/+fx5k8aVAzCeCqSnQ/v3vHD/9fWZxkL3fWR+QsuJ4JIZIx0jQFBYKoFBJ2n50aA2mzhbNK79wsJ/7Pdemcd6+6HbWioZAKngur+AKPwlmIbU8hYDcPCTIJY2H1YPadyJM/Glqp57558O5NaXZLCMkesBwEmVUMhlXNUXmD6urAABDm4JArty16CrNzxsynEA4Jnc5Rl/iwyanXKGm9ZnfnUbtW1dYHOBoBUMCHrAvgYM/++vJSRKRLsuOFU5MzfsOdfuBNctPc/yWGAmEvaDAMGJgYC26dHPuEQnRdIVjQEswujSE4uaNmz0reIUdg9CAEHHp75mDO9YWXJWiTBlZO5zHmt86OKPcFHmCb+jRt1tGZyj/pXDgiWnSlUWCNNY/NoCGpzSk1Ka1273rhURnGiDAMI9x73aMvzBmtJ3OxCmIu+25Q6Nqyn1ckCod6nvOw71cmZD52H/eb/rLdn9JYOW/Jc8Vk1d6VgwtHa3Tw37cqr+xKMtrXY8V7y+efBGKxrznZf7a6jWIrMo3LPSd/a+3IdDvvMW9ZbcJAijJuYR8lhlE2wSnoZWdhbGMmFPFheefZ1GbX3eKrnbWCdBLNBEGyxR7U/nx6ewuy/Td4SufCsCLHNLnoYAoblgpAtRdVPpUAA0Huss7JHp+iyDJWjPJwPtpiEAzCh8zDVCaLQq1Ig6uDrXQ4JPjufU8ml3buqR/LbPQlkQzCn0VwGrPlgjOUMr9ETOjTI42MPZpk92ZZ/O8NvP22xoI6meWowFNIwo2p8zlBj+z4v5PtqdP9zTmf/4SNoqZJfLxoRpa/gltrWHx3N1Q9mVGwA0kH0pat60tvQ9jAAY44aJ51u2PakaaYel6fUXM6OLB/ZksYTRkZuTj7hWSSrCJOjiTjSYYNMKAMbjGXWw25bXFg6DAGje+He7rZLiefX40m7jLLE0vbyNDWDQ6jGinRmdm0VpuyGhaaoHxoM10RILnP4jAAj29ecXAOEoGNDqjdfsbBbBOxG9WPW2WIbX7WUD4KDHtB/JeBKPpG3r1RO99/dgNdpWJ4W7l8NAsN/TzLEBiOENL1uuhWBMTZkQbRHGVNvWcjX9+bAjjD0ebbX3ADLwYNi+mqGEMM2rXg9WlY1rk4GgnhXQ3F+IpQV9ndDq9ddsdywLZoRiATWWG6oAgFZ1KnS1FuIAlm6QWWLdjuZxXpaCtkzFKNvGYPjQGsLRo4W3DA+0Qb1su18ZhNomr1IKhELjI1S+aWk3DnntuXyC9MMh+8jOJOObJBwLY+3XoGjevUYO+B7nY7xgabMAMGb6pm4BizAqwtIYweO0y3fkY3dZlNLFXN837+u00SKCzYmhLRtafWk1943NVq5D9rLJ/hHkSQZtt4hg86Loi/63xuXFW8HPKISyHb6sawHLSJela5OcMCZ3+DbeeB+sujESVvCaKJUnNF7qO+Ad8qmmSFjBeRKh5kZodnz/GsGjLYNo2kpADFr8T+M1hLDcZZycCKb4NeLDsvVPkxKS8mmDYgHjYBWTJSgN4/0kni+EusrYy9QiCaGp3G+BfVijLVJvSQqhJeWfvz6s2gRWz0URwhWBI14sqR5zTmnyImWBEe8baOfLcJEe0zwEFjD2XNLkhTC8PgDi/2Yb7ycjhCnBf+PgxxoXe410NGkJ3teLRZhwnrCmBw/4tXVpVezVyBHE8LTgIb+2Kkach6lIMnps0KH1YZnhDecBizFhZHDs/B9R17D2kvkawAAAAABJRU5ErkJggg==
+
+
+
+ Anonymous Group
+
+
diff --git a/addons/association/profile_association.xml b/addons/association/profile_association.xml
index f131fe4f4a9..099a6f1ac97 100644
--- a/addons/association/profile_association.xml
+++ b/addons/association/profile_association.xml
@@ -1,14 +1,13 @@
-
+
+ sequence="70"/>
+
diff --git a/addons/base_calendar/__openerp__.py b/addons/base_calendar/__openerp__.py
index 3f6ca129f6f..c7df187dd87 100644
--- a/addons/base_calendar/__openerp__.py
+++ b/addons/base_calendar/__openerp__.py
@@ -39,9 +39,10 @@ If you need to manage your meetings, you should install the CRM module.
'category': 'Hidden/Dependency',
'website': 'http://www.openerp.com',
"init_xml": [
- 'base_calendar_data.xml'
+ 'base_calendar_data.xml',
+ 'crm_meeting_data.xml',
],
- "demo_xml": [],
+ "demo_xml": ['crm_meeting_demo.xml'],
"update_xml": [
'security/calendar_security.xml',
'security/ir.model.access.csv',
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index 5fc38c884da..e89a52aa0e5 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -515,7 +515,7 @@ property or property parameter."),
sub,
body,
attachments=attach and {'invitation.ics': attach} or None,
- subtype='html',
+ content_subtype='html',
reply_to=email_from,
context=context
)
@@ -1060,8 +1060,8 @@ rule or repeating pattern of time to exclude from the recurring rule."),
'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}),
'organizer': fields.char("Organizer", size=256, states={'done': [('readonly', True)]}), # Map with Organizer Attribure of VEvent.
'organizer_id': fields.many2one('res.users', 'Organizer', states={'done': [('readonly', True)]}),
- 'end_type' : fields.selection([('count', 'Number of repetitions'), ('end_date','End date')], 'Recurrence termination'),
- 'interval': fields.integer('Repeat every', help="Repeat every (Days/Week/Month/Year)"),
+ 'end_type' : fields.selection([('count', 'Number of repetitions'), ('end_date','End date')], 'Recurrence Termination'),
+ 'interval': fields.integer('Repeat Every', help="Repeat every (Days/Week/Month/Year)"),
'count': fields.integer('Repeat', help="Repeat x times"),
'mo': fields.boolean('Mon'),
'tu': fields.boolean('Tue'),
diff --git a/addons/base_calendar/base_calendar_data.xml b/addons/base_calendar/base_calendar_data.xml
index 3c20bf5fad5..727a0703db2 100644
--- a/addons/base_calendar/base_calendar_data.xml
+++ b/addons/base_calendar/base_calendar_data.xml
@@ -2,7 +2,7 @@
-
+ Eventcalendar.event
diff --git a/addons/crm/crm_meeting_data.xml b/addons/base_calendar/crm_meeting_data.xml
similarity index 100%
rename from addons/crm/crm_meeting_data.xml
rename to addons/base_calendar/crm_meeting_data.xml
diff --git a/addons/crm/crm_meeting_demo.xml b/addons/base_calendar/crm_meeting_demo.xml
similarity index 89%
rename from addons/crm/crm_meeting_demo.xml
rename to addons/base_calendar/crm_meeting_demo.xml
index dda6d5a03a8..ad88c11bb1b 100644
--- a/addons/crm/crm_meeting_demo.xml
+++ b/addons/base_calendar/crm_meeting_demo.xml
@@ -12,7 +12,7 @@
-
+
@@ -24,7 +24,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
@@ -48,7 +48,7 @@
-
+
@@ -59,7 +59,7 @@
-
+
@@ -70,7 +70,7 @@
-
+
diff --git a/addons/base_calendar/wizard/base_calendar_invite_attendee.py b/addons/base_calendar/wizard/base_calendar_invite_attendee.py
index 676f9b3fdd2..5da711cf657 100644
--- a/addons/base_calendar/wizard/base_calendar_invite_attendee.py
+++ b/addons/base_calendar/wizard/base_calendar_invite_attendee.py
@@ -78,6 +78,7 @@ send an Email to Invited Person')
att_obj = self.pool.get('calendar.attendee')
user_obj = self.pool.get('res.users')
current_user = user_obj.browse(cr, uid, uid, context=context)
+
for datas in self.read(cr, uid, ids, context=context):
type = datas.get('type')
vals = []
diff --git a/addons/base_tools/tools_view.xml b/addons/base_tools/tools_view.xml
index eb51e000c1b..fbe0e16e31a 100644
--- a/addons/base_tools/tools_view.xml
+++ b/addons/base_tools/tools_view.xml
@@ -1,9 +1,11 @@
-
+
+
+
+
diff --git a/addons/base_vat/base_vat_view.xml b/addons/base_vat/base_vat_view.xml
index 1d7f06eb571..df1d18ac194 100644
--- a/addons/base_vat/base_vat_view.xml
+++ b/addons/base_vat/base_vat_view.xml
@@ -7,7 +7,7 @@
res.partner
-
+
@@ -213,7 +214,7 @@
form
-
+
@@ -418,8 +419,8 @@
-
-
+
hr.job.employee.formhr.job
@@ -452,7 +453,7 @@
-
+
Job Positionshr.job
diff --git a/addons/hr_evaluation/__openerp__.py b/addons/hr_evaluation/__openerp__.py
index 231f4593868..fbb1bcb162f 100644
--- a/addons/hr_evaluation/__openerp__.py
+++ b/addons/hr_evaluation/__openerp__.py
@@ -25,6 +25,7 @@
"author": "OpenERP SA",
"category": "Human Resources",
"website": "http://www.openerp.com",
+ "summary": "Top-Down and Bottom-Up Evaluation",
"images": ["images/hr_evaluation_analysis.jpeg","images/hr_evaluation.jpeg"],
"depends": ["hr","base_calendar","survey"],
"description": """
diff --git a/addons/hr_evaluation/wizard/mail_compose_message.py b/addons/hr_evaluation/wizard/mail_compose_message.py
index 7b4c1b69164..7e4ba326947 100644
--- a/addons/hr_evaluation/wizard/mail_compose_message.py
+++ b/addons/hr_evaluation/wizard/mail_compose_message.py
@@ -44,15 +44,9 @@ class mail_compose_message(osv.osv_memory):
if record_data.state == "waiting_answer":
msg = _("Hello %s, \n\n Kindly post your response for '%s' survey interview. \n\n Thanks,") %(record_data.user_to_review_id.name, record_data.survey_id.title)
result.update({
- 'email_from': tools.config.get('email_from',''),
'email_to': record_data.user_to_review_id.work_email or False,
'subject': _("Reminder to fill up Survey"),
'body_text': msg,
- 'res_id': resource_id,
- 'model': model,
- 'email_cc': False,
- 'email_bcc': False,
- 'reply_to': False,
})
return result
diff --git a/addons/hr_expense/__openerp__.py b/addons/hr_expense/__openerp__.py
index 2a1d302e094..c40670508f4 100644
--- a/addons/hr_expense/__openerp__.py
+++ b/addons/hr_expense/__openerp__.py
@@ -25,6 +25,7 @@
'version': '1.0',
'category': 'Human Resources',
"sequence": 30,
+ "summary": "Expenses Validation, Invoicing",
'description': """
This module aims to manage employee's expenses.
===============================================
diff --git a/addons/hr_holidays/__openerp__.py b/addons/hr_holidays/__openerp__.py
index 4509508b2be..b37dd3c7859 100644
--- a/addons/hr_holidays/__openerp__.py
+++ b/addons/hr_holidays/__openerp__.py
@@ -26,6 +26,7 @@
"author": "OpenERP SA",
"category": "Human Resources",
"sequence": 28,
+ "summary": "Allocation and Leave Requests, Reporting by Department",
"website": "http://www.openerp.com",
"description": """
This module allows you to manage leaves and leaves' requests.
diff --git a/addons/hr_recruitment/__openerp__.py b/addons/hr_recruitment/__openerp__.py
index e5df8cf2bf3..fe6c86c684d 100644
--- a/addons/hr_recruitment/__openerp__.py
+++ b/addons/hr_recruitment/__openerp__.py
@@ -24,6 +24,7 @@
'version': '1.0',
'category': 'Human Resources',
"sequence": 24,
+ "summary": "Job Descriptions, Recruitment Process",
'description': """
Manages job positions and the recruitment process.
==================================================
diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml
index fe5d3d9969b..6b64964eb2a 100644
--- a/addons/hr_recruitment/hr_recruitment_data.xml
+++ b/addons/hr_recruitment/hr_recruitment_data.xml
@@ -1,9 +1,6 @@
-
-
diff --git a/addons/hr_recruitment/security/ir.model.access.csv b/addons/hr_recruitment/security/ir.model.access.csv
index 7d082070be5..8b029c9324a 100644
--- a/addons/hr_recruitment/security/ir.model.access.csv
+++ b/addons/hr_recruitment/security/ir.model.access.csv
@@ -3,7 +3,6 @@ access_hr_applicant_user,hr.applicant.user,model_hr_applicant,base.group_hr_user
access_hr_recruitment_report,hr.recruitment.report,model_hr_recruitment_report,base.group_hr_manager,1,1,1,1
access_hr_recruitment_stage_user,hr.recruitment.stage.user,model_hr_recruitment_stage,base.group_hr_user,1,1,1,1
access_hr_recruitment_degree,hr.recruitment.degree,model_hr_recruitment_degree,base.group_hr_user,1,1,1,1
-access_mail_message_user,mail.message.user,mail.model_mail_message,base.group_hr_user,1,1,1,1
access_res_partner_hr_user,res.partner.user,base.model_res_partner,base.group_hr_user,1,1,1,1
access_survey_hr_user,survey.hr.user,survey.model_survey,base.group_hr_user,1,1,1,0
access_crm_meeting_hruser,crm.meeting.hruser,base_calendar.model_crm_meeting,base.group_hr_user,1,1,1,1
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
index 9888972105e..81dc1e3c9cf 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
@@ -114,7 +114,7 @@
form
-
+
diff --git a/addons/hr_timesheet_sheet/__openerp__.py b/addons/hr_timesheet_sheet/__openerp__.py
index defa3ee5873..04be6045f4d 100644
--- a/addons/hr_timesheet_sheet/__openerp__.py
+++ b/addons/hr_timesheet_sheet/__openerp__.py
@@ -25,6 +25,7 @@
'version': '1.0',
'category': 'Human Resources',
"sequence": 16,
+ "summary": "Attendances, Activities, Timing",
'description': """
This module helps you to easily encode and validate timesheet and attendances within the same view.
===================================================================================================
diff --git a/addons/import_google/i18n/es.po b/addons/import_google/i18n/es.po
new file mode 100644
index 00000000000..325df15688c
--- /dev/null
+++ b/addons/import_google/i18n/es.po
@@ -0,0 +1,217 @@
+# Spanish translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:36+0000\n"
+"PO-Revision-Date: 2012-07-21 21:08+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Spanish \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-07-22 04:45+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
+
+#. module: import_google
+#: help:synchronize.google.import,group_name:0
+msgid "Choose which group to import, By default it takes all."
+msgstr ""
+
+#. module: import_google
+#: view:synchronize.google.import:0
+msgid "Import Google Calendar Events"
+msgstr ""
+
+#. module: import_google
+#: view:synchronize.google.import:0
+msgid "_Import Events"
+msgstr ""
+
+#. module: import_google
+#: code:addons/import_google/wizard/import_google_data.py:71
+#, python-format
+msgid ""
+"No Google Username or password Defined for user.\n"
+"Please define in user view"
+msgstr ""
+
+#. module: import_google
+#: code:addons/import_google/wizard/import_google_data.py:127
+#, python-format
+msgid ""
+"Invalid login detail !\n"
+" Specify Username/Password."
+msgstr ""
+
+#. module: import_google
+#: field:synchronize.google.import,supplier:0
+msgid "Supplier"
+msgstr ""
+
+#. module: import_google
+#: view:synchronize.google.import:0
+msgid "Import Options"
+msgstr ""
+
+#. module: import_google
+#: field:synchronize.google.import,group_name:0
+msgid "Group Name"
+msgstr ""
+
+#. module: import_google
+#: model:ir.model,name:import_google.model_crm_case_categ
+msgid "Category of Case"
+msgstr ""
+
+#. module: import_google
+#: model:ir.actions.act_window,name:import_google.act_google_login_contact_form
+#: model:ir.ui.menu,name:import_google.menu_sync_contact
+msgid "Import Google Contacts"
+msgstr ""
+
+#. module: import_google
+#: view:google.import.message:0
+msgid "Import Google Data"
+msgstr ""
+
+#. module: import_google
+#: view:crm.meeting:0
+msgid "Meeting Type"
+msgstr ""
+
+#. module: import_google
+#: code:addons/import_google/wizard/import_google.py:38
+#: code:addons/import_google/wizard/import_google_data.py:28
+#, python-format
+msgid ""
+"Please install gdata-python-client from http://code.google.com/p/gdata-"
+"python-client/downloads/list"
+msgstr ""
+
+#. module: import_google
+#: model:ir.model,name:import_google.model_google_login
+msgid "Google Contact"
+msgstr ""
+
+#. module: import_google
+#: view:synchronize.google.import:0
+msgid "Import contacts from a google account"
+msgstr ""
+
+#. module: import_google
+#: code:addons/import_google/wizard/import_google_data.py:133
+#, python-format
+msgid "Please specify correct user and password !"
+msgstr ""
+
+#. module: import_google
+#: field:synchronize.google.import,customer:0
+msgid "Customer"
+msgstr ""
+
+#. module: import_google
+#: view:synchronize.google.import:0
+msgid "_Cancel"
+msgstr ""
+
+#. module: import_google
+#: model:ir.model,name:import_google.model_synchronize_google_import
+msgid "synchronize.google.import"
+msgstr ""
+
+#. module: import_google
+#: view:synchronize.google.import:0
+msgid "_Import Contacts"
+msgstr ""
+
+#. module: import_google
+#: model:ir.actions.act_window,name:import_google.act_google_login_form
+#: model:ir.ui.menu,name:import_google.menu_sync_calendar
+msgid "Import Google Calendar"
+msgstr ""
+
+#. module: import_google
+#: code:addons/import_google/wizard/import_google_data.py:50
+#, python-format
+msgid "Import google"
+msgstr ""
+
+#. module: import_google
+#: code:addons/import_google/wizard/import_google_data.py:127
+#: code:addons/import_google/wizard/import_google_data.py:133
+#, python-format
+msgid "Error"
+msgstr ""
+
+#. module: import_google
+#: code:addons/import_google/wizard/import_google_data.py:71
+#, python-format
+msgid "Warning !"
+msgstr ""
+
+#. module: import_google
+#: field:synchronize.google.import,create_partner:0
+msgid "Options"
+msgstr ""
+
+#. module: import_google
+#: view:google.import.message:0
+msgid "_Ok"
+msgstr ""
+
+#. module: import_google
+#: code:addons/import_google/wizard/import_google.py:38
+#: code:addons/import_google/wizard/import_google_data.py:28
+#, python-format
+msgid "Google Contacts Import Error!"
+msgstr ""
+
+#. module: import_google
+#: model:ir.model,name:import_google.model_google_import_message
+msgid "Import Message"
+msgstr ""
+
+#. module: import_google
+#: field:synchronize.google.import,calendar_name:0
+msgid "Calendar Name"
+msgstr ""
+
+#. module: import_google
+#: help:synchronize.google.import,supplier:0
+msgid "Check this box to set newly created partner as Supplier."
+msgstr ""
+
+#. module: import_google
+#: selection:synchronize.google.import,create_partner:0
+msgid "Import only address"
+msgstr ""
+
+#. module: import_google
+#: field:crm.case.categ,user_id:0
+msgid "User"
+msgstr ""
+
+#. module: import_google
+#: view:synchronize.google.import:0
+msgid "Partner Status for this Group:"
+msgstr ""
+
+#. module: import_google
+#: field:google.import.message,name:0
+msgid "Message"
+msgstr ""
+
+#. module: import_google
+#: selection:synchronize.google.import,create_partner:0
+msgid "Create partner for each contact"
+msgstr ""
+
+#. module: import_google
+#: help:synchronize.google.import,customer:0
+msgid "Check this box to set newly created partner as Customer."
+msgstr ""
diff --git a/addons/import_sugarcrm/import_sugarcrm_view.xml b/addons/import_sugarcrm/import_sugarcrm_view.xml
index 7188108ba6c..6ef9be1a5bd 100644
--- a/addons/import_sugarcrm/import_sugarcrm_view.xml
+++ b/addons/import_sugarcrm/import_sugarcrm_view.xml
@@ -13,7 +13,7 @@
+ type="object"/> or
diff --git a/addons/knowledge/i18n/nb.po b/addons/knowledge/i18n/nb.po
new file mode 100644
index 00000000000..6f721f133bb
--- /dev/null
+++ b/addons/knowledge/i18n/nb.po
@@ -0,0 +1,33 @@
+# Norwegian Bokmal translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 01:37+0100\n"
+"PO-Revision-Date: 2012-07-23 10:30+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Norwegian Bokmal \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-07-24 04:52+0000\n"
+"X-Generator: Launchpad (build 15668)\n"
+
+#. module: knowledge
+#: model:ir.ui.menu,name:knowledge.menu_document2
+msgid "Collaborative Content"
+msgstr ""
+
+#. module: knowledge
+#: model:ir.ui.menu,name:knowledge.menu_document_configuration
+msgid "Configuration"
+msgstr "Konfigurasjon"
+
+#. module: knowledge
+#: model:ir.ui.menu,name:knowledge.menu_document
+msgid "Knowledge"
+msgstr "Kunnskap"
diff --git a/addons/knowledge/knowledge_view.xml b/addons/knowledge/knowledge_view.xml
index cdc176b347f..9acba0f4b43 100644
--- a/addons/knowledge/knowledge_view.xml
+++ b/addons/knowledge/knowledge_view.xml
@@ -1,13 +1,18 @@
+
-
-
-
+
-
+
+
-
+
+
+
+
+
diff --git a/addons/l10n_be_invoice_bba/account_invoice_view.xml b/addons/l10n_be_invoice_bba/account_invoice_view.xml
index 51c39a4b3be..bf1cf96f537 100644
--- a/addons/l10n_be_invoice_bba/account_invoice_view.xml
+++ b/addons/l10n_be_invoice_bba/account_invoice_view.xml
@@ -12,7 +12,7 @@
+ on_change="generate_bbacomm(type,reference_type, partner_id,reference, context)" colspan="1"/>
diff --git a/addons/l10n_be_invoice_bba/invoice.py b/addons/l10n_be_invoice_bba/invoice.py
index 4cdbca84c0a..bb03e4d6d02 100644
--- a/addons/l10n_be_invoice_bba/invoice.py
+++ b/addons/l10n_be_invoice_bba/invoice.py
@@ -44,7 +44,7 @@ class account_invoice(osv.osv):
#l_logger.warning('reference_type = %s' %res )
return res
- def check_bbacomm(self, val):
+ def check_bbacomm(self, val):
supported_chars = '0-9+*/ '
pattern = re.compile('[^' + supported_chars + ']')
if pattern.findall(val or ''):
@@ -75,10 +75,7 @@ class account_invoice(osv.osv):
if (type == 'out_invoice'):
reference_type = self.pool.get('res.partner').browse(cr, uid, partner_id).out_inv_comm_type
if reference_type:
- algorithm = self.pool.get('res.partner').browse(cr, uid, partner_id).out_inv_comm_algorithm
- if not algorithm:
- algorithm = 'random'
- reference = self.generate_bbacomm(cr, uid, ids, type, reference_type, algorithm, partner_id, '')['value']['reference']
+ reference = self.generate_bbacomm(cr, uid, ids, type, reference_type, partner_id, '', context={})['value']['reference']
res_update = {
'reference_type': reference_type or 'none',
'reference': reference,
@@ -86,17 +83,15 @@ class account_invoice(osv.osv):
result['value'].update(res_update)
return result
- def generate_bbacomm(self, cr, uid, ids, type, reference_type, algorithm, partner_id, reference):
+ def generate_bbacomm(self, cr, uid, ids, type, reference_type, partner_id, reference, context=None):
partner_obj = self.pool.get('res.partner')
- reference = reference or ''
+ reference = reference or ''
+ algorithm = False
+ if partner_id:
+ algorithm = partner_obj.browse(cr, uid, partner_id, context=context).out_inv_comm_algorithm
+ algorithm = algorithm or 'random'
if (type == 'out_invoice'):
if reference_type == 'bba':
- if not algorithm:
- if partner_id:
- algorithm = partner_obj.browse(cr, uid, partner_id).out_inv_comm_algorithm
- if not algorithm:
- if not algorithm:
- algorithm = 'random'
if algorithm == 'date':
if not self.check_bbacomm(reference):
doy = time.strftime('%j')
diff --git a/addons/l10n_be_invoice_bba/partner_view.xml b/addons/l10n_be_invoice_bba/partner_view.xml
index 8be0f31d612..d78df2d7a42 100644
--- a/addons/l10n_be_invoice_bba/partner_view.xml
+++ b/addons/l10n_be_invoice_bba/partner_view.xml
@@ -9,7 +9,7 @@
form
-
+
diff --git a/addons/l10n_ch/wizard/bvr_import_view.xml b/addons/l10n_ch/wizard/bvr_import_view.xml
index 222aad3b6b9..18ee44efcf9 100644
--- a/addons/l10n_ch/wizard/bvr_import_view.xml
+++ b/addons/l10n_ch/wizard/bvr_import_view.xml
@@ -30,15 +30,15 @@
new
-
+ account.bank.statement.form.inheritaccount.bank.statementform
-
-
-
+
+
+
diff --git a/addons/l10n_fr_rib/bank_view.xml b/addons/l10n_fr_rib/bank_view.xml
index b3062f4c706..627c2eacf04 100644
--- a/addons/l10n_fr_rib/bank_view.xml
+++ b/addons/l10n_fr_rib/bank_view.xml
@@ -9,7 +9,7 @@
form
-
+
@@ -17,7 +17,7 @@
-
+
diff --git a/addons/mail/__openerp__.py b/addons/mail/__openerp__.py
index e911f24e809..abb290332a7 100644
--- a/addons/mail/__openerp__.py
+++ b/addons/mail/__openerp__.py
@@ -24,6 +24,7 @@
'version': '1.0',
'category':'Social Network',
"sequence": 2,
+ "summary": "Discussions, Feeds, Alerts",
'description': """
A bussiness oriented Social Networking with a fully-integrated email
and message management.
@@ -66,11 +67,11 @@ The main features of the module are :
'mail_thread_view.xml',
'mail_group_view.xml',
'res_partner_view.xml',
+ 'res_users_view.xml',
+ 'data/mail_data.xml',
+ 'data/mail_group_data.xml',
'security/mail_security.xml',
'security/ir.model.access.csv',
- 'mail_data.xml',
- 'mail_group_data.xml',
- 'res_users_view.xml',
],
'installable': True,
'auto_install': False,
@@ -83,13 +84,15 @@ The main features of the module are :
'static/src/img/email_icong.png',
'static/src/img/_al.png',
'static/src/img/_pincky.png',
- 'static/src/img/feeds.png',
- 'static/src/img/feeds-hover.png',
'static/src/img/groupdefault.png',
+ 'static/src/img/attachment.png',
+ 'static/src/img/checklist.png',
+ 'static/src/img/formatting.png',
],
'css': [
'static/src/css/mail.css',
'static/src/css/mail_group.css',
+ 'static/src/css/mail_compose_message.css',
],
'js': [
'static/lib/jquery.expander/jquery.expander.js',
@@ -99,7 +102,7 @@ The main features of the module are :
'static/src/xml/mail.xml',
],
'demo': [
- 'mail_demo.xml',
+ 'data/mail_demo.xml',
],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mail/mail_data.xml b/addons/mail/data/mail_data.xml
similarity index 100%
rename from addons/mail/mail_data.xml
rename to addons/mail/data/mail_data.xml
diff --git a/addons/mail/mail_demo.xml b/addons/mail/data/mail_demo.xml
similarity index 93%
rename from addons/mail/mail_demo.xml
rename to addons/mail/data/mail_demo.xml
index 1adec42a910..274259e544e 100644
--- a/addons/mail/mail_demo.xml
+++ b/addons/mail/data/mail_demo.xml
@@ -1,6 +1,6 @@
-
+
A cool attachment
@@ -28,7 +28,7 @@
Internal company announcemail.group
- html
+ htmlsit amet, consectetur adipiscing elit. Pellentesque et quam sapien, in sagittis tellus.
Praesent vel massa sed massa consequat egestas in tristique orci. Praesent iaculis libero et neque vehicula iaculis. Vivamus placerat tincidunt orci ac ornare. Proin ut dolor fringilla velit ultricies consequat. Maecenas sit amet ipsum non leo interdum imperdiet. Donec sapien mi, varius a consequat id, consectetur sit amet nulla.
@@ -41,10 +41,9 @@ Nulla turpis leo, rhoncus ut egestas sit amet, consectetur vitae urna. Mauris in
- Replymail.group
- html
+ htmltremendous blogpost ! (first comment)]]>comment
@@ -52,10 +51,9 @@ Nulla turpis leo, rhoncus ut egestas sit amet, consectetur vitae urna. Mauris in
- Replymail.group
- html
+ html
@@ -75,10 +73,9 @@ Would it be possible to learn more about the author ? (second comment)]]>
- Replymail.group
- html
+ htmlAll Company
+ All company users can come here and discuss.Sales
+
+ All Employees
+
+
diff --git a/addons/mail/doc/mail_message.rst b/addons/mail/doc/mail_message.rst
index e41a772cac8..56244e251bf 100644
--- a/addons/mail/doc/mail_message.rst
+++ b/addons/mail/doc/mail_message.rst
@@ -3,22 +3,26 @@
mail.message
============
-TODO
+Models
++++++++
-mail.group
-++++++++++
+``mail.message.common`` is an abstract class for holding the main attributes of a
+message object. It could be reused as parent model for any database model
+or wizard screen that needs to hold a kind of message.
-A mail_group is a collection of users sharing messages in a discussion group. Group users are users that follow the mail group, using the subscription/follow mechanism of OpenSocial. A mail group has nothing in common wih res.users.group.
-Additional information on fields:
+All internal logic should be in a database-based model while this model
+holds the basics of a message. For example, a wizard for writing emails
+should inherit from this class and not from mail.message.
- - ``member_ids``: user member of the groups are calculated with ``message_get_subscribers`` method from mail.thread
- - ``member_count``: calculated with member_ids
- - ``is_subscriber``: calculated with member_ids
-res.users
-+++++++++
+.. versionchanged:: 7.0
-OpenChatter updates the res.users class:
- - it adds a preference about sending emails when receiving a notification
- - make a new user follow itself automatically
- - create a welcome message when creating a new user, to make his arrival in OpenERP more friendly
+ - ``subtype`` is renamed to ``content_subtype``: usually 'html' or 'plain'.
+ This field is used to select plain-text or rich-text contents accordingly.
+ - ``subtype`` is moved to mail.message model. The purpose is to be able to
+ distinguish message of the same type, such as notifications about creating
+ or cancelling a record. For example, it is used to add the possibility
+ to hide notifications in the wall.
+
+Those changes aim at being able to distinguish the message content to the
+message itself.
diff --git a/addons/mail/doc/mail_thread.rst b/addons/mail/doc/mail_thread.rst
index f15f78156d3..41ea014b06c 100644
--- a/addons/mail/doc/mail_thread.rst
+++ b/addons/mail/doc/mail_thread.rst
@@ -3,7 +3,25 @@
mail.thread and OpenChatter
===========================
-TODO
+API
++++
+
+Writing messages and notifications
+----------------------------------
+
+``message_append``
+
+Creates a new mail.message through message_create. The new message is attached
+to the current mail.thread, containing all the details passed as parameters.
+All attachments will be attached to the thread record as well as to the
+actual message.
+
+This method calls message_create that will handle management of subscription
+and notifications, and effectively create the message.
+
+If ``email_from`` is not set or ``type`` not set as 'email', a note message
+is created (comment or system notification), without the usual envelope
+attributes (sender, recipients, etc.).
mail.group
++++++++++
diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py
index f691d75e0bc..36001ee6074 100644
--- a/addons/mail/mail_group.py
+++ b/addons/mail/mail_group.py
@@ -36,7 +36,7 @@ class mail_group(osv.osv):
A mail_group is a collection of users sharing messages in a discussion
group. Group users are users that follow the mail group, using the
subscription/follow mechanism of OpenSocial. A mail group has nothing
- in common wih res.users.group.
+ in common with res.users.group.
Additional information on fields:
- ``member_ids``: user member of the groups are calculated with
``message_get_subscribers`` method from mail.thread
@@ -49,12 +49,6 @@ class mail_group(osv.osv):
_name = 'mail.group'
_inherit = ['mail.thread']
- def action_group_join(self, cr, uid, ids, context={}):
- return self.message_subscribe(cr, uid, ids, context=context);
-
- def action_group_leave(self, cr, uid, ids, context={}):
- return self.message_unsubscribe(cr, uid, ids, context=context);
-
def onchange_photo(self, cr, uid, ids, value, context=None):
if not value:
return {'value': {'avatar_big': value, 'avatar': value} }
@@ -105,7 +99,7 @@ class mail_group(osv.osv):
message_obj = self.pool.get('mail.message')
for id in ids:
lower_date = (DT.datetime.now() - DT.timedelta(days=30)).strftime(tools.DEFAULT_SERVER_DATE_FORMAT)
- result[id] = message_obj.search(cr, uid, ['&', '&', ('model', '=', self._name), ('res_id', 'in', ids), ('date', '>=', lower_date)], count=True, context=context)
+ result[id] = self.message_search(cr, uid, [id], limit=None, domain=[('date', '>=', lower_date)], count=True, context=context)
return result
def _get_default_photo(self, cr, uid, context=None):
@@ -116,19 +110,33 @@ class mail_group(osv.osv):
'name': fields.char('Name', size=64, required=True),
'description': fields.text('Description'),
'responsible_id': fields.many2one('res.users', string='Responsible',
- ondelete='set null', required=True, select=1,
- help="Responsible of the group that has all rights on the record."),
- 'public': fields.boolean('Public', help='This group is visible by non members. Invisible groups can add members through the invite button.'),
- 'photo_big': fields.binary('Full-size photo', help='Field holding the full-sized PIL-supported and base64 encoded version of the group image. The photo field is used as an interface for this field.'),
- 'photo': fields.function(_get_photo, fnct_inv=_set_photo, string='Photo', type="binary",
+ ondelete='set null', required=True, select=1,
+ help="Responsible of the group that has all rights on the record."),
+ 'public': fields.boolean('Visible by non members', help='This group is visible by non members. \
+ Invisible groups can add members through the invite button.'),
+ 'group_ids': fields.many2many('res.groups', rel='mail_group_res_group_rel',
+ id1='mail_group_id', id2='groups_id', string='Linked groups',
+ help="Members of those groups will automatically added as followers. "\
+ "Note that they will be able to manage their subscription manually "\
+ "if necessary."),
+ 'photo_big': fields.binary('Full-size photo',
+ help='Field holding the full-sized PIL-supported and base64 encoded "\
+ version of the group image. The photo field is used as an "\
+ interface for this field.'),
+ 'photo': fields.function(_get_photo, fnct_inv=_set_photo,
+ string='Photo', type="binary",
store = {
'mail.group': (lambda self, cr, uid, ids, c={}: ids, ['photo_big'], 10),
- }, help='Field holding the automatically resized (128x128) PIL-supported and base64 encoded version of the group image.'),
- 'member_ids': fields.function(get_member_ids, fnct_search=search_member_ids, type='many2many',
- relation='res.users', string='Group members', multi='get_member_ids'),
- 'member_count': fields.function(get_member_ids, type='integer', string='Member count', multi='get_member_ids'),
- 'is_subscriber': fields.function(get_member_ids, type='boolean', string='Joined', multi='get_member_ids'),
- 'last_month_msg_nbr': fields.function(get_last_month_msg_nbr, type='integer', string='Messages count for last month'),
+ },
+ help='Field holding the automatically resized (128x128) PIL-supported and base64 encoded version of the group image.'),
+ 'member_ids': fields.function(get_member_ids, fnct_search=search_member_ids,
+ type='many2many', relation='res.users', string='Group members', multi='get_member_ids'),
+ 'member_count': fields.function(get_member_ids, type='integer',
+ string='Member count', multi='get_member_ids'),
+ 'is_subscriber': fields.function(get_member_ids, type='boolean',
+ string='Joined', multi='get_member_ids'),
+ 'last_month_msg_nbr': fields.function(get_last_month_msg_nbr, type='integer',
+ string='Messages count for last month'),
}
_defaults = {
@@ -136,3 +144,32 @@ class mail_group(osv.osv):
'responsible_id': (lambda s, cr, uid, ctx: uid),
'photo': _get_default_photo,
}
+
+ def _subscribe_user_with_group_m2m_command(self, cr, uid, ids, group_ids_command, context=None):
+ # form: {'group_ids': [(3, 10), (3, 3), (4, 10), (4, 3)]} or {'group_ids': [(6, 0, [ids]}
+ user_group_ids = [command[1] for command in group_ids_command if command[0] == 4]
+ user_group_ids += [id for command in group_ids_command if command[0] == 6 for id in command[2]]
+ # retrieve the user member of those groups
+ user_ids = []
+ res_groups_obj = self.pool.get('res.groups')
+ for group in res_groups_obj.browse(cr, uid, user_group_ids, context=context):
+ user_ids += [user.id for user in group.users]
+ # subscribe the users
+ return self.message_subscribe(cr, uid, ids, user_ids, context=context)
+
+ def create(self, cr, uid, vals, context=None):
+ mail_group_id = super(mail_group, self).create(cr, uid, vals, context=context)
+ if vals.get('group_ids'):
+ self._subscribe_user_with_group_m2m_command(cr, uid, [mail_group_id], vals.get('group_ids'), context=context)
+ return mail_group_id
+
+ def write(self, cr, uid, ids, vals, context=None):
+ if vals.get('group_ids'):
+ self._subscribe_user_with_group_m2m_command(cr, uid, ids, vals.get('group_ids'), context=context)
+ return super(mail_group, self).write(cr, uid, ids, vals, context=context)
+
+ def action_group_join(self, cr, uid, ids, context=None):
+ return self.message_subscribe(cr, uid, ids, context=context)
+
+ def action_group_leave(self, cr, uid, ids, context=None):
+ return self.message_unsubscribe(cr, uid, ids, context=context)
diff --git a/addons/mail/mail_group_view.xml b/addons/mail/mail_group_view.xml
index 97210b8c179..c755209f952 100644
--- a/addons/mail/mail_group_view.xml
+++ b/addons/mail/mail_group_view.xml
@@ -64,6 +64,7 @@
+
diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py
index 301657ba4c2..b96b6e3791e 100644
--- a/addons/mail/mail_message.py
+++ b/addons/mail/mail_message.py
@@ -30,66 +30,61 @@ import datetime
from email.header import decode_header
from email.message import Message
-import tools
+from openerp import SUPERUSER_ID
from osv import osv
from osv import fields
+import pytz
+from tools import DEFAULT_SERVER_DATETIME_FORMAT
from tools.translate import _
-from openerp import SUPERUSER_ID
+import tools
_logger = logging.getLogger(__name__)
-def format_date_tz(date, tz=None):
- if not date:
- return 'n/a'
- format = tools.DEFAULT_SERVER_DATETIME_FORMAT
- return tools.server_to_local_timestamp(date, format, format, tz)
-
-def truncate_text(text):
- lines = text and text.split('\n') or []
- if len(lines) > 3:
- res = '\n\t'.join(lines[:3]) + '...'
- else:
- res = '\n\t'.join(lines)
- return res
-
+""" Some tools for parsing / creating email fields """
def decode(text):
"""Returns unicode() string conversion of the the given encoded smtp header text"""
if text:
text = decode_header(text.replace('\r', ''))
return ''.join([tools.ustr(x[0], x[1]) for x in text])
-def to_email(text):
+def mail_tools_to_email(text):
"""Return a list of the email addresses found in ``text``"""
if not text: return []
return re.findall(r'([^ ,<@]+@[^> ,]+)', text)
-class mail_message_common(osv.osv_memory):
- """Common abstract class for holding the main attributes of a
- message object. It could be reused as parent model for any
- database model or wizard screen that needs to hold a kind of
- message"""
+# TODO: remove that after cleaning
+def to_email(text):
+ return mail_tools_to_email(text)
+
+class mail_message_common(osv.TransientModel):
+ """ Common abstract class for holding the main attributes of a
+ message object. It could be reused as parent model for any
+ database model or wizard screen that needs to hold a kind of
+ message.
+ All internal logic should be in another model while this
+ model holds the basics of a message. For example, a wizard for writing
+ emails should inherit from this class and not from mail.message."""
def get_body(self, cr, uid, ids, name, arg, context=None):
- if context is None:
- context = {}
+ """ get correct body version: body_html for html messages, and
+ body_text for plain text messages
+ """
result = dict.fromkeys(ids, '')
for message in self.browse(cr, uid, ids, context=context):
- if message.subtype == 'html':
+ if message.content_subtype == 'html':
result[message.id] = message.body_html
else:
result[message.id] = message.body_text
return result
def search_body(self, cr, uid, obj, name, args, context=None):
- """will receive:
- - obj: mail.message object
- - name: 'body'
- - args: [('body', 'ilike', 'blah')]"""
- return ['|', '&', ('subtype', '=', 'html'), ('body_html', args[0][1], args[0][2]), ('body_text', args[0][1], args[0][2])]
+ # will receive:
+ # - obj: mail.message object
+ # - name: 'body'
+ # - args: [('body', 'ilike', 'blah')]
+ return ['|', '&', ('content_subtype', '=', 'html'), ('body_html', args[0][1], args[0][2]), ('body_text', args[0][1], args[0][2])]
def get_record_name(self, cr, uid, ids, name, arg, context=None):
- if context is None:
- context = {}
result = dict.fromkeys(ids, '')
for message in self.browse(cr, uid, ids, context=context):
if not message.model or not message.res_id:
@@ -116,8 +111,9 @@ class mail_message_common(osv.osv_memory):
'subject': fields.char('Subject', size=512),
'model': fields.char('Related Document Model', size=128, select=1),
'res_id': fields.integer('Related Document ID', select=1),
- 'record_name': fields.function(get_record_name, type='string', string='Message Record Name',
- help="Name of the record, matching the result of the name_get."),
+ 'record_name': fields.function(get_record_name, type='string',
+ string='Message Record Name',
+ help="Name get of the related document."),
'date': fields.datetime('Date'),
'email_from': fields.char('From', size=128, help='Message sender, taken from user preferences.'),
'email_to': fields.char('To', size=256, help='Message recipients'),
@@ -125,104 +121,99 @@ class mail_message_common(osv.osv_memory):
'email_bcc': fields.char('Bcc', size=256, help='Blind carbon copy message recipients'),
'reply_to':fields.char('Reply-To', size=256, help='Preferred response address for the message'),
'headers': fields.text('Message Headers', readonly=1,
- help="Full message headers, e.g. SMTP session headers (usually available on inbound messages only)"),
+ help="Full message headers, e.g. SMTP session headers (usually available on inbound messages only)"),
'message_id': fields.char('Message-Id', size=256, help='Message unique identifier', select=1, readonly=1),
'references': fields.text('References', help='Message references, such as identifiers of previous messages', readonly=1),
- 'subtype': fields.char('Message Type', size=32, help="Type of message, usually 'html' or 'plain', used to "
- "select plaintext or rich text contents accordingly", readonly=1),
+ 'content_subtype': fields.char('Message content subtype', size=32,
+ oldname="subtype", readonly=1,
+ help="Type of message, usually 'html' or 'plain', used to select "\
+ "plain-text or rich-text contents accordingly"),
'body_text': fields.text('Text Contents', help="Plain-text version of the message"),
'body_html': fields.text('Rich-text Contents', help="Rich-text/HTML version of the message"),
- 'body': fields.function(get_body, fnct_search = search_body, string='Message Content', type='text',
- help="Content of the message. This content equals the body_text field for plain-test messages, and body_html for rich-text/HTML messages. This allows having one field if we want to access the content matching the message subtype."),
- 'parent_id': fields.many2one('mail.message', 'Parent Message', help="Parent message, used for displaying as threads with hierarchy",
- select=True, ondelete='set null',),
- 'child_ids': fields.one2many('mail.message', 'parent_id', 'Child Messages'),
+ 'body': fields.function(get_body, fnct_search = search_body, type='text',
+ string='Message Content', store=True,
+ help="Content of the message. This content equals the body_text field "\
+ "for plain-test messages, and body_html for rich-text/HTML "\
+ "messages. This allows having one field if we want to access "\
+ "the content matching the message content_subtype."),
+ 'parent_id': fields.many2one('mail.message.common', 'Parent Message',
+ select=True, ondelete='set null',
+ help="Parent message, used for displaying as threads with hierarchy"),
}
_defaults = {
- 'subtype': 'plain',
+ 'content_subtype': 'plain',
'date': (lambda *a: fields.datetime.now()),
}
-class mail_message(osv.osv):
- '''Model holding messages: system notification (replacing res.log
- notifications), comments (for OpenSocial feature) and
+class mail_message(osv.Model):
+ """Model holding messages: system notification (replacing res.log
+ notifications), comments (for OpenChatter feature) and
RFC2822 email messages. This model also provides facilities to
parse, queue and send new email messages. Type of messages
- are differentiated using the 'type' column.
-
- The ``display_text`` field will have a slightly different
- presentation for real emails and for log messages.
- '''
+ are differentiated using the 'type' column. """
_name = 'mail.message'
_inherit = 'mail.message.common'
_description = 'Mail Message (email, comment, notification)'
_order = 'date desc'
- # XXX to review - how to determine action to use?
def open_document(self, cr, uid, ids, context=None):
+ """ Open the message related document. Note that only the document of
+ ids[0] will be opened.
+ TODO: how to determine the action to use ?
+ """
action_data = False
- if ids:
- msg = self.browse(cr, uid, ids[0], context=context)
- model = msg.model
- res_id = msg.res_id
-
- ir_act_window = self.pool.get('ir.actions.act_window')
- action_ids = ir_act_window.search(cr, uid, [('res_model', '=', model)])
- if action_ids:
- action_data = ir_act_window.read(cr, uid, action_ids[0], context=context)
- action_data.update({
- 'domain' : "[('id','=',%d)]"%(res_id),
+ if not ids:
+ return action_data
+ msg = self.browse(cr, uid, ids[0], context=context)
+ ir_act_window = self.pool.get('ir.actions.act_window')
+ action_ids = ir_act_window.search(cr, uid, [('res_model', '=', msg.model)], context=context)
+ if action_ids:
+ action_data = ir_act_window.read(cr, uid, action_ids[0], context=context)
+ action_data.update({
+ 'domain' : "[('id', '=', %d)]" % (msg.res_id),
'nodestroy': True,
'context': {}
})
return action_data
- # XXX to review - how to determine action to use?
def open_attachment(self, cr, uid, ids, context=None):
+ """ Open the message related attachments.
+ TODO: how to determine the action to use ?
+ """
action_data = False
+ if not ids:
+ return action_data
action_pool = self.pool.get('ir.actions.act_window')
- message = self.browse(cr, uid, ids, context=context)[0]
- att_ids = [x.id for x in message.attachment_ids]
- action_ids = action_pool.search(cr, uid, [('res_model', '=', 'ir.attachment')])
+ messages = self.browse(cr, uid, ids, context=context)
+ att_ids = [x.id for message in messages for x in message.attachment_ids]
+ action_ids = action_pool.search(cr, uid, [('res_model', '=', 'ir.attachment')], context=context)
if action_ids:
action_data = action_pool.read(cr, uid, action_ids[0], context=context)
action_data.update({
- 'domain': [('id','in',att_ids)],
+ 'domain': [('id', 'in', att_ids)],
'nodestroy': True
})
return action_data
-
- def _get_display_text(self, cr, uid, ids, name, arg, context=None):
- if context is None:
- context = {}
- tz = context.get('tz')
- result = {}
-
- # Read message as UID 1 to allow viewing author even if from different company
- for message in self.browse(cr, SUPERUSER_ID, ids):
- msg_txt = ''
- if message.email_from:
- msg_txt += _('%s wrote on %s: \n Subject: %s \n\t') % (message.email_from or '/', format_date_tz(message.date, tz), message.subject)
- if message.body_text:
- msg_txt += truncate_text(message.body_text)
- else:
- msg_txt = (message.user_id.name or '/') + _(' on ') + format_date_tz(message.date, tz) + ':\n\t'
- msg_txt += (message.subject or '')
- result[message.id] = msg_txt
- return result
_columns = {
'type': fields.selection([
('email', 'email'),
('comment', 'Comment'),
('notification', 'System notification'),
- ], 'Type', help="Message type: email for email message, notification for system message, comment for other messages such as user replies"),
- 'partner_id': fields.many2one('res.partner', 'Related partner'),
+ ], 'Type',
+ help="Message type: email for email message, notification for system "\
+ "message, comment for other messages such as user replies"),
+ 'partner_id': fields.many2one('res.partner', 'Related partner',
+ help="Deprecated field. Use partner_ids instead."),
+ 'partner_ids': fields.many2many('res.partner',
+ 'mail_message_destination_partner_rel',
+ 'message_id', 'partner_id', 'Destination partners',
+ help="When sending emails through the social network composition wizard"\
+ "you may choose to send a copy of the mail to partners."),
'user_id': fields.many2one('res.users', 'Related User', readonly=1),
'attachment_ids': fields.many2many('ir.attachment', 'message_attachment_rel', 'message_id', 'attachment_id', 'Attachments'),
- 'display_text': fields.function(_get_display_text, method=True, type='text', size="512", string='Display Text'),
'mail_server_id': fields.many2one('ir.mail_server', 'Outgoing mail server', readonly=1),
'state': fields.selection([
('outgoing', 'Outgoing'),
@@ -231,8 +222,14 @@ class mail_message(osv.osv):
('exception', 'Delivery Failed'),
('cancel', 'Cancelled'),
], 'Status', readonly=True),
- 'auto_delete': fields.boolean('Auto Delete', help="Permanently delete this email after sending it, to save space"),
- 'original': fields.binary('Original', help="Original version of the message, as it was sent on the network", readonly=1),
+ 'auto_delete': fields.boolean('Auto Delete',
+ help="Permanently delete this email after sending it, to save space"),
+ 'original': fields.binary('Original', readonly=1,
+ help="Original version of the message, as it was sent on the network"),
+ 'parent_id': fields.many2one('mail.message', 'Parent Message',
+ select=True, ondelete='set null',
+ help="Parent message, used for displaying as threads with hierarchy"),
+ 'child_ids': fields.one2many('mail.message', 'parent_id', 'Child Messages'),
}
_defaults = {
@@ -249,72 +246,124 @@ class mail_message(osv.osv):
if not cr.fetchone():
cr.execute("""CREATE INDEX mail_message_model_res_id_idx ON mail_message (model, res_id)""")
+ def check(self, cr, uid, ids, mode, context=None, values=None):
+ """Restricts the access to a mail.message, according to referred model
+ """
+ if not ids:
+ return
+ res_ids = {}
+ if isinstance(ids, (int, long)):
+ ids = [ids]
+ cr.execute('SELECT DISTINCT model, res_id FROM mail_message WHERE id = ANY (%s)', (ids,))
+ for rmod, rid in cr.fetchall():
+ if not (rmod and rid):
+ continue
+ res_ids.setdefault(rmod,set()).add(rid)
+ if values:
+ if 'res_model' in values and 'res_id' in values:
+ res_ids.setdefault(values['res_model'],set()).add(values['res_id'])
+
+ ima_obj = self.pool.get('ir.model.access')
+ for model, mids in res_ids.items():
+ # ignore mail messages that are not attached to a resource anymore when checking access rights
+ # (resource was deleted but message was not)
+ mids = self.pool.get(model).exists(cr, uid, mids)
+ ima_obj.check(cr, uid, model, mode)
+ self.pool.get(model).check_access_rule(cr, uid, mids, mode, context=context)
+
+ def create(self, cr, uid, values, context=None):
+ self.check(cr, uid, [], mode='create', context=context, values=values)
+ return super(mail_message, self).create(cr, uid, values, context)
+
+ def read(self, cr, uid, ids, fields_to_read=None, context=None, load='_classic_read'):
+ self.check(cr, uid, ids, 'read', context=context)
+ return super(mail_message, self).read(cr, uid, ids, fields_to_read, context, load)
+
def copy(self, cr, uid, id, default=None, context=None):
"""Overridden to avoid duplicating fields that are unique to each email"""
if default is None:
default = {}
- default.update(message_id=False,original=False,headers=False)
+ self.check(cr, uid, [id], 'read', context=context)
+ default.update(message_id=False, original=False, headers=False)
return super(mail_message,self).copy(cr, uid, id, default=default, context=context)
+
+ def write(self, cr, uid, ids, vals, context=None):
+ self.check(cr, uid, ids, 'write', context=context, values=vals)
+ return super(mail_message, self).write(cr, uid, ids, vals, context)
- def schedule_with_attach(self, cr, uid, email_from, email_to, subject, body, model=False, email_cc=None,
- email_bcc=None, reply_to=False, attachments=None, message_id=False, references=False,
- res_id=False, subtype='plain', headers=None, mail_server_id=False, auto_delete=False,
- context=None):
- """Schedule sending a new email message, to be sent the next time the mail scheduler runs, or
- the next time :meth:`process_email_queue` is called explicitly.
+ def unlink(self, cr, uid, ids, context=None):
+ self.check(cr, uid, ids, 'unlink', context=context)
+ return super(mail_message, self).unlink(cr, uid, ids, context)
- :param string email_from: sender email address
- :param list email_to: list of recipient addresses (to be joined with commas)
- :param string subject: email subject (no pre-encoding/quoting necessary)
- :param string body: email body, according to the ``subtype`` (by default, plaintext).
- If html subtype is used, the message will be automatically converted
- to plaintext and wrapped in multipart/alternative.
- :param list email_cc: optional list of string values for CC header (to be joined with commas)
- :param list email_bcc: optional list of string values for BCC header (to be joined with commas)
- :param string model: optional model name of the document this mail is related to (this will also
- be used to generate a tracking id, used to match any response related to the
- same document)
- :param int res_id: optional resource identifier this mail is related to (this will also
- be used to generate a tracking id, used to match any response related to the
- same document)
- :param string reply_to: optional value of Reply-To header
- :param string subtype: optional mime subtype for the text body (usually 'plain' or 'html'),
- must match the format of the ``body`` parameter. Default is 'plain',
- making the content part of the mail "text/plain".
- :param dict attachments: map of filename to filecontents, where filecontents is a string
- containing the bytes of the attachment
- :param dict headers: optional map of headers to set on the outgoing mail (may override the
- other headers, including Subject, Reply-To, Message-Id, etc.)
- :param int mail_server_id: optional id of the preferred outgoing mail server for this mail
- :param bool auto_delete: optional flag to turn on auto-deletion of the message after it has been
- successfully sent (default to False)
+ def schedule_with_attach(self, cr, uid, email_from, email_to, subject, body, model=False, type='email',
+ email_cc=None, email_bcc=None, reply_to=False, partner_ids=None, attachments=None,
+ message_id=False, references=False, res_id=False, content_subtype='plain',
+ headers=None, mail_server_id=False, auto_delete=False, context=None):
+ """ Schedule sending a new email message, to be sent the next time the
+ mail scheduler runs, or the next time :meth:`process_email_queue` is
+ called explicitly.
+ :param string email_from: sender email address
+ :param list email_to: list of recipient addresses (to be joined with commas)
+ :param string subject: email subject (no pre-encoding/quoting necessary)
+ :param string body: email body, according to the ``content_subtype``
+ (by default, plaintext). If html content_subtype is used, the
+ message will be automatically converted to plaintext and wrapped
+ in multipart/alternative.
+ :param list email_cc: optional list of string values for CC header
+ (to be joined with commas)
+ :param list email_bcc: optional list of string values for BCC header
+ (to be joined with commas)
+ :param string model: optional model name of the document this mail
+ is related to (this will also be used to generate a tracking id,
+ used to match any response related to the same document)
+ :param int res_id: optional resource identifier this mail is related
+ to (this will also be used to generate a tracking id, used to
+ match any response related to the same document)
+ :param string reply_to: optional value of Reply-To header
+ :param partner_ids: destination partner_ids
+ :param string content_subtype: optional mime content_subtype for
+ the text body (usually 'plain' or 'html'), must match the format
+ of the ``body`` parameter. Default is 'plain', making the content
+ part of the mail "text/plain".
+ :param dict attachments: map of filename to filecontents, where
+ filecontents is a string containing the bytes of the attachment
+ :param dict headers: optional map of headers to set on the outgoing
+ mail (may override the other headers, including Subject,
+ Reply-To, Message-Id, etc.)
+ :param int mail_server_id: optional id of the preferred outgoing
+ mail server for this mail
+ :param bool auto_delete: optional flag to turn on auto-deletion of
+ the message after it has been successfully sent (default to False)
"""
if context is None:
context = {}
if attachments is None:
attachments = {}
+ if partner_ids is None:
+ partner_ids = []
attachment_obj = self.pool.get('ir.attachment')
for param in (email_to, email_cc, email_bcc):
if param and not isinstance(param, list):
param = [param]
msg_vals = {
'subject': subject,
- 'date': time.strftime('%Y-%m-%d %H:%M:%S'),
+ 'date': fields.datetime.now(),
'user_id': uid,
'model': model,
'res_id': res_id,
- 'type': 'email',
- 'body_text': body if subtype != 'html' else False,
- 'body_html': body if subtype == 'html' else False,
+ 'type': type,
+ 'body_text': body if content_subtype != 'html' else False,
+ 'body_html': body if content_subtype == 'html' else False,
'email_from': email_from,
'email_to': email_to and ','.join(email_to) or '',
'email_cc': email_cc and ','.join(email_cc) or '',
'email_bcc': email_bcc and ','.join(email_bcc) or '',
+ 'partner_ids': partner_ids,
'reply_to': reply_to,
'message_id': message_id,
'references': references,
- 'subtype': subtype,
+ 'content_subtype': content_subtype,
'headers': headers, # serialize the dict on the fly
'mail_server_id': mail_server_id,
'state': 'outgoing',
@@ -338,7 +387,10 @@ class mail_message(osv.osv):
return email_msg_id
def mark_outgoing(self, cr, uid, ids, context=None):
- return self.write(cr, uid, ids, {'state':'outgoing'}, context)
+ return self.write(cr, uid, ids, {'state':'outgoing'}, context=context)
+
+ def cancel(self, cr, uid, ids, context=None):
+ return self.write(cr, uid, ids, {'state':'cancel'}, context=context)
def process_email_queue(self, cr, uid, ids=None, context=None):
"""Send immediately queued messages, committing after each
@@ -357,7 +409,7 @@ class mail_message(osv.osv):
if context is None:
context = {}
if not ids:
- filters = [('state', '=', 'outgoing')]
+ filters = ['&', ('state', '=', 'outgoing'), ('type', '=', 'email')]
if 'filters' in context:
filters.extend(context['filters'])
ids = self.search(cr, uid, filters, context=context)
@@ -371,7 +423,7 @@ class mail_message(osv.osv):
_logger.exception("Failed processing mail queue")
return res
- def parse_message(self, message, save_original=False):
+ def parse_message(self, message, save_original=False, context=None):
"""Parses a string or email.message.Message representing an
RFC-2822 email, and returns a generic dict holding the
message details.
@@ -394,7 +446,7 @@ class mail_message(osv.osv):
'headers' : { 'X-Mailer': mailer,
#.. all X- headers...
},
- 'subtype': msg_mime_subtype,
+ 'content_subtype': msg_mime_subtype,
'body_text': plaintext_body
'body_html': html_body,
'attachments': [('file1', 'bytes'),
@@ -428,49 +480,52 @@ class mail_message(osv.osv):
msg_txt['message-id'] = message_id
_logger.info('Parsing Message without message-id, generating a random one: %s', message_id)
- fields = msg_txt.keys()
+ msg_fields = msg_txt.keys()
msg['id'] = message_id
msg['message-id'] = message_id
- if 'Subject' in fields:
+ if 'Subject' in msg_fields:
msg['subject'] = decode(msg_txt.get('Subject'))
- if 'Content-Type' in fields:
+ if 'Content-Type' in msg_fields:
msg['content-type'] = msg_txt.get('Content-Type')
- if 'From' in fields:
+ if 'From' in msg_fields:
msg['from'] = decode(msg_txt.get('From') or msg_txt.get_unixfrom())
- if 'To' in fields:
+ if 'To' in msg_fields:
msg['to'] = decode(msg_txt.get('To'))
- if 'Delivered-To' in fields:
+ if 'Delivered-To' in msg_fields:
msg['to'] = decode(msg_txt.get('Delivered-To'))
- if 'CC' in fields:
+ if 'CC' in msg_fields:
msg['cc'] = decode(msg_txt.get('CC'))
- if 'Cc' in fields:
+ if 'Cc' in msg_fields:
msg['cc'] = decode(msg_txt.get('Cc'))
- if 'Reply-To' in fields:
+ if 'Reply-To' in msg_fields:
msg['reply'] = decode(msg_txt.get('Reply-To'))
- if 'Date' in fields:
+ if 'Date' in msg_fields:
date_hdr = decode(msg_txt.get('Date'))
- msg['date'] = dateutil.parser.parse(date_hdr).strftime("%Y-%m-%d %H:%M:%S")
+ # convert from email timezone to server timezone
+ date_server_datetime = dateutil.parser.parse(date_hdr).astimezone(pytz.timezone(tools.get_server_timezone()))
+ date_server_datetime_str = date_server_datetime.strftime(DEFAULT_SERVER_DATETIME_FORMAT)
+ msg['date'] = date_server_datetime_str
- if 'Content-Transfer-Encoding' in fields:
+ if 'Content-Transfer-Encoding' in msg_fields:
msg['encoding'] = msg_txt.get('Content-Transfer-Encoding')
- if 'References' in fields:
+ if 'References' in msg_fields:
msg['references'] = msg_txt.get('References')
- if 'In-Reply-To' in fields:
+ if 'In-Reply-To' in msg_fields:
msg['in-reply-to'] = msg_txt.get('In-Reply-To')
msg['headers'] = {}
- msg['subtype'] = 'plain'
+ msg['content_subtype'] = 'plain'
for item in msg_txt.items():
if item[0].startswith('X-'):
msg['headers'].update({item[0]: item[1]})
@@ -479,7 +534,7 @@ class mail_message(osv.osv):
body = msg_txt.get_payload(decode=True)
if 'text/html' in msg.get('content-type', ''):
msg['body_html'] = body
- msg['subtype'] = 'html'
+ msg['content_subtype'] = 'html'
if body:
body = tools.html2plaintext(body)
msg['body_text'] = tools.ustr(body, encoding)
@@ -488,9 +543,9 @@ class mail_message(osv.osv):
if msg_txt.is_multipart() or 'multipart/alternative' in msg.get('content-type', ''):
body = ""
if 'multipart/alternative' in msg.get('content-type', ''):
- msg['subtype'] = 'alternative'
+ msg['content_subtype'] = 'alternative'
else:
- msg['subtype'] = 'mixed'
+ msg['content_subtype'] = 'mixed'
for part in msg_txt.walk():
if part.get_content_maintype() == 'multipart':
continue
@@ -504,7 +559,7 @@ class mail_message(osv.osv):
content = tools.ustr(content, encoding)
if part.get_content_subtype() == 'html':
msg['body_html'] = content
- msg['subtype'] = 'html' # html version prevails
+ msg['content_subtype'] = 'html' # html version prevails
body = tools.ustr(tools.html2plaintext(content))
body = body.replace('
', '')
elif part.get_content_subtype() == 'plain':
@@ -521,7 +576,7 @@ class mail_message(osv.osv):
# for backwards compatibility:
msg['body'] = msg['body_text']
- msg['sub_type'] = msg['subtype'] or 'plain'
+ msg['sub_type'] = msg['content_subtype'] or 'plain'
return msg
def _postprocess_sent_message(self, cr, uid, message, context=None):
@@ -535,10 +590,9 @@ class mail_message(osv.osv):
"""
if message.auto_delete:
self.pool.get('ir.attachment').unlink(cr, uid,
- [x.id for x in message.attachment_ids \
- if x.res_model == self._name and \
- x.res_id == message.id],
- context=context)
+ [x.id for x in message.attachment_ids
+ if x.res_model == self._name and x.res_id == message.id],
+ context=context)
message.unlink()
return True
@@ -557,8 +611,6 @@ class mail_message(osv.osv):
transactions (default: False)
:return: True
"""
- if context is None:
- context = {}
ir_mail_server = self.pool.get('ir.mail_server')
self.write(cr, uid, ids, {'state': 'outgoing'}, context=context)
for message in self.browse(cr, uid, ids, context=context):
@@ -567,37 +619,45 @@ class mail_message(osv.osv):
for attach in message.attachment_ids:
attachments.append((attach.datas_fname, base64.b64decode(attach.datas)))
- body = message.body_html if message.subtype == 'html' else message.body_text
+ body = message.body_html if message.content_subtype == 'html' else message.body_text
body_alternative = None
- subtype_alternative = None
- if message.subtype == 'html' and message.body_text:
+ content_subtype_alternative = None
+ if message.content_subtype == 'html' and message.body_text:
# we have a plain text alternative prepared, pass it to
# build_message instead of letting it build one
body_alternative = message.body_text
- subtype_alternative = 'plain'
+ content_subtype_alternative = 'plain'
+ # handle destination_partners
+ partner_ids_email_to = ''
+ for partner in message.partner_ids:
+ partner_ids_email_to += '%s ' % (partner.email or '')
+ message_email_to = '%s %s' % (partner_ids_email_to, message.email_to or '')
+
+ # build an RFC2822 email.message.Message object and send it
+ # without queuing
msg = ir_mail_server.build_email(
email_from=message.email_from,
- email_to=to_email(message.email_to),
+ email_to=mail_tools_to_email(message_email_to),
subject=message.subject,
body=body,
body_alternative=body_alternative,
- email_cc=to_email(message.email_cc),
- email_bcc=to_email(message.email_bcc),
+ email_cc=mail_tools_to_email(message.email_cc),
+ email_bcc=mail_tools_to_email(message.email_bcc),
reply_to=message.reply_to,
attachments=attachments, message_id=message.message_id,
references = message.references,
object_id=message.res_id and ('%s-%s' % (message.res_id,message.model)),
- subtype=message.subtype,
- subtype_alternative=subtype_alternative,
+ subtype=message.content_subtype,
+ subtype_alternative=content_subtype_alternative,
headers=message.headers and ast.literal_eval(message.headers))
res = ir_mail_server.send_email(cr, uid, msg,
mail_server_id=message.mail_server_id.id,
context=context)
if res:
- message.write({'state':'sent', 'message_id': res})
+ message.write({'state':'sent', 'message_id': res, 'email_to': message_email_to})
else:
- message.write({'state':'exception'})
+ message.write({'state':'exception', 'email_to': message_email_to})
message.refresh()
if message.state == 'sent':
self._postprocess_sent_message(cr, uid, message, context=context)
@@ -609,8 +669,6 @@ class mail_message(osv.osv):
cr.commit()
return True
- def cancel(self, cr, uid, ids, context=None):
- self.write(cr, uid, ids, {'state':'cancel'}, context=context)
- return True
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mail/mail_message_view.xml b/addons/mail/mail_message_view.xml
index 9159190ab29..634b5317d27 100644
--- a/addons/mail/mail_message_view.xml
+++ b/addons/mail/mail_message_view.xml
@@ -30,17 +30,26 @@
+
-
+
-
+
+
+
+
+
+
+
+
+
@@ -73,6 +82,30 @@
+
+
+
+
+
+
+
+
@@ -85,55 +118,60 @@
@@ -235,13 +273,13 @@
News Feed
- mail.all_feeds
+ mail.wallMy Feeds
- mail.all_feeds
+ mail.wall
diff --git a/addons/mail/mail_subscription_view.xml b/addons/mail/mail_subscription_view.xml
index 7dbaea098dc..c3d79d48308 100644
--- a/addons/mail/mail_subscription_view.xml
+++ b/addons/mail/mail_subscription_view.xml
@@ -52,11 +52,13 @@
tree,form
-
-
+
+ -->
-
-
+
+
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py
index cdcaf4f464d..d036150b21c 100644
--- a/addons/mail/mail_thread.py
+++ b/addons/mail/mail_thread.py
@@ -65,7 +65,7 @@ class mail_thread(osv.Model):
def _get_message_ids(self, cr, uid, ids, name, args, context=None):
res = {}
for id in ids:
- message_ids = self.message_load_ids(cr, uid, [id], context=context)
+ message_ids = self.message_search(cr, uid, [id], context=context)
subscriber_ids = self.message_get_subscribers(cr, uid, [id], context=context)
res[id] = {
'message_ids': message_ids,
@@ -130,7 +130,7 @@ class mail_thread(osv.Model):
# delete subscriptions
subscr_to_del_ids = subscr_obj.search(cr, uid, [('res_model', '=', self._name), ('res_id', 'in', ids)], context=context)
subscr_obj.unlink(cr, uid, subscr_to_del_ids, context=context)
- # delete notifications
+ # delete messages and notifications
msg_to_del_ids = msg_obj.search(cr, uid, [('model', '=', self._name), ('res_id', 'in', ids)], context=context)
msg_obj.unlink(cr, uid, msg_to_del_ids, context=context)
@@ -150,39 +150,13 @@ class mail_thread(osv.Model):
context = {}
message_obj = self.pool.get('mail.message')
- subscription_obj = self.pool.get('mail.subscription')
notification_obj = self.pool.get('mail.notification')
- res_users_obj = self.pool.get('res.users')
- body = vals.get('body_html', '') if vals.get('subtype', 'plain') == 'html' else vals.get('body_text', '')
-
+ body = vals.get('body_html', '') if vals.get('content_subtype') == 'html' else vals.get('body_text', '')
+
# automatically subscribe the writer of the message
if vals['user_id']:
self.message_subscribe(cr, uid, [thread_id], [vals['user_id']], context=context)
-
- # get users that will get a notification pushed
- user_to_push_ids = self.message_create_get_notification_user_ids(cr, uid, [thread_id], vals, context=context)
- user_to_push_from_parse_ids = self.message_parse_users(cr, uid, [thread_id], body, context=context)
-
- # set email_from and email_to for comments and notifications
- if vals.get('type', False) and vals['type'] == 'comment' or vals['type'] == 'notification':
- current_user = res_users_obj.browse(cr, uid, [uid], context=context)[0]
- if not vals.get('email_from', False):
- vals['email_from'] = current_user.user_email
- if not vals.get('email_to', False):
- email_to = ''
- for user in res_users_obj.browse(cr, uid, user_to_push_ids, context=context):
- if not user.notification_email_pref == 'all' and \
- not (user.notification_email_pref == 'comments' and vals['type'] == 'comment') and \
- not (user.notification_email_pref == 'to_me' and user.id in user_to_push_from_parse_ids):
- continue
- if not user.user_email:
- continue
- email_to = '%s, %s' % (email_to, user.user_email)
- email_to = email_to.lstrip(', ')
- if email_to:
- vals['email_to'] = email_to
- vals['state'] = 'outgoing'
-
+
# create message
msg_id = message_obj.create(cr, uid, vals, context=context)
@@ -191,43 +165,50 @@ class mail_thread(osv.Model):
# special: if install mode, do not push demo data
if context.get('install_mode', False):
- return True
-
- # push to users
+ return msg_id
+
+ # get users that will get a notification pushed
+ user_to_push_ids = self.message_get_user_ids_to_notify(cr, uid, [thread_id], vals, context=context)
for id in user_to_push_ids:
notification_obj.create(cr, uid, {'user_id': id, 'message_id': msg_id}, context=context)
-
+
+ # create the email to send
+ email_id = self.message_create_notify_by_email(cr, uid, vals, user_to_push_ids, context=context)
+
return msg_id
-
- def message_create_get_notification_user_ids(self, cr, uid, thread_ids, new_msg_vals, context=None):
- if context is None:
- context = {}
-
- notif_user_ids = []
- body = new_msg_vals.get('body_html', '') if new_msg_vals.get('subtype', 'plain') == 'html' else new_msg_vals.get('body_text', '')
- for thread_id in thread_ids:
- # add subscribers
- notif_user_ids += self.message_get_subscribers(cr, uid, [thread_id], context=context)
- # add users requested via parsing message (@login)
- notif_user_ids += self.message_parse_users(cr, uid, [thread_id], body, context=context)
- # add users requested to perform an action (need_action mechanism)
- if hasattr(self, 'get_needaction_user_ids'):
- notif_user_ids += self.get_needaction_user_ids(cr, uid, [thread_id], context=context)[thread_id]
- # add users notified of the parent messages (because: if parent message contains @login, login must receive the replies)
- if new_msg_vals.get('parent_id'):
- notif_obj = self.pool.get('mail.notification')
- parent_notif_ids = notif_obj.search(cr, uid, [('message_id', '=', new_msg_vals.get('parent_id'))], context=context)
- parent_notifs = notif_obj.read(cr, uid, parent_notif_ids, context=context)
- notif_user_ids += [parent_notif['user_id'][0] for parent_notif in parent_notifs]
+
+ def message_get_user_ids_to_notify(self, cr, uid, thread_ids, new_msg_vals, context=None):
+ subscription_obj = self.pool.get('mail.subscription')
+ # get body
+ body = new_msg_vals.get('body_html', '') if new_msg_vals.get('content_subtype') == 'html' else new_msg_vals.get('body_text', '')
+
+ # get subscribers
+ notif_user_ids = self.message_get_subscribers(cr, uid, thread_ids, context=context)
+
+ # add users requested via parsing message (@login)
+ notif_user_ids += self.message_parse_users(cr, uid, body, context=context)
+
+ # add users requested to perform an action (need_action mechanism)
+ if hasattr(self, 'get_needaction_user_ids'):
+ user_ids_dict = self.get_needaction_user_ids(cr, uid, thread_ids, context=context)
+ for id, user_ids in user_ids_dict.iteritems():
+ notif_user_ids += user_ids
+
+ # add users notified of the parent messages (because: if parent message contains @login, login must receive the replies)
+ if new_msg_vals.get('parent_id'):
+ notif_obj = self.pool.get('mail.notification')
+ parent_notif_ids = notif_obj.search(cr, uid, [('message_id', '=', new_msg_vals.get('parent_id'))], context=context)
+ parent_notifs = notif_obj.read(cr, uid, parent_notif_ids, context=context)
+ notif_user_ids += [parent_notif['user_id'][0] for parent_notif in parent_notifs]
# remove duplicate entries
notif_user_ids = list(set(notif_user_ids))
return notif_user_ids
- def message_parse_users(self, cr, uid, ids, string, context=None):
+ def message_parse_users(self, cr, uid, string, context=None):
"""Parse message content
- if find @login -(^|\s)@((\w|@|\.)*)-: returns the related ids
- this supports login that are emails (such as @admin@lapin.net)
+ this supports login that are emails (such as @raoul@grobedon.net)
"""
regex = re.compile('(^|\s)@((\w|@|\.)*)')
login_lst = [item[1] for item in regex.findall(string)]
@@ -248,46 +229,61 @@ class mail_thread(osv.Model):
return ret_dict
def message_append(self, cr, uid, threads, subject, body_text=None, body_html=None,
- parent_id=False, type='email', subtype='plain', state='received',
- email_to=False, email_from=False, email_cc=None, email_bcc=None,
- reply_to=None, email_date=None, message_id=False, references=None,
- attachments=None, headers=None, original=None, context=None):
- """Creates a new mail.message attached to the current mail.thread,
- containing all the details passed as parameters. All attachments
- will be attached to the thread record as well as to the actual
- message.
- If ``email_from`` is not set or ``type`` not set as 'email',
- a note message is created, without the usual envelope
- attributes (sender, recipients, etc.).
- The creation of the message is done by calling ``message_create``
- method, that will manage automatic pushing of notifications.
+ type='email', email_date=None, parent_id=False,
+ content_subtype='plain', state=None,
+ partner_ids=None, email_from=False, email_to=False,
+ email_cc=None, email_bcc=None, reply_to=None,
+ headers=None, message_id=False, references=None,
+ attachments=None, original=None, context=None):
+ """ Creates a new mail.message through message_create. The new message
+ is attached to the current mail.thread, containing all the details
+ passed as parameters. All attachments will be attached to the
+ thread record as well as to the actual message.
+
+ This method calls message_create that will handle management of
+ subscription and notifications, and effectively create the message.
+
+ If ``email_from`` is not set or ``type`` not set as 'email',
+ a note message is created (comment or system notification),
+ without the usual envelope attributes (sender, recipients, etc.).
- :param threads: list of thread ids, or list of browse_records representing
- threads to which a new message should be attached
- :param subject: subject of the message, or description of the event if this
- is an *event log* entry.
- :param body_text: plaintext contents of the mail or log message
- :param body_html: html contents of the mail or log message
- :param parent_id: id of the parent message (threaded messaging model)
- :param type: optional type of message: 'email', 'comment', 'notification'
- :param subtype: optional subtype of message: 'plain' or 'html', corresponding to the main
- body contents (body_text or body_html).
- :param state: optional state of message; 'received' by default
- :param email_to: Email-To / Recipient address
- :param email_from: Email From / Sender address if any
- :param email_cc: Comma-Separated list of Carbon Copy Emails To addresse if any
- :param email_bcc: Comma-Separated list of Blind Carbon Copy Emails To addresses if any
- :param reply_to: reply_to header
- :param email_date: email date string if different from now, in server timezone
- :param message_id: optional email identifier
- :param references: optional email references
- :param headers: mail headers to store
- :param dict attachments: map of attachment filenames to binary contents, if any.
- :param str original: optional full source of the RFC2822 email, for reference
- :param dict context: if a ``thread_model`` value is present
- in the context, its value will be used
- to determine the model of the thread to
- update (instead of the current model).
+ :param threads: list of thread ids, or list of browse_records
+ representing threads to which a new message should be attached
+ :param subject: subject of the message, or description of the event;
+ this is totally optional as subjects are not important except
+ for specific messages (blog post, job offers) or for emails
+ :param body_text: plaintext contents of the mail or log message
+ :param body_html: html contents of the mail or log message
+ :param type: type of message: 'email', 'comment', 'notification';
+ email by default
+ :param email_date: email date string if different from now, in
+ server timezone
+ :param parent_id: id of the parent message (threaded messaging model)
+ :param content_subtype: optional content_subtype of message: 'plain'
+ or 'html', corresponding to the main body contents (body_text or
+ body_html).
+ :param state: state of message
+ :param partner_ids: destination partners of the message, in addition
+ to the now fully optional email_to; this method is supposed to
+ received a list of ids is not None. The specific many2many
+ instruction will be generated by this method.
+ :param email_from: Email From / Sender address if any
+ :param email_to: Email-To / Recipient address
+ :param email_cc: Comma-Separated list of Carbon Copy Emails To
+ addresses if any
+ :param email_bcc: Comma-Separated list of Blind Carbon Copy Emails To
+ addresses if any
+ :param reply_to: reply_to header
+ :param headers: mail headers to store
+ :param message_id: optional email identifier
+ :param references: optional email references
+ :param dict attachments: map of attachment filenames to binary
+ contents, if any.
+ :param str original: optional full source of the RFC2822 email, for
+ reference
+ :param dict context: if a ``thread_model`` value is present in the
+ context, its value will be used to determine the model of the
+ thread to update (instead of the current model).
"""
if context is None:
context = {}
@@ -323,10 +319,15 @@ class mail_thread(osv.Model):
'res_id': thread.id,
}
to_attach.append(ir_attachment.create(cr, uid, data_attach, context=context))
-
+ # find related partner: partner_id column in thread object, or self is res.partner model
partner_id = ('partner_id' in thread._columns.keys()) and (thread.partner_id and thread.partner_id.id or False) or False
if not partner_id and thread._name == 'res.partner':
partner_id = thread.id
+ # destination partners
+ if partner_ids is None:
+ partner_ids = []
+ mail_partner_ids = [(6, 0, partner_ids)]
+
data = {
'subject': subject,
'body_text': body_text or (hasattr(thread, 'description') and thread.description or ''),
@@ -334,9 +335,10 @@ class mail_thread(osv.Model):
'parent_id': parent_id,
'date': email_date or fields.datetime.now(),
'type': type,
- 'subtype': subtype,
+ 'content_subtype': content_subtype,
'state': state,
'message_id': message_id,
+ 'partner_ids': mail_partner_ids,
'attachment_ids': [(6, 0, to_attach)],
'user_id': uid,
'model' : thread._name,
@@ -349,7 +351,6 @@ class mail_thread(osv.Model):
if isinstance(param, list):
param = ", ".join(param)
data.update({
- 'subject': subject or _('History'),
'email_to': email_to,
'email_from': email_from or \
(hasattr(thread, 'user_id') and thread.user_id and thread.user_id.user_email),
@@ -385,8 +386,9 @@ class mail_thread(osv.Model):
body_html= msg_dict.get('body_html'),
parent_id = msg_dict.get('parent_id', False),
type = msg_dict.get('type', 'email'),
- subtype = msg_dict.get('subtype', 'plain'),
- state = msg_dict.get('state', 'received'),
+ content_subtype = msg_dict.get('content_subtype'),
+ state = msg_dict.get('state'),
+ partner_ids = msg_dict.get('partner_ids'),
email_from = msg_dict.get('from', msg_dict.get('email_from')),
email_to = msg_dict.get('to', msg_dict.get('email_to')),
email_cc = msg_dict.get('cc', msg_dict.get('email_cc')),
@@ -401,59 +403,109 @@ class mail_thread(osv.Model):
original = msg_dict.get('original'),
context = context)
- def _message_add_ancestor_ids(self, cr, uid, ids, child_ids, root_ids, context=None):
- """ Given message child_ids
- Find their ancestors until root ids"""
- if context is None:
- context = {}
- msg_obj = self.pool.get('mail.message')
- tmp_msgs = msg_obj.read(cr, uid, child_ids, ['id', 'parent_id'], context=context)
- parent_ids = [msg['parent_id'][0] for msg in tmp_msgs if msg['parent_id'] and msg['parent_id'][0] not in root_ids and msg['parent_id'][0] not in child_ids]
+ #------------------------------------------------------
+ # Message loading
+ #------------------------------------------------------
+
+ def _message_search_ancestor_ids(self, cr, uid, ids, child_ids, ancestor_ids, context=None):
+ """ Given message child_ids ids, find their ancestors until ancestor_ids
+ using their parent_id relationship.
+
+ :param child_ids: the first nodes of the search
+ :param ancestor_ids: list of ancestors. When the search reach an
+ ancestor, it stops.
+ """
+ def _get_parent_ids(message_list, ancestor_ids, child_ids):
+ """ Tool function: return the list of parent_ids of messages
+ contained in message_list. Parents that are in ancestor_ids
+ or in child_ids are not returned. """
+ return [message['parent_id'][0] for message in message_list
+ if message['parent_id']
+ and message['parent_id'][0] not in ancestor_ids
+ and message['parent_id'][0] not in child_ids
+ ]
+
+ message_obj = self.pool.get('mail.message')
+ messages_temp = message_obj.read(cr, uid, child_ids, ['id', 'parent_id'], context=context)
+ parent_ids = _get_parent_ids(messages_temp, ancestor_ids, child_ids)
child_ids += parent_ids
cur_iter = 0; max_iter = 100; # avoid infinite loop
while (parent_ids and (cur_iter < max_iter)):
cur_iter += 1
- tmp_msgs = msg_obj.read(cr, uid, parent_ids, ['id', 'parent_id'], context=context)
- parent_ids = [msg['parent_id'][0] for msg in tmp_msgs if msg['parent_id'] and msg['parent_id'][0] not in root_ids and msg['parent_id'][0] not in child_ids]
+ messages_temp = message_obj.read(cr, uid, parent_ids, ['id', 'parent_id'], context=context)
+ parent_ids = _get_parent_ids(messages_temp, ancestor_ids, child_ids)
child_ids += parent_ids
if (cur_iter > max_iter):
- _logger.warning("Possible infinite loop in _message_add_ancestor_ids. Note that this algorithm is intended to check for cycle in message graph.")
+ _logger.warning("Possible infinite loop in _message_search_ancestor_ids. "\
+ "Note that this algorithm is intended to check for cycle in "\
+ "message graph, leading to a curious error. Have fun.")
return child_ids
- def message_load_ids(self, cr, uid, ids, limit=100, offset=0, domain=[], ascent=False, root_ids=[], context=None):
- """ OpenChatter feature: return thread messages ids. It searches in
- mail.messages where res_id = ids, (res_)model = current model.
- :param domain: domain to add to the search; especially child_of
- is interesting when dealing with threaded display
- :param ascent: performs an ascended search; will add to fetched msgs
- all their parents until root_ids
- :param root_ids: for ascent search
- :param root_ids: root_ids when performing an ascended search
+ def message_search_get_domain(self, cr, uid, ids, context=None):
+ """ OpenChatter feature: get the domain to search the messages related
+ to a document. mail.thread defines the default behavior as
+ being messages with model = self._name, id in ids.
+ This method should be overridden if a model has to implement a
+ particular behavior.
"""
- if context is None:
- context = {}
- msg_obj = self.pool.get('mail.message')
- msg_ids = msg_obj.search(cr, uid, ['&', ('res_id', 'in', ids), ('model', '=', self._name)] + domain,
- limit=limit, offset=offset, context=context)
- if (ascent): msg_ids = self._message_add_ancestor_ids(cr, uid, ids, msg_ids, root_ids, context=context)
- return msg_ids
+ return ['&', ('res_id', 'in', ids), ('model', '=', self._name)]
- def message_load(self, cr, uid, ids, limit=100, offset=0, domain=[], ascent=False, root_ids=[], context=None):
- """ OpenChatter feature: return thread messages
+ def message_search(self, cr, uid, ids, fetch_ancestors=False, ancestor_ids=None,
+ limit=100, offset=0, domain=None, count=False, context=None):
+ """ OpenChatter feature: return thread messages ids according to the
+ search domain given by ``message_search_get_domain``.
+
+ It is possible to add in the search the parent of messages by
+ setting the fetch_ancestors flag to True. In that case, using
+ the parent_id relationship, the method returns the id list according
+ to the search domain, but then calls ``_message_search_ancestor_ids``
+ that will add to the list the ancestors ids. The search is limited
+ to parent messages having an id in ancestor_ids or having
+ parent_id set to False.
+
+ If ``count==True``, the number of ids is returned instead of the
+ id list. The count is done by hand instead of passing it as an
+ argument to the search call because we might want to perform
+ a research including parent messages until some ancestor_ids.
+
+ :param fetch_ancestors: performs an ascended search; will add
+ to fetched msgs all their parents until
+ ancestor_ids
+ :param ancestor_ids: used when fetching ancestors
+ :param domain: domain to add to the search; especially child_of
+ is interesting when dealing with threaded display.
+ Note that the added domain is anded with the
+ default domain.
+ :param limit, offset, count, context: as usual
"""
- msg_ids = self.message_load_ids(cr, uid, ids, limit, offset, domain, ascent, root_ids, context=context)
- msgs = self.pool.get('mail.message').read(cr, uid, msg_ids, [], context=context)
-
- # Set as read
- self.message_check_and_set_read(cr, uid, ids, context=context)
-
+ search_domain = self.message_search_get_domain(cr, uid, ids, context=context)
+ if domain:
+ search_domain += domain
+ message_obj = self.pool.get('mail.message')
+ message_res = message_obj.search(cr, uid, search_domain, limit=limit, offset=offset, count=count, context=context)
+ if not count and fetch_ancestors:
+ message_res += self._message_search_ancestor_ids(cr, uid, ids, message_res, ancestor_ids, context=context)
+ return message_res
+
+ def message_read(self, cr, uid, ids, fetch_ancestors=False, ancestor_ids=None,
+ limit=100, offset=0, domain=None, context=None):
+ """ OpenChatter feature: read the messages related to some threads.
+ This method is used mainly the Chatter widget, to directly have
+ read result instead of searching then reading.
+
+ Please see message_search for more information about the parameters.
+ """
+ message_ids = self.message_search(cr, uid, ids, fetch_ancestors, ancestor_ids,
+ limit, offset, domain, context=context)
+ messages = self.pool.get('mail.message').read(cr, uid, message_ids, context=context)
+
""" Retrieve all attachments names """
+ map_id_to_name = dict((attachment_id, '') for message in messages for attachment_id in message['attachment_ids'])
map_id_to_name = {}
-
- for msg in msgs:
+ for msg in messages:
for attach_id in msg["attachment_ids"]:
map_id_to_name[attach_id] = '' # use empty string as a placeholder
-
+
ids = map_id_to_name.keys()
names = self.pool.get('ir.attachment').name_get(cr, uid, ids, context=context)
@@ -462,26 +514,34 @@ class mail_thread(osv.Model):
map_id_to_name[name[0]] = name[1]
# give corresponding ids and names to each message
- for msg in msgs:
+ for msg in messages:
msg["attachments"] = []
for attach_id in msg["attachment_ids"]:
msg["attachments"].append({'id': attach_id, 'name': map_id_to_name[attach_id]})
- """ Sort and return messages """
- msgs = sorted(msgs, key=lambda d: (-d['id']))
- return msgs
+ # Set the threads as read
+ self.message_check_and_set_read(cr, uid, ids, context=context)
+ # Sort and return the messages
+ messages = sorted(messages, key=lambda d: (-d['id']))
+ return messages
- def get_pushed_messages(self, cr, uid, ids, limit=100, offset=0, msg_search_domain=[], ascent=False, root_ids=[], context=None):
- """ OpenChatter: wall: get messages to display (=pushed notifications)
+ def message_get_pushed_messages(self, cr, uid, ids, fetch_ancestors=False, ancestor_ids=None,
+ limit=100, offset=0, msg_search_domain=[], context=None):
+ """ OpenChatter: wall: get the pushed notifications and used them
+ to fetch messages to display on the wall.
+
+ :param fetch_ancestors: performs an ascended search; will add
+ to fetched msgs all their parents until
+ ancestor_ids
+ :param ancestor_ids: used when fetching ancestors
:param domain: domain to add to the search; especially child_of
is interesting when dealing with threaded display
:param ascent: performs an ascended search; will add to fetched msgs
all their parents until root_ids
:param root_ids: for ascent search
- :return list of mail.messages sorted by date
+ :return: list of mail.messages sorted by date
"""
- if context is None: context = {}
notification_obj = self.pool.get('mail.notification')
msg_obj = self.pool.get('mail.message')
# update message search
@@ -496,7 +556,7 @@ class mail_thread(osv.Model):
msg_ids = [notification.message_id.id for notification in notifications]
# get messages
msg_ids = msg_obj.search(cr, uid, [('id', 'in', msg_ids)], context=context)
- if (ascent): msg_ids = self._message_add_ancestor_ids(cr, uid, ids, msg_ids, root_ids, context=context)
+ if (fetch_ancestors): msg_ids = self._message_search_ancestor_ids(cr, uid, ids, msg_ids, ancestor_ids, context=context)
msgs = msg_obj.read(cr, uid, msg_ids, context=context)
return msgs
@@ -524,9 +584,9 @@ class mail_thread(osv.Model):
record needs to be created. Ignored
if the thread record already exists.
:param bool save_original: whether to keep a copy of the original
- email source attached to the message after it is imported.
+ email source attached to the message after it is imported.
:param bool strip_attachments: whether to strip all attachments
- before processing the message, in order to save some space.
+ before processing the message, in order to save some space.
"""
# extract message bytes - we are forced to pass the message as binary because
# we don't know its encoding until we parse its headers and hence can't
@@ -540,7 +600,6 @@ class mail_thread(osv.Model):
context.update({'thread_model': model})
mail_message = self.pool.get('mail.message')
- res_id = False
# Parse Message
# Warning: message_from_string doesn't always work correctly on unicode,
@@ -548,8 +607,11 @@ class mail_thread(osv.Model):
if isinstance(message, unicode):
message = message.encode('utf-8')
msg_txt = email.message_from_string(message)
- msg = mail_message.parse_message(msg_txt, save_original=save_original)
+ msg = mail_message.parse_message(msg_txt, save_original=save_original, context=context)
+ # update state
+ msg['state'] = 'received'
+
if strip_attachments and 'attachments' in msg:
del msg['attachments']
@@ -587,6 +649,8 @@ class mail_thread(osv.Model):
res_id = create_record(msg)
# To forward the email to other followers
self.message_forward(cr, uid, model, [res_id], msg_txt, context=context)
+ # Set as Unread
+ model_pool.message_mark_as_unread(cr, uid, [res_id], context=context)
return res_id
def message_new(self, cr, uid, msg_dict, custom_values=None, context=None):
@@ -652,9 +716,9 @@ class mail_thread(osv.Model):
return self.message_append_dict(cr, uid, ids, msg_dict, context=context)
def message_thread_followers(self, cr, uid, ids, context=None):
- """Returns a list of email addresses of the people following
- this thread, including the sender of each mail, and the
- people who were in CC of the messages, if any.
+ """ Returns a list of email addresses of the people following
+ this thread, including the sender of each mail, and the
+ people who were in CC of the messages, if any.
"""
res = {}
if isinstance(ids, (str, int, long)):
@@ -748,45 +812,27 @@ class mail_thread(osv.Model):
# Note specific
#------------------------------------------------------
- def message_broadcast(self, cr, uid, ids, subject=None, body=None, parent_id=False, type='notification', subtype='html', context=None):
- if context is None:
- context = {}
- notification_obj = self.pool.get('mail.notification')
- # write message
- msg_ids = self.message_append_note(cr, uid, ids, subject=subject, body=body, parent_id=parent_id, type=type, subtype=subtype, context=context)
- # escape if in install mode or note writing was not successfull
- if 'install_mode' in context:
- return True
- if not isinstance(msg_ids, (list)):
- return True
- # get already existing notigications
- notification_ids = notification_obj.search(cr, uid, [('message_id', 'in', msg_ids)], context=context)
- already_pushed_user_ids = map(itemgetter('user_id'), notification_obj.read(cr, uid, notification_ids, context=context))
- # get base.group_user group
- res = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'group_user') or False
- group_id = res and res[1] or False
- if not group_id: return True
- group = self.pool.get('res.groups').browse(cr, uid, [group_id], context=context)[0]
- for user in group.users:
- if user.id in already_pushed_user_ids: continue
- for msg_id in msg_ids:
- notification_obj.create(cr, uid, {'user_id': user.id, 'message_id': msg_id}, context=context)
- return True
-
def log(self, cr, uid, id, message, secondary=False, context=None):
- _logger.warning("log() is deprecated. Please use OpenChatter notification system instead of the res.log mechanism.")
+ _logger.warning("log() is deprecated. As this module inherit from \
+ mail.thread, the message will be managed by this \
+ module instead of by the res.log mechanism. Please \
+ use the mail.thread OpenChatter API instead of the \
+ now deprecated res.log.")
self.message_append_note(cr, uid, [id], 'res.log', message, context=context)
- def message_append_note(self, cr, uid, ids, subject=None, body=None, parent_id=False, type='notification', subtype='html', context=None):
- if type in ['notification', 'reply']:
+ def message_append_note(self, cr, uid, ids, subject=None, body=None, parent_id=False,
+ type='notification', content_subtype='html', context=None):
+ if type in ['notification', 'comment']:
subject = None
- if subtype == 'html':
+ if content_subtype == 'html':
body_html = body
body_text = body
else:
body_html = body
body_text = body
- return self.message_append(cr, uid, ids, subject, body_html=body_html, body_text=body_text, parent_id=parent_id, type=type, subtype=subtype, context=context)
+ return self.message_append(cr, uid, ids, subject, body_html, body_text,
+ type, parent_id=parent_id,
+ content_subtype=content_subtype, context=context)
#------------------------------------------------------
# Subscription mechanism
@@ -796,9 +842,9 @@ class mail_thread(osv.Model):
""" Returns the current document followers. Basically this method
checks in mail.subscription for entries with matching res_model,
res_id.
-
- :param get_ids: if set to True, return the ids of users; if set
- to False, returns the result of a read in res.users
+ This method can be overriden to add implicit subscribers, such
+ as project managers, by adding their user_id to the list of
+ ids returned by this method.
"""
subscr_obj = self.pool.get('mail.subscription')
subscr_ids = subscr_obj.search(cr, uid, ['&', ('res_model', '=', self._name), ('res_id', 'in', ids)], context=context)
@@ -849,19 +895,97 @@ class mail_thread(osv.Model):
# Trying to unsubscribe somebody not in subscribers: returns False
# if special management is needed; allows to know that an automatically
# subscribed user tries to unsubscribe and allows to warn him
- mail_thread_model = self.pool.get('mail.thread')
- if not user_ids and not uid in mail_thread_model.message_get_subscribers(cr, uid, ids, context=context):
- return False
- subscription_obj = self.pool.get('mail.subscription')
to_unsubscribe_uids = [uid] if user_ids is None else user_ids
+ subscription_obj = self.pool.get('mail.subscription')
to_delete_sub_ids = subscription_obj.search(cr, uid,
['&', '&', ('res_model', '=', self._name), ('res_id', 'in', ids), ('user_id', 'in', to_unsubscribe_uids)], context=context)
+ if not to_delete_sub_ids:
+ return False
return subscription_obj.unlink(cr, uid, to_delete_sub_ids, context=context)
#------------------------------------------------------
# Notification API
#------------------------------------------------------
+ def message_create_notify_by_email(self, cr, uid, new_msg_values, user_to_notify_ids, context=None):
+ """ When creating a new message and pushing notifications, emails
+ must be send if users have chosen to receive notifications
+ by email via the notification_email_pref field.
+
+ ``notification_email_pref`` can have 3 values :
+ - all: receive all notification by email (for example for shared
+ users)
+ - to_me: messages send directly to me (@login, messages on res.users)
+ - never: never receive notifications
+ Note that an user should never receive notifications for messages
+ he has created.
+
+ :param new_msg_values: dictionary of message values, those that
+ are given to the create method
+ :param user_to_notify_ids: list of user_ids, user that will
+ receive a notification on their Wall
+ """
+ message_obj = self.pool.get('mail.message')
+ res_users_obj = self.pool.get('res.users')
+ body = new_msg_values.get('body_html', '') if new_msg_values.get('content_subtype') == 'html' else new_msg_values.get('body_text', '')
+
+ # remove message writer
+ if user_to_notify_ids.count(new_msg_values.get('user_id')) > 0:
+ user_to_notify_ids.remove(new_msg_values.get('user_id'))
+
+ # get user_ids directly asked
+ user_to_push_from_parse_ids = self.message_parse_users(cr, uid, body, context=context)
+
+ # try to find an email_to
+ email_to = ''
+ for user in res_users_obj.browse(cr, uid, user_to_notify_ids, context=context):
+ if not user.notification_email_pref == 'all' and \
+ not (user.notification_email_pref == 'to_me' and user.id in user_to_push_from_parse_ids):
+ continue
+ if not user.user_email:
+ continue
+ email_to = '%s, %s' % (email_to, user.user_email)
+ email_to = email_to.lstrip(', ')
+
+ # did not find any email address: not necessary to create an email
+ if not email_to:
+ return
+
+ # try to find an email_from
+ current_user = res_users_obj.browse(cr, uid, [uid], context=context)[0]
+ email_from = new_msg_values.get('email_from')
+ if not email_from:
+ email_from = current_user.user_email
+
+ # get email content, create it (with mail_message.create)
+ email_values = self.message_create_notify_get_email_dict(cr, uid, new_msg_values, email_from, email_to, context)
+ email_id = message_obj.create(cr, uid, email_values, context=context)
+ return email_id
+
+ def message_create_notify_get_email_dict(self, cr, uid, new_msg_values, email_from, email_to, context=None):
+ values = dict(new_msg_values)
+
+ body_html = new_msg_values.get('body_html', '')
+ if body_html:
+ body_html += '\n\n----------\nThis email was send automatically by OpenERP, because you have subscribed to a document.'
+ body_text = new_msg_values.get('body_text', '')
+ if body_text:
+ body_text += '\n\n----------\nThis email was send automatically by OpenERP, because you have subscribed to a document.'
+ values.update({
+ 'type': 'email',
+ 'state': 'outgoing',
+ 'email_from': email_from,
+ 'email_to': email_to,
+ 'subject': 'New message',
+ 'content_subtype': new_msg_values.get('content_subtype', 'plain'),
+ 'body_html': body_html,
+ 'body_text': body_text,
+ 'auto_delete': True,
+ 'res_model': '',
+ 'res_id': False,
+ })
+ return values
+
def message_remove_pushed_notifications(self, cr, uid, ids, msg_ids, remove_childs=True, context=None):
notif_obj = self.pool.get('mail.notification')
msg_obj = self.pool.get('mail.message')
diff --git a/addons/mail/mail_thread_view.xml b/addons/mail/mail_thread_view.xml
index a32045efafc..f07e1e467ee 100644
--- a/addons/mail/mail_thread_view.xml
+++ b/addons/mail/mail_thread_view.xml
@@ -2,11 +2,11 @@
-
-
+
+
@@ -22,5 +22,6 @@
+
diff --git a/addons/mail/res_partner.py b/addons/mail/res_partner.py
index 922f3e4b6ed..3dc1f91d857 100644
--- a/addons/mail/res_partner.py
+++ b/addons/mail/res_partner.py
@@ -22,34 +22,18 @@
from osv import osv
from osv import fields
-class res_partner(osv.osv):
+class res_partner_mail(osv.osv):
""" Inherits partner and adds CRM information in the partner form """
_name = "res.partner"
_inherit = ['res.partner', 'mail.thread']
- _columns = {
- 'emails': fields.one2many('mail.message', 'partner_id', 'Emails', readonly=True, domain=[('email_from','!=',False)]),
- }
- def message_load_ids(self, cr, uid, ids, limit=100, offset=0, domain=[], ascent=False, root_ids=[False], context=None):
- """ Override of message_load_ids
- partner discussion page :
- - messages posted on res.partner, partner_id = partner.id
- - messages directly sent to partner
+ def message_search_get_domain(self, cr, uid, ids, context=None):
+ """ Override of message_search_get_domain for partner discussion page.
+ The purpose is to add messages directly sent to the partner.
"""
- msg_obj = self.pool.get('mail.message')
- msg_ids = []
- partner_ids=[]
- for partner in self.browse(cr, uid, ids, context=context):
- msg_ids += msg_obj.search(cr, uid, [ ('res_id', '=', partner.id), ('model', '=' ,self._name)] + domain,
- limit=limit, offset=offset, context=context)
- if self._name=='res.partner':
- partner_ids=msg_obj.search(cr, uid, [ ('partner_id', 'in', ids)] + domain,
- limit=limit, offset=offset, context=context)
- if partner_ids :
- msg_ids+= partner_ids
- if (ascent): msg_ids = self._message_add_ancestor_ids(cr, uid, ids, msg_ids, root_ids, context=context)
- return msg_ids
-
-res_partner()
+ initial_domain = super(res_partner_mail, self).message_search_get_domain(cr, uid, ids, context=context)
+ if self._name == 'res.partner': # to avoid models inheriting from res.partner
+ search_domain = ['|'] + initial_domain + ['|', ('partner_id', 'in', ids), ('partner_ids', 'in', ids)]
+ return search_domain
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mail/res_partner_view.xml b/addons/mail/res_partner_view.xml
index 2d425f18c7b..d1e2d881739 100644
--- a/addons/mail/res_partner_view.xml
+++ b/addons/mail/res_partner_view.xml
@@ -9,8 +9,8 @@
-
-
+
diff --git a/addons/mail/res_users.py b/addons/mail/res_users.py
index f62e29fb44d..89767473754 100644
--- a/addons/mail/res_users.py
+++ b/addons/mail/res_users.py
@@ -24,24 +24,26 @@ from tools.translate import _
class res_users(osv.osv):
""" Update of res.users class
- - add a preference about sending emails about notificatoins
+ - add a preference about sending emails about notifications
- make a new user follow itself
+ - add a welcome message
"""
_name = 'res.users'
_inherit = ['res.users', 'mail.thread']
_columns = {
'notification_email_pref': fields.selection([
- ('all', 'All feeds'),
- ('comments', 'Only comments'),
- ('to_me', 'Only when sent directly to me'),
- ('none', 'Never')
- ], 'Receive Feeds by Email', required=True,
- help="Choose in which case you want to receive an email when you receive new feeds."),
+ ('all', 'All feeds'),
+ ('comments', 'Only comments'),
+ ('to_me', 'Only when sent directly to me'),
+ ('none', 'Never')
+ ], 'Receive Feeds by Email', required=True,
+ help="Choose in which case you want to receive an email when you "\
+ "receive new feeds."),
}
_defaults = {
- 'notification_email_pref': 'none',
+ 'notification_email_pref': 'to_me',
}
def __init__(self, pool, cr):
@@ -60,25 +62,61 @@ class res_users(osv.osv):
user = self.browse(cr, uid, [user_id], context=context)[0]
# make user follow itself
self.message_subscribe(cr, uid, [user_id], [user_id], context=context)
- # create a welcome message to broadcast
+ # create a welcome message
company_name = user.company_id.name if user.company_id else 'the company'
- message = _('%s has joined %s! You may leave him/her a message to celebrate a new arrival in the company ! You can help him/her doing its first steps on OpenERP.') % (user.name, company_name)
- # TODO: clean the broadcast feature. As this is not cleany specified, temporarily remove the message broadcasting that is not buggy but not very nice.
- #self.message_broadcast(cr, uid, [user.id], 'Welcome notification', message, context=context)
+ message = _('%s has joined %s! Welcome in OpenERP !') % (user.name, company_name)
+ self.message_append_note(cr, uid, [user_id], subject='Welcom to OpenERP', body=message, type='comment', context=context)
return user_id
- def message_load_ids(self, cr, uid, ids, limit=100, offset=0, domain=[], ascent=False, root_ids=[False], context=None):
- """ Override of message_load_ids
- User discussion page :
- - messages posted on res.users, res_id = user.id
- - messages directly sent to user with @user_login
+ def message_search_get_domain(self, cr, uid, ids, context=None):
+ """ Override of message_search_get_domain for partner discussion page.
+ The purpose is to add messages directly sent to user using
+ @user_login.
"""
- if context is None:
- context = {}
- msg_obj = self.pool.get('mail.message')
- msg_ids = []
+ initial_domain = super(res_users, self).message_search_get_domain(cr, uid, ids, context=context)
+ custom_domain = []
for user in self.browse(cr, uid, ids, context=context):
- msg_ids += msg_obj.search(cr, uid, ['|', '|', ('body_text', 'like', '@%s' % (user.login)), ('body_html', 'like', '@%s' % (user.login)), '&', ('res_id', '=', user.id), ('model', '=', self._name)] + domain,
- limit=limit, offset=offset, context=context)
- if (ascent): msg_ids = self._message_add_ancestor_ids(cr, uid, ids, msg_ids, root_ids, context=context)
- return msg_ids
+ if custom_domain:
+ custom_domain += ['|']
+ custom_domain += ['|', ('body_text', 'like', '@%s' % (user.login)), ('body_html', 'like', '@%s' % (user.login))]
+ return ['|'] + initial_domain + custom_domain
+
+class res_users_mail_group(osv.osv):
+ """ Update of res.groups class
+ - if adding/removing users from a group, check mail.groups linked to
+ this user group, and subscribe / unsubscribe them from the discussion
+ group. This is done by overriding the write method.
+ """
+ _name = 'res.users'
+ _inherit = ['res.users', 'mail.thread']
+
+ def write(self, cr, uid, ids, vals, context=None):
+ write_res = super(res_users_mail_group, self).write(cr, uid, ids, vals, context=context)
+ if vals.get('groups_id'):
+ # form: {'group_ids': [(3, 10), (3, 3), (4, 10), (4, 3)]} or {'group_ids': [(6, 0, [ids]}
+ user_group_ids = [command[1] for command in vals['groups_id'] if command[0] == 4]
+ user_group_ids += [id for command in vals['groups_id'] if command[0] == 6 for id in command[2]]
+ mail_group_obj = self.pool.get('mail.group')
+ mail_group_ids = mail_group_obj.search(cr, uid, [('group_ids', 'in', user_group_ids)], context=context)
+ mail_group_obj.message_subscribe(cr, uid, mail_group_ids, ids, context=context)
+ return write_res
+
+
+class res_groups_mail_group(osv.osv):
+ """ Update of res.groups class
+ - if adding/removing users from a group, check mail.groups linked to
+ this user group, and subscribe / unsubscribe them from the discussion
+ group. This is done by overriding the write method.
+ """
+ _name = 'res.groups'
+ _inherit = 'res.groups'
+
+ def write(self, cr, uid, ids, vals, context=None):
+ if vals.get('users'):
+ # form: {'group_ids': [(3, 10), (3, 3), (4, 10), (4, 3)]} or {'group_ids': [(6, 0, [ids]}
+ user_ids = [command[1] for command in vals['users'] if command[0] == 4]
+ user_ids += [id for command in vals['users'] if command[0] == 6 for id in command[2]]
+ mail_group_obj = self.pool.get('mail.group')
+ mail_group_ids = mail_group_obj.search(cr, uid, [('group_ids', 'in', ids)], context=context)
+ mail_group_obj.message_subscribe(cr, uid, mail_group_ids, user_ids, context=context)
+ return super(res_groups_mail_group, self).write(cr, uid, ids, vals, context=context)
diff --git a/addons/mail/res_users_view.xml b/addons/mail/res_users_view.xml
index 918f77e0ace..e268997ac2c 100644
--- a/addons/mail/res_users_view.xml
+++ b/addons/mail/res_users_view.xml
@@ -9,7 +9,7 @@
-
+
@@ -23,11 +23,11 @@
-
+
-
+
diff --git a/addons/mail/security/ir.model.access.csv b/addons/mail/security/ir.model.access.csv
index 011e8b27dc5..1fb909f4435 100644
--- a/addons/mail/security/ir.model.access.csv
+++ b/addons/mail/security/ir.model.access.csv
@@ -1,7 +1,7 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_mail_message,mail.message,model_mail_message,,1,0,1,0
-access_mail_message_all,mail.message.all,model_mail_message,base.group_user,1,1,1,1
+access_mail_message_all,mail.message.all,model_mail_message,,1,0,0,0
+access_mail_message_group_user,mail.message.group.user,model_mail_message,base.group_user,1,1,1,1
access_mail_thread,mail.thread,model_mail_thread,base.group_user,1,1,1,0
-access_mail_subscription,mail.subscription,model_mail_subscription,,1,1,1,1
-access_mail_notification,mail.notification,model_mail_notification,,1,1,1,1
+access_mail_subscription_all,mail.subscription.all,model_mail_subscription,,1,1,1,1
+access_mail_notification_all,mail.notification.all,model_mail_notification,,1,1,1,1
access_mail_group,mail.group,model_mail_group,base.group_user,1,1,1,1
diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css
index 0cf932f9a25..03f1078e6d5 100644
--- a/addons/mail/static/src/css/mail.css
+++ b/addons/mail/static/src/css/mail.css
@@ -1,7 +1,6 @@
-
-/* ------------------------------ */
-/* Wall */
-/* ------------------------------ */
+/* ------------------------------------------------------------ */
+/* Wall
+/* ------------------------------------------------------------ */
.openerp div.oe_mail_wall {
overflow: auto;
@@ -9,6 +8,17 @@
background: white;
}
+.openerp div.oe_mail_wall_main {
+ float: left;
+ width: 560px;
+ margin: 8px;
+}
+
+.openerp div.oe_mail_wall_aside {
+ margin-left: 565px;
+ margin: 8px;
+}
+
.openerp div.oe_mail_wall_action {
padding: 8px;
background: #eee;
@@ -21,36 +31,32 @@
clear: both;
}
-.openerp .oe_mail_wall_action textarea {
+.openerp div.oe_mail_wall_action .oe_mail_msg_content {
+ width: 484px;
+}
+
+.openerp div.oe_mail_wall_action textarea.oe_mail_compose_textarea,
+.openerp div.oe_mail_wall_action div.oe_mail_compose_message_body_text textarea {
width: 474px;
height: 60px;
padding: 4px;
- margin-bottom: 8px;
- float: right;
+ margin-bottom: 2px;
}
-/* 2 columns view */
-.openerp div.oe_mail_wall_main {
- float: left;
- width: 560px;
- margin: 8px;
-}
-
-.openerp div.oe_mail_wall_aside {
- margin-left: 565px;
- margin: 8px;
-}
-
-/* Threads */
-.openerp .oe_mail_wall_threads {
+.openerp ul.oe_mail_wall_threads {
margin-top: 8px;
}
-.openerp .oe_mail_wall_threads textarea {
- height: 40px;
+
+/* Specific display of threads in the wall */
+/* ------------------------------------------------------------ */
+
+.openerp ul.oe_mail_wall_threads .oe_mail_msg_content textarea {
+ width: 434px;
+ height: 30px;
padding: 4px;
}
-.openerp .oe_mail_wall_thread:first .oe_mail_msg_notification {
+.openerp li.oe_mail_wall_thread:first .oe_mail_msg_notification {
border-top: 0;
}
@@ -64,7 +70,7 @@
width: 486px;
}
-.openerp div.oe_mail_msg_content li{
+.openerp div.oe_mail_msg_content li {
float: left;
margin-right: 3px;
}
@@ -79,40 +85,28 @@
}
-/* ------------------------------ */
-/* RecordThread */
-/* ------------------------------ */
+/* ------------------------------------------------------------ */
+/* RecordThread
+/* ------------------------------------------------------------ */
.openerp div.oe_mail_recthread {
overflow: auto;
}
-/* Left-side CSS */
-.openerp div.oe_mail_recthread_actions {
- margin-bottom: 8px;
-}
-
-.openerp div.oe_mail_recthread_followers {
- margin-bottom: 8px;
-}
-
-.openerp div.oe_mail_recthread_followers img.oe_mail_msg_image {
- width: 28px;
- height: 28px;
- margin: 4px;
-}
-
-/* RecordThread: 2 columns view */
-.openerp div.oe_mail_recthread_left {
+.openerp div.oe_mail_recthread_main {
float: left;
width: 560px;
}
-.openerp div.oe_mail_recthread_right {
+.openerp div.oe_mail_recthread_aside {
float: right;
width: 250px;
}
+.openerp div.oe_mail_recthread_actions {
+ margin-bottom: 8px;
+}
+
.openerp div.oe_mail_recthread_actions button {
width: 120px;
}
@@ -144,16 +138,17 @@
background-image: linear-gradient(to bottom, #dc5f59, #b33630);
}
-.openerp textarea.oe_mail_action_textarea {
- height: 60px;
- padding: 5px;
+.openerp div.oe_mail_recthread_followers {
+ margin-bottom: 8px;
}
-/* ------------------------------ */
-/* ThreadDisplay */
-/* ------------------------------ */
+
+/* ------------------------------------------------------------ */
+/* Thread
+/* ------------------------------------------------------------ */
.openerp div.oe_mail_thread_action {
+ display: none;
white-space: normal;
padding: 8px;
background: #eee;
@@ -166,6 +161,26 @@
clear: both;
}
+/* default textarea (oe_mail_compose_textarea), and body_text textarea for compose form view */
+.openerp .oe_mail_msg_content textarea.oe_mail_compose_textarea,
+.openerp .oe_mail_msg_content div.oe_mail_compose_message_body_text textarea {
+ width: 474px;
+ height: 60px;
+ padding: 4px;
+ font-size: 12px;
+ border: 1px solid #cccccc;
+}
+
+/* default textarea (oe_mail_compose_textarea), and body_text textarea for compose form view */
+.openerp .oe_mail_msg_content textarea.oe_mail_compose_textarea:focus,
+.openerp .oe_mail_msg_content div.oe_mail_compose_message_body_text textarea:focus {
+ outline: 0;
+ border-color: rgba(82, 168, 236, 0.8);
+ -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+ -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+ -box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+}
+
.openerp div.oe_mail_thread_display {
white-space: normal;
}
@@ -174,7 +189,7 @@
margin-left: 66px;
}
-.openerp div.oe_mail_thread_subthread .oe_mail_thread_msg:last-child {
+.openerp div.oe_mail_thread_subthread li.oe_mail_thread_msg:last-child {
margin-bottom: 8px;
}
@@ -183,18 +198,23 @@
border-bottom: 1px solid #D2D9E7;
}
-.openerp .oe_mail_thread_msg:after {
+.openerp li.oe_mail_thread_msg:after {
content: "";
display: block;
clear: both;
}
-.openerp .oe_mail_thread_msg > div:after {
+.openerp li.oe_mail_thread_msg > div:after {
content: "";
display: block;
clear: both;
}
+.openerp div.oe_mail_msg {
+ padding: 0;
+ margin: 0 0 4px 0;
+}
+
.openerp .oe_mail_msg_notification,
.openerp .oe_mail_msg_comment,
.openerp .oe_mail_msg_email {
@@ -203,11 +223,6 @@
border-top: 1px solid #ccc;
}
-.openerp .oe_email_icon {
- width: 50px;
- height: 50px;
-}
-
.openerp div.oe_mail_thread_subthread .oe_mail_msg_comment {
background: #eee;
}
@@ -230,9 +245,18 @@
clear: both;
}
-.openerp img.oe_mail_msg_image {
+.openerp img.oe_mail_icon {
width: 50px;
height: 50px;
+}
+
+.openerp img.oe_mail_thumbnail {
+ width: 28px;
+ height: 28px;
+ margin: 4px;
+}
+
+.openerp img.oe_mail_frame {
text-align: center;
overflow: hidden;
-moz-border-radius: 3px;
@@ -247,48 +271,60 @@
clip: rect(5px, 40px, 45px, 0px);
}
-/* ------------------------------ */
-/* Styling (should be openerp) */
-/* ------------------------------ */
+.openerp .oe_mail_invisible {
+ display: none;
+}
-.openerp input.oe_mail, textarea.oe_mail {
- width: 432px;
- padding: 4px;
- font-size: 12px;
+/* ------------------------------------------------------------ */
+/* mail.compose.message form view & OpenERP hacks
+/* ------------------------------------------------------------ */
+
+/* form_view: delete white background */
+.openerp .oe_mail_msg_content div.oe_formview {
+ background-color: transparent;
+}
+
+.openerp .oe_mail_msg_content div.oe_form_nosheet {
+ margin: 0px;
+}
+
+.openerp .oe_mail_msg_content table.oe_form_group {
+ margin: 0px;
+}
+
+.openerp .oe_mail_msg_content table.oe_form_field,
+.openerp .oe_mail_msg_content div.oe_form_field {
+ padding: 0px;
+}
+
+.openerp .oe_mail_msg_content td.oe_form_group_cell {
+ vertical-align: bottom;
+}
+
+/* subject: change width */
+.openerp .oe_mail_msg_content .oe_form .oe_form_field input {
+ width: 472px;
+}
+
+/* body_html: cleditor */
+.openerp .oe_mail_msg_content div.cleditorMain {
border: 1px solid #cccccc;
- -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
- -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
- -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
- -o-transition: border linear 0.2s, box-shadow linear 0.2s;
- transition: border linear 0.2s, box-shadow linear 0.2s;
- -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
- -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
- -box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
}
-.openerp input.oe_mail:focus, textarea.oe_mail:focus {
- outline: 0;
- border-color: rgba(82, 168, 236, 0.8);
- -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
- -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
- -box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
+/* destination_partner_ids */
+.openerp .oe_mail_msg_content div.text-core {
+ height: 22px !important;
+ width: 472px;
}
-.openerp div.oe_mail_msg {
- padding: 0;
- margin: 0 0 4px 0;
+/* buttons */
+.openerp .oe_mail_msg_content .oe_mail_compose_message_icons button.oe_form_button {
+ padding: 1px;
}
-.openerp .oe_mail_oe_bold {
- font-weight: bold;
-}
-
-/* ------------------------------ */
-/* Messages layout */
-/* ------------------------------ */
+/* ------------------------------------------------------------ */
+/* Messages layout
+/* ------------------------------------------------------------ */
.openerp .oe_mail_msg .oe_mail_msg_title {
margin: 0;
@@ -318,6 +354,10 @@
display: inline;
}
+.openerp .oe_mail_oe_bold {
+ font-weight: bold;
+}
+
/* Read more/less link */
.openerp .oe_mail_msg_content .expand,
.openerp .oe_mail_msg_content .reduce {
@@ -360,35 +400,3 @@
padding: 0;
list-style-type: square;
}
-
-
-/* ------------------------------ */
-/* Group Form */
-/* ------------------------------ */
-
-div.oe_mail_group_advanced_details {
- display: none;
-}
-
-.oe_form_sheetbg.openerp_mail_group_sheet {
- min-height: 0px;
- max-height: none;
-}
-
-.oe_form_sheetbg.openerp_mail_group_sheet .oe_form_sheet {
- min-height: 0px;
- max-height: none;
- padding: 0px 18px;
- max-width: 80%;
-}
-
-/* Resize group logo */
-.oe_form_sheetbg.openerp_mail_group_sheet .oe_form_field_image > img {
- max-width: 100px;
- max-height: 100px;
-}
-
-/* Resize group description */
-.oe_form_sheetbg.openerp_mail_group_sheet .oe_form_field_text > textarea {
- height: 40px;
-}
diff --git a/addons/mail/static/src/css/mail_compose_message.css b/addons/mail/static/src/css/mail_compose_message.css
new file mode 100644
index 00000000000..4cd1339ded4
--- /dev/null
+++ b/addons/mail/static/src/css/mail_compose_message.css
@@ -0,0 +1,16 @@
+/* ------------------------------ */
+/* Compose Message Wizard Form */
+/* ------------------------------ */
+
+.openerp tr td .oe_form_field.oe_mail_compose_message_invisible {
+ display: none;
+}
+
+.openerp .oe_mail_compose_message_icons {
+ text-align: right;
+}
+
+.openerp .oe_mail_compose_message_icons img {
+ width: 20px;
+ height: 20px;
+}
diff --git a/addons/mail/static/src/img/_fp.png b/addons/mail/static/src/img/_fp.png
deleted file mode 100644
index 17dce2a047c..00000000000
Binary files a/addons/mail/static/src/img/_fp.png and /dev/null differ
diff --git a/addons/mail/static/src/img/attachment.png b/addons/mail/static/src/img/attachment.png
new file mode 100644
index 00000000000..5cc0c33257d
Binary files /dev/null and b/addons/mail/static/src/img/attachment.png differ
diff --git a/addons/mail/static/src/img/checklist.png b/addons/mail/static/src/img/checklist.png
new file mode 100644
index 00000000000..d252606ff53
Binary files /dev/null and b/addons/mail/static/src/img/checklist.png differ
diff --git a/addons/mail/static/src/img/feeds-hover.png b/addons/mail/static/src/img/feeds-hover.png
deleted file mode 100644
index 67070d3e7df..00000000000
Binary files a/addons/mail/static/src/img/feeds-hover.png and /dev/null differ
diff --git a/addons/mail/static/src/img/feeds.png b/addons/mail/static/src/img/feeds.png
deleted file mode 100644
index ac2293c0bf5..00000000000
Binary files a/addons/mail/static/src/img/feeds.png and /dev/null differ
diff --git a/addons/mail/static/src/img/formatting.png b/addons/mail/static/src/img/formatting.png
new file mode 100644
index 00000000000..cf45fdf192f
Binary files /dev/null and b/addons/mail/static/src/img/formatting.png differ
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index 2140bbe474a..8ce050fd144 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -5,210 +5,652 @@ openerp.mail = function(session) {
var mail = session.mail = {};
/**
- * Add records to sorted_comments array
- * @param {Array} records records from mail.message sorted by date desc
- * @returns {Object} cs comments_structure: dict
- * cs.model_to_root_ids = {model: [root_ids], }
- * cs.new_root_ids = [new_root_ids]
- * cs.root_ids = [root_ids]
- * cs.msgs = {record.id: record,}
- * cs.tree_struct = {record.id: {
- * 'level': record_level in hierarchy, 0 is root,
- * 'msg_nbr': number of childs,
- * 'direct_childs': [msg_ids],
- * 'all_childs': [msg_ids],
- * 'for_thread_msgs': [records],
- * 'ancestors': [msg_ids], } }
+ * ------------------------------------------------------------
+ * FormView
+ * ------------------------------------------------------------
+ *
+ * Override of formview do_action method, to catch all return action about
+ * mail.compose.message. The purpose is to bind 'Send by e-mail' buttons
+ * and redirect them to the Chatter.
*/
- function tools_sort_comments(cs, records, parent_id) {
- var cur_iter = 0; var max_iter = 10; var modif = true;
- while ( modif && (cur_iter++) < max_iter) {
- modif = false;
- _(records).each(function (record) {
- // root and not yet recorded
- if ( (record.parent_id == false || record.parent_id[0] == parent_id) && ! cs['msgs'][record.id]) {
- // add to model -> root_list ids
- if (! cs['model_to_root_ids'][record.model]) cs['model_to_root_ids'][record.model] = [record.id];
- else cs['model_to_root_ids'][record.model].push(record.id);
- // add root data
- cs['new_root_ids'].push(record.id);
- // add record
- cs['tree_struct'][record.id] = {'level': 0, 'direct_childs': [], 'all_childs': [], 'for_thread_msgs': [record], 'msg_nbr': -1, 'ancestors': []};
- cs['msgs'][record.id] = record;
- modif = true;
- }
- // not yet recorded, but parent is recorded
- else if (! cs['msgs'][record.id] && cs['msgs'][record.parent_id[0]]) {
- var parent_level = cs['tree_struct'][record.parent_id[0]]['level'];
- // update parent structure
- cs['tree_struct'][record.parent_id[0]]['direct_childs'].push(record.id);
- cs['tree_struct'][record.parent_id[0]]['for_thread_msgs'].push(record);
- // update ancestors structure
- for (ancestor_id in cs['tree_struct'][record.parent_id[0]]['ancestors']) {
- cs['tree_struct'][ancestor_id]['all_childs'].push(record.id);
+
+ session.web.FormView = session.web.FormView.extend({
+ do_action: function(action, on_close) {
+ if (action.res_model == 'mail.compose.message' && this.fields && this.fields.message_ids) {
+ var record_thread = this.fields.message_ids;
+ var thread = record_thread.thread;
+ thread.instantiate_composition_form('comment', true, false, 0, action.context);
+ return false;
+ }
+ else {
+ return this._super(action, on_close);
+ }
+ },
+ });
+
+
+ /**
+ * ------------------------------------------------------------
+ * ChatterUtils
+ * ------------------------------------------------------------
+ *
+ * This class holds a few tools method that will be used by
+ * the various Chatter widgets.
+ */
+
+ mail.ChatterUtils = {
+
+ /**
+ * mail_int_mapping: structure to keep a trace of internal links mapping
+ * mail_int_mapping['model'] = {
+ * 'name_get': [[id,label], [id,label], ...]
+ * 'fetch_ids': [id, id, ...] } */
+ //var mail_int_mapping = {};
+
+ /**
+ * mail_msg_struct: structure to orrganize chatter messages
+ */
+ //var mail_msg_struct = {}; // TODO: USE IT OR NOT :)
+
+ /* generic chatter events binding */
+ bind_events: function(widget) {
+ // event: click on an internal link to a document: model, login
+ widget.$element.delegate('a.oe_mail_internal_link', 'click', function (event) {
+ event.preventDefault();
+ // lazy implementation: fetch data and try to redirect
+ if (! event.srcElement.dataset.resModel) return false;
+ else var res_model = event.srcElement.dataset.resModel;
+ var res_login = event.srcElement.dataset.resLogin;
+ if (! res_login) return false;
+ var ds = new session.web.DataSet(widget, res_model);
+ var defer = ds.call('search', [[['login', '=', res_login]]]).pipe(function (records) {
+ if (records[0]) {
+ widget.do_action({ type: 'ir.actions.act_window', res_model: res_model, res_id: parseInt(records[0]), views: [[false, 'form']]});
}
- // add record
- cs['tree_struct'][record.id] = {'level': parent_level+1, 'direct_childs': [], 'all_childs': [], 'for_thread_msgs': [], 'msg_nbr': -1, 'ancestors': []};
- cs['msgs'][record.id] = record;
- modif = true;
- }
+ else return false;
+ });
});
- }
- return cs;
- }
+ },
+
+ /** get an image in /web/binary/image?... */
+ get_image: function(session_prefix, session_id, model, field, id) {
+ return session_prefix + '/web/binary/image?session_id=' + session_id + '&model=' + model + '&field=' + field + '&id=' + (id || '');
+ },
+
+ /** checks if tue current user is the message author */
+ is_author: function (widget, message_user_id) {
+ return (widget.session && widget.session.uid != 0 && widget.session.uid == message_user_id);
+ },
+
+ /**
+ * Add records to comments_structure array
+ * @param {Array} records records from mail.message sorted by date desc
+ * @returns {Object} cs comments_structure: dict
+ * cs.model_to_root_ids = {model: [root_ids], }
+ * cs.new_root_ids = [new_root_ids]
+ * cs.root_ids = [root_ids]
+ * cs.msgs = {record.id: record,}
+ * cs.tree_struct = {record.id: {
+ * 'level': record_level in hierarchy, 0 is root,
+ * 'msg_nbr': number of childs,
+ * 'direct_childs': [msg_ids],
+ * 'all_childs': [msg_ids],
+ * 'for_thread_msgs': [records],
+ * 'ancestors': [msg_ids], } }
+ */
+ records_struct_add_records: function(cs, records, parent_id) {
+ var cur_iter = 0; var max_iter = 10; var modif = true;
+ while ( modif && (cur_iter++) < max_iter) {
+ modif = false;
+ _(records).each(function (record) {
+ // root and not yet recorded
+ if ( (record.parent_id == false || record.parent_id[0] == parent_id) && ! cs['msgs'][record.id]) {
+ // add to model -> root_list ids
+ if (! cs['model_to_root_ids'][record.model]) cs['model_to_root_ids'][record.model] = [record.id];
+ else cs['model_to_root_ids'][record.model].push(record.id);
+ // add root data
+ cs['new_root_ids'].push(record.id);
+ // add record
+ cs['tree_struct'][record.id] = {'level': 0, 'direct_childs': [], 'all_childs': [], 'for_thread_msgs': [record], 'msg_nbr': -1, 'ancestors': []};
+ cs['msgs'][record.id] = record;
+ modif = true;
+ }
+ // not yet recorded, but parent is recorded
+ else if (! cs['msgs'][record.id] && cs['msgs'][record.parent_id[0]]) {
+ var parent_level = cs['tree_struct'][record.parent_id[0]]['level'];
+ // update parent structure
+ cs['tree_struct'][record.parent_id[0]]['direct_childs'].push(record.id);
+ cs['tree_struct'][record.parent_id[0]]['for_thread_msgs'].push(record);
+ // update ancestors structure
+ for (ancestor_id in cs['tree_struct'][record.parent_id[0]]['ancestors']) {
+ cs['tree_struct'][ancestor_id]['all_childs'].push(record.id);
+ }
+ // add record
+ cs['tree_struct'][record.id] = {'level': parent_level+1, 'direct_childs': [], 'all_childs': [], 'for_thread_msgs': [], 'msg_nbr': -1, 'ancestors': []};
+ cs['msgs'][record.id] = record;
+ modif = true;
+ }
+ });
+ }
+ return cs;
+ },
+
+ /* copy cs.new_root_ids into cs.root_ids */
+ records_struct_update_after_display: function(cs) {
+ // update TODO
+ cs['root_ids'] = _.union(cs['root_ids'], cs['new_root_ids']);
+ cs['new_root_ids'] = [];
+ return cs;
+ },
+
+ /**
+ * CONTENT MANIPULATION
+ *
+ * Regular expressions
+ * - (^|\s)@((\w|@|\.)*): @login@log.log, supports inner '@' for
+ * logins that are emails
+ * 1. '(void)'
+ * 2. login@log.log
+ * - (^|\s)\[(\w+).(\w+),(\d)\|*((\w|[@ .,])*)\]: [ir.attachment,3|My Label],
+ * for internal links to model ir.attachment, id=3, and with
+ * optional label 'My Label'. Note that having a '|Label' is not
+ * mandatory, because the regex should still be correct.
+ * 1. '(void)'
+ * 2. 'ir'
+ * 3. 'attachment'
+ * 4. '3'
+ * 5. 'My Label'
+ */
+
+ /** Removes html tags, except b, em, br, ul, li */
+ do_text_remove_html_tags: function (string) {
+ var html = $('').text(string.replace(/\s+/g, ' ')).html().replace(new RegExp('<(/)?(b|em|br|br /|ul|li|div)\\s*>', 'gi'), '<$1$2>');
+ return html;
+ },
+
+ /** Replaces line breaks by html line breaks (br) */
+ do_text_nl2br: function (str, is_xhtml) {
+ var break_tag = (is_xhtml || typeof is_xhtml === 'undefined') ? ' ' : ' ';
+ return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1'+ break_tag +'$2');
+ },
+
+ /* Add a prefix before each new line of the original string */
+ do_text_quote: function (str, prefix) {
+ return str.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1'+ break_tag +'$2' + prefix || '> ');
+ },
+
+ /**
+ * Replaces some expressions
+ * - @login - shorcut to link to a res.user, given its login
+ * - [ir.attachment,3|My Label] - shortcut to an internal
+ * document
+ * - :name - shortcut to an image
+ */
+ do_replace_expressions: function (string) {
+ var self = this;
+ var icon_list = ['al', 'pinky']
+ /* shortcut to user: @login */
+ var regex_login = new RegExp(/(^|\s)@((\w|@|\.)*)/g);
+ var regex_res = regex_login.exec(string);
+ while (regex_res != null) {
+ var login = regex_res[2];
+ string = string.replace(regex_res[0], regex_res[1] + '@' + login + '');
+ regex_res = regex_login.exec(string);
+ }
+ /* shortcut for internal document */
+ var regex_login = new RegExp(/(^|\s)\[(\w+).(\w+),(\d)\|*((\w|[@ .,])*)\]/g);
+ var regex_res = regex_login.exec(string);
+ while (regex_res != null) {
+ var res_model = regex_res[2] + '.' + regex_res[3];
+ var res_id = regex_res[4];
+ if (! regex_res[5]) {
+ var label = res_model + ':' + res_id }
+ else {
+ var label = regex_res[5];
+ }
+ string = string.replace(regex_res[0], regex_res[1] + '');
+ regex_res = regex_login.exec(string);
+ }
+ return string;
+ },
+
+ /**
+ * Checks a string to find an expression that will be replaced
+ * by an internal link and requiring a name_get to replace
+ * the expression.
+ * :param mapping: structure to keep a trace of internal links mapping
+ * mapping['model'] = {
+ * name_get': [[id,label], [id,label], ...]
+ * 'to_fetch_ids': [id, id, ...]
+ * }
+ * CURRENTLY NOT IMPLEMENTED */
+ do_check_for_name_get_mapping: function(string, mapping) {
+ /* shortcut to user: @login */
+ //var regex_login = new RegExp(/(^|\s)@((\w|@|\.)*)/g);
+ //var regex_res = regex_login.exec(string);
+ //while (regex_res != null) {
+ //var login = regex_res[2];
+ //if (! ('res.users' in this.map_hash)) { this.map_hash['res.users']['name'] = []; }
+ //this.map_hash['res.users']['login'].push(login);
+ //regex_res = regex_login.exec(string);
+ //}
+ /* document link with name_get: [res.model,name] */
+ /* internal link with id: [res.model,id], or [res.model,id|display_name] */
+ //var regex_intlink = new RegExp(/(^|\s)#(\w*[a-zA-Z_]+\w*)\.(\w+[a-zA-Z_]+\w*),(\w+)/g);
+ //regex_res = regex_intlink.exec(string);
+ //while (regex_res != null) {
+ //var res_model = regex_res[2] + '.' + regex_res[3];
+ //var res_name = regex_res[4];
+ //if (! (res_model in this.map_hash)) { this.map_hash[res_model]['name'] = []; }
+ //this.map_hash[res_model]['name'].push(res_name);
+ //regex_res = regex_intlink.exec(string);
+ //}
+ },
+
+ /**
+ * Updates the mapping; check for to_fetch_ids for each recorded
+ * model, and perform a name_get to update the mapping.
+ * CURRENTLY NOT IMPLEMENTED */
+ do_update_name_get_mapping: function(mapping) {
+ },
+ };
+
+
+ /**
+ * ------------------------------------------------------------
+ * ComposeMessage widget
+ * ------------------------------------------------------------
+ *
+ * This widget handles the display of a form to compose a new message.
+ * This form is an OpenERP form_view, build on a mail.compose.message
+ * wizard.
+ */
+
+ mail.ComposeMessage = session.web.Widget.extend({
+ template: 'mail.compose_message',
+
+ /**
+ * @param {Object} parent parent
+ * @param {Object} [params]
+ * @param {String} [params.res_model] res_model of document [REQUIRED]
+ * @param {Number} [params.res_id] res_id of record [REQUIRED]
+ * @param {Number} [params.email_mode] true/false, tells whether
+ * we are in email sending mode
+ * @param {Number} [params.formatting] true/false, tells whether
+ * we are in advance formatting mode
+ * @param {String} [params.model] mail.compose.message.mode (see
+ * composition wizard)
+ * @param {Number} [params.msg_id] id of a message in case we are in
+ * reply mode
+ */
+ init: function(parent, params) {
+ var self = this;
+ this._super(parent);
+ // options
+ this.params = params || {};
+ this.params.context = params.context || {};
+ this.params.email_mode = params.email_mode || false;
+ this.params.formatting = params.formatting || false;
+ this.params.mode = params.mode || 'comment';
+ this.params.form_xml_id = params.form_xml_id || 'email_compose_message_wizard_form_chatter';
+ this.params.form_view_id = false;
+ if (this.params.mode == 'reply') {
+ this.params.active_id = this.params.msg_id;
+ } else {
+ this.params.active_id = this.params.res_id;
+ }
+ this.email_mode = false;
+ this.formatting = false;
+ },
+
+ /**
+ * Reinitialize the widget field values to the default values. The
+ * purpose is to avoid to destroy and re-build a form view. Default
+ * values are therefore given as for an onchange. */
+ reinit: function() {
+ var self = this;
+ if (! this.form_view) return;
+ var call_defer = this.ds_compose.call('default_get', [['subject', 'body_text', 'body_html', 'dest_partner_ids'], this.ds_compose.get_context()]).then(
+ function (result) {
+ self.form_view.on_processed_onchange({'value': result}, []);
+ });
+ return call_defer;
+ },
+
+ /**
+ * Override-hack of do_action: clean the form */
+ do_action: function(action, on_close) {
+ // this.init_comments();
+ return this._super(action, on_close);
+ },
+
+ /**
+ * Widget start function
+ * - builds and initializes the form view */
+ start: function() {
+ var self = this;
+ this._super.apply(this, arguments);
+ // customize display: add avatar, clean previous content
+ var user_avatar = mail.ChatterUtils.get_image(this.session.prefix,
+ this.session.session_id, 'res.users', 'avatar', this.session.uid);
+ this.$element.find('img.oe_mail_icon').attr('src', user_avatar);
+ this.$element.find('div.oe_mail_msg_content').empty();
+ // create a context for the default_get of the compose form
+ var widget_context = {
+ 'active_model': this.params.res_model,
+ 'active_id': this.params.active_id,
+ 'mail.compose.message.mode': this.params.mode,
+ };
+ var context = _.extend({}, this.params.context, widget_context);
+ this.ds_compose = new session.web.DataSetSearch(this, 'mail.compose.message', context);
+ // find the id of the view to display in the chatter form
+ var data_ds = new session.web.DataSetSearch(this, 'ir.model.data');
+ var deferred_form_id =data_ds.call('get_object_reference', ['mail', this.params.form_xml_id]).then( function (result) {
+ if (result) {
+ self.params.form_view_id = result[1];
+ }
+ }).pipe(this.proxy('create_form_view'));
+ return deferred_form_id;
+ },
+
+ /**
+ * Create a FormView, then append it to the to widget DOM. */
+ create_form_view: function () {
+ var self = this;
+ // destroy previous form_view if any
+ if (this.form_view) { this.form_view.destroy(); }
+ // create the FormView
+ this.form_view = new session.web.FormView(this, this.ds_compose, this.params.form_view_id, {
+ action_buttons: false,
+ pager: false,
+ initial_mode: 'edit',
+ });
+ // add the form, bind events, activate the form
+ var msg_node = this.$element.find('div.oe_mail_msg_content');
+ return $.when(this.form_view.appendTo(msg_node)).pipe(function() {
+ self.bind_events();
+ self.form_view.do_show();
+ if (self.params.email_mode) { self.toggle_email_mode(); }
+ if (self.params.formatting) { self.toggle_formatting_mode(); }
+ });
+ },
+
+ destroy: function() {
+ this._super.apply(this, arguments);
+ },
+
+ /**
+ * Bind events in the widget. Each event is slightly described
+ * in the function. */
+ bind_events: function() {
+ var self = this;
+ this.$element.find('button.oe_form_button').click(function (event) {
+ event.preventDefault();
+ });
+ // event: click on 'Send an Email' link that toggles the form for
+ // sending an email (partner_ids)
+ this.$element.find('a.oe_mail_compose_message_email').click(function (event) {
+ event.preventDefault();
+ self.toggle_email_mode();
+ });
+ // event: click on 'Formatting' icon-link that toggles the advanced
+ // formatting options for writing a message (subject, body_html)
+ this.$element.find('a.oe_mail_compose_message_formatting').click(function (event) {
+ event.preventDefault();
+ self.toggle_formatting_mode();
+ });
+ // event: click on 'Attachment' icon-link that opens the dialog to
+ // add an attachment.
+ this.$element.find('a.oe_mail_compose_message_attachment').click(function (event) {
+ event.preventDefault();
+ // not yet implemented
+ self.set_body_value('attachment', 'attachment');
+ });
+ // event: click on 'Checklist' icon-link that toggles the options
+ // for adding checklist.
+ this.$element.find('a.oe_mail_compose_message_checklist').click(function (event) {
+ event.preventDefault();
+ // not yet implemented
+ self.set_body_value('checklist', 'checklist');
+ });
+ },
+
+ /**
+ * Toggle the formatting mode. */
+ toggle_formatting_mode: function() {
+ var self = this;
+ this.formatting = ! this.formatting;
+ // calls onchange
+ var call_defer = this.ds_compose.call('onchange_formatting', [[], this.formatting, this.params.res_model, this.params.res_id]).then(
+ function (result) {
+ self.form_view.on_processed_onchange(result, []);
+ });
+ // update context of datasetsearch
+ this.ds_compose.context.formatting = this.formatting;
+ // toggle display
+ this.$element.find('span.oe_mail_compose_message_subject').toggleClass('oe_mail_compose_message_invisible');
+ this.$element.find('div.oe_mail_compose_message_body_text').toggleClass('oe_mail_compose_message_invisible');
+ this.$element.find('div.oe_mail_compose_message_body_html').toggleClass('oe_mail_compose_message_invisible');
+ },
+
+ /**
+ * Toggle the email mode. */
+ toggle_email_mode: function() {
+ var self = this;
+ this.email_mode = ! this.email_mode;
+ // calls onchange
+ var call_defer = this.ds_compose.call('onchange_email_mode', [[], this.email_mode, this.params.res_model, this.params.res_id]).then(
+ function (result) {
+ self.form_view.on_processed_onchange(result, []);
+ });
+ // update context of datasetsearch
+ this.ds_compose.context.email_mode = this.email_mode;
+ // update 'Post' button -> 'Send'
+ // update 'Send an Email' link -> 'Post a comment'
+ if (this.email_mode) {
+ this.$element.find('button.oe_mail_compose_message_button_send').html('Send');
+ this.$element.find('a.oe_mail_compose_message_email').html('Comment');
+ } else {
+ this.$element.find('button.oe_mail_compose_message_button_send').html('Post');
+ this.$element.find('a.oe_mail_compose_message_email').html('Send an Email');
+ }
+ // toggle display
+ this.$element.find('div.oe_mail_compose_message_partner_ids').toggleClass('oe_mail_compose_message_invisible');
+ },
+
+ /**
+ * Update the values of the composition form; with possible different
+ * values for body_text and body_html. */
+ set_body_value: function(body_text, body_html) {
+ this.form_view.fields.body_text.set_value(body_text);
+ this.form_view.fields.body_html.set_value(body_html);
+ },
+ }),
/**
- * ThreadDisplay widget: this widget handles the display of a thread of
- * messages. The [thread_level] parameter sets the thread level number:
+ * ------------------------------------------------------------
+ * Thread Widget
+ * ------------------------------------------------------------
+ *
+ * This widget handles the display of a thread of messages. The
+ * [thread_level] parameter sets the thread level number:
* - root message
* - - sub message (parent_id = root message)
* - - - sub sub message (parent id = sub message)
* - - sub message (parent_id = root message)
- * This widget has 2 ways of initialization, either you give records to be rendered,
- * either it will fetch [limit] messages related to [res_model]:[res_id].
+ * This widget has 2 ways of initialization, either you give records
+ * to be rendered, either it will fetch [limit] messages related to
+ * [res_model]:[res_id].
*/
+
mail.Thread = session.web.Widget.extend({
- template: 'mail.Thread',
+ template: 'mail.thread',
/**
* @param {Object} parent parent
* @param {Object} [params]
- * @param {String} [params.res_model] res_model of mail.thread object
- * @param {Number} [params.res_id] res_id of record
- * @param {Number} [params.parent_id=false] parent_id of message
- * @param {Number} [params.uid] user id
- * @param {Number} [params.thread_level=0] number of levels in the thread (only 0 or 1 currently)
- * @param {Number} [params.msg_more_limit=100] number of character to display before having a "show more" link;
- * note that the text will not be truncated if it does not have 110% of
- * the parameter (ex: 110 characters needed to be truncated and be displayed
- * as a 100-characters message)
- * @param {Number} [params.limit=10] maximum number of messages to fetch
+ * @param {String} [params.res_model] res_model of document [REQUIRED]
+ * @param {Number} [params.res_id] res_id of record [REQUIRED]
+ * @param {Number} [params.uid] user id [REQUIRED]
+ * @param {Bool} [params.parent_id=false] parent_id of message
+ * @param {Number} [params.thread_level=0] number of levels in the thread
+ * (only 0 or 1 currently)
+ * @param {Bool} [params.is_wall=false] thread is displayed in the wall
+ * @param {Number} [params.msg_more_limit=150] number of character to
+ * display before having a "show more" link; note that the text
+ * will not be truncated if it does not have 110% of the parameter
+ * (ex: 110 characters needed to be truncated and be displayed as
+ * a 100-characters message)
+ * @param {Number} [params.limit=100] maximum number of messages to fetch
* @param {Number} [params.offset=0] offset for fetching messages
* @param {Number} [params.records=null] records to show instead of fetching messages
*/
init: function(parent, params) {
this._super(parent);
+ // options
this.params = params;
this.params.parent_id = this.params.parent_id || false;
this.params.thread_level = this.params.thread_level || 0;
- this.params.msg_more_limit = this.params.msg_more_limit || 290;
+ this.params.is_wall = this.params.is_wall || (this.params.records != undefined) || false;
+ this.params.msg_more_limit = this.params.msg_more_limit || 150;
this.params.limit = this.params.limit || 100;
+ // this.params.limit = 3; // tmp for testing
this.params.offset = this.params.offset || 0;
this.params.records = this.params.records || null;
// datasets and internal vars
- this.ds = new session.web.DataSet(this, this.params.res_model);
- this.ds_users = new session.web.DataSet(this, 'res.users');
- this.ds_msg = new session.web.DataSet(this, 'mail.message');
- this.sorted_comments = {'root_ids': [], 'root_id_msg_list': {}};
+ this.ds = new session.web.DataSetSearch(this, this.params.res_model);
+ this.ds_users = new session.web.DataSetSearch(this, 'res.users');
+ this.ds_msg = new session.web.DataSetSearch(this, 'mail.message');
this.comments_structure = {'root_ids': [], 'new_root_ids': [], 'msgs': {}, 'tree_struct': {}, 'model_to_root_ids': {}};
// display customization vars
this.display = {};
this.display.show_post_comment = this.params.show_post_comment || false;
- this.display.show_reply = (this.params.thread_level > 0);
- this.display.show_delete = true;
- this.display.show_hide = this.params.show_hide || false;
+ this.display.show_reply = (this.params.thread_level > 0 && this.params.is_wall);
+ this.display.show_delete = ! this.params.is_wall;
+ this.display.show_hide = this.params.is_wall;
+ this.display.show_reply_by_email = ! this.params.is_wall;
this.display.show_more = (this.params.thread_level == 0);
- // not used currently
- this.intlinks_mapping = {};
},
start: function() {
- var self = this;
-
this._super.apply(this, arguments);
- // customize display
- if (! this.display.show_post_comment) {
- this.$element.find('div.oe_mail_thread_action').hide();
- }
// add events
- this.add_events();
-
+ this.bind_events();
// display user, fetch comments
this.display_current_user();
-
- if (this.params.records) {
- var display_done = this.display_comments_from_parameters(this.params.records);
- } else {
- var display_done = this.init_comments();
+ if (this.params.records) var display_done = this.display_comments_from_parameters(this.params.records);
+ else var display_done = this.init_comments();
+ // customize display
+ $.when(display_done).then(this.proxy('do_customize_display'));
+ // add message composition form view
+ if (this.display.show_post_comment) {
+ var compose_done = this.instantiate_composition_form();
}
- return display_done
+ return display_done && compose_done;
},
-
- add_events: function() {
+
+ /**
+ * Override-hack of do_action: automatically reload the chatter.
+ * Normally it should be called only when clicking on 'Post/Send'
+ * in the composition form. */
+ do_action: function(action, on_close) {
+ this.init_comments();
+ if (this.compose_message_widget) {
+ this.compose_message_widget.reinit(); }
+ return this._super(action, on_close);
+ },
+
+ instantiate_composition_form: function(mode, email_mode, formatting, msg_id, context) {
+ if (this.compose_message_widget) {
+ this.compose_message_widget.destroy();
+ }
+ this.compose_message_widget = new mail.ComposeMessage(this, {
+ 'extended_mode': false, 'uid': this.params.uid, 'res_model': this.params.res_model,
+ 'res_id': this.params.res_id, 'mode': mode || 'comment', 'msg_id': msg_id,
+ 'email_mode': email_mode || false, 'formatting': formatting || false,
+ 'context': context || false } );
+ var composition_node = this.$element.find('div.oe_mail_thread_action');
+ composition_node.empty();
+ var compose_done = this.compose_message_widget.appendTo(composition_node);
+ return compose_done;
+ },
+
+ do_customize_display: function() {
+ if (this.display.show_post_comment) { this.$element.find('div.oe_mail_thread_action').eq(0).show(); }
+ },
+
+ /**
+ * Bind events in the widget. Each event is slightly described
+ * in the function. */
+ bind_events: function() {
var self = this;
+ // generic events from Chatter Mixin
+ mail.ChatterUtils.bind_events(this);
// event: click on 'more' at bottom of thread
this.$element.find('button.oe_mail_button_more').click(function () {
self.do_more();
});
- // event: writing in textarea
- this.$element.find('textarea.oe_mail_action_textarea').keyup(function (event) {
+ // event: writing in basic textarea of composition form (quick reply)
+ this.$element.find('textarea.oe_mail_compose_textarea').keyup(function (event) {
var charCode = (event.which) ? event.which : window.event.keyCode;
if (event.shiftKey && charCode == 13) { this.value = this.value+"\n"; }
else if (charCode == 13) { return self.do_comment(); }
});
- // event: click on 'reply' in msg
+ // event: click on 'Reply' in msg
this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_reply', 'click', function (event) {
var act_dom = $(this).parents('div.oe_mail_thread_display').find('div.oe_mail_thread_action:first');
act_dom.toggle();
event.preventDefault();
});
- // event: click on 'delete' in msg
- this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_delete', 'click', function (event) {
- //console.log('deleting');
- if (! confirm(_t("Do you really want to delete this message?"))) { return false; }
- var msg_id = event.srcElement.dataset.id;
- if (! msg_id) return false;
- var call_defer = self.ds_msg.unlink([parseInt(msg_id)]);
- $(event.srcElement).parents('.oe_mail_thread_msg').eq(0).hide();
- if (self.params.thread_level > 0) {
- $(event.srcElement).parents('.oe_mail_thread').eq(0).hide();
- }
- return false;
- });
- // event: click on 'hide' in msg
- this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_hide', 'click', function (event) {
- //console.log('hiding');
- if (! confirm(_t("Do you really want to hide this thread ?"))) { return false; }
- var msg_id = event.srcElement.dataset.id;
- if (! msg_id) return false;
- //console.log(msg_id);
- var call_defer = self.ds.call('message_remove_pushed_notifications', [[self.params.res_id], [parseInt(msg_id)], true]);
- $(event.srcElement).parents('.oe_mail_thread_msg').eq(0).hide();
- if (self.params.thread_level > 0) {
- $(event.srcElement).parents('.oe_mail_thread').eq(0).hide();
- }
- return false;
- });
- // event: click on an internal link
- this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_internal_link', 'click', function (event) {
- // lazy implementation: fetch data and try to redirect
- if (! event.srcElement.dataset.resModel) return false;
- else var res_model = event.srcElement.dataset.resModel;
- var res_login = event.srcElement.dataset.resLogin;
- var res_id = event.srcElement.dataset.resId;
- if ((! res_login) && (! res_id)) return false;
- if (! res_id) {
- var ds = new session.web.DataSet(self, res_model);
- var defer = ds.call('search', [[['login', '=', res_login]]]).then(function (records) {
- if (records[0]) {
- self.do_action({ type: 'ir.actions.act_window', res_model: res_model, res_id: parseInt(records[0]), views: [[false, 'form']]});
- }
- else return false;
- });
- }
- else self.do_action({ type: 'ir.actions.act_window', res_model: res_model, res_id: parseInt(res_id), views: [[false, 'form']]});
- });
// event: click on 'attachment(s)' in msg
this.$element.delegate('a.oe_mail_msg_view_attachments', 'click', function (event) {
var act_dom = $(this).parent().parent().parent().find('.oe_mail_msg_attachments');
act_dom.toggle();
- return false;
+ event.preventDefault();
});
- // see more
- this.$element.on('click','a.oe_mail_msg_more', function (event) {
- $(this).siblings('.oe_mail_msg_tail').show();
- $(this).hide();
- return false;
+ // event: click on 'Delete' in msg side menu
+ this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_delete', 'click', function (event) {
+ if (! confirm(_t("Do you really want to delete this message?"))) { return false; }
+ var msg_id = event.srcElement.dataset.id;
+ if (! msg_id) return false;
+ var call_defer = self.ds_msg.unlink([parseInt(msg_id)]);
+ $(event.srcElement).parents('li.oe_mail_thread_msg').eq(0).hide();
+ if (self.params.thread_level > 0) {
+ $(event.srcElement).parents('.oe_mail_thread').eq(0).hide();
+ }
+ event.preventDefault();
+ return call_defer;
+ });
+ // event: click on 'Hide' in msg side menu
+ this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_hide', 'click', function (event) {
+ if (! confirm(_t("Do you really want to hide this thread ?"))) { return false; }
+ var msg_id = event.srcElement.dataset.id;
+ if (! msg_id) return false;
+ var call_defer = self.ds.call('message_remove_pushed_notifications', [[self.params.res_id], [parseInt(msg_id)], true]);
+ $(event.srcElement).parents('li.oe_mail_thread_msg').eq(0).hide();
+ if (self.params.thread_level > 0) {
+ $(event.srcElement).parents('.oe_mail_thread').eq(0).hide();
+ }
+ event.preventDefault();
+ return call_defer;
+ });
+ // event: click on "Reply" in msg side menu (email style)
+ this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_reply_by_email', 'click', function (event) {
+ var msg_id = event.srcElement.dataset.msg_id;
+ var email_mode = (event.srcElement.dataset.type == 'email');
+ var formatting = (event.srcElement.dataset.formatting == 'html');
+ if (! msg_id) return false;
+ self.instantiate_composition_form('reply', email_mode, formatting, msg_id);
+ event.preventDefault();
});
},
@@ -219,21 +661,22 @@ openerp.mail = function(session) {
init_comments: function() {
var self = this;
this.params.offset = 0;
- this.sorted_comments = {'root_ids': [], 'root_id_msg_list': {}};
this.comments_structure = {'root_ids': [], 'new_root_ids': [], 'msgs': {}, 'tree_struct': {}, 'model_to_root_ids': {}};
this.$element.find('div.oe_mail_thread_display').empty();
- domain = this.get_fetch_domain(this.sorted_comments);
+ var domain = this.get_fetch_domain(this.comments_structure);
return this.fetch_comments(this.params.limit, this.params.offset, domain).then();
},
fetch_comments: function (limit, offset, domain) {
var self = this;
- var defer = this.ds.call('message_load', [[this.params.res_id], ( (limit+1)||(this.params.limit+1) ), (offset||this.params.offset), (domain||[]), (this.params.thread_level > 0), (this.sorted_comments['root_ids'])]);
- $.when(defer).then(function (records) {
+ var defer = this.ds.call('message_read', [[this.params.res_id], (this.params.thread_level > 0), (this.comments_structure['root_ids']),
+ (limit+1) || (this.params.limit+1), offset||this.params.offset, domain||undefined ]).then(function (records) {
if (records.length <= self.params.limit) self.display.show_more = false;
- else { self.display.show_more = true; records.pop(); }
-
+ // else { self.display.show_more = true; records.pop(); }
+ // else { self.display.show_more = true; records.splice(0, 1); }
+ else { self.display.show_more = true; }
self.display_comments(records);
+ // TODO: move to customize display
if (self.display.show_more == true) self.$element.find('div.oe_mail_thread_more:last').show();
else self.$element.find('div.oe_mail_thread_more:last').hide();
});
@@ -245,6 +688,7 @@ openerp.mail = function(session) {
if (records.length > 0 && records.length < (records[0].child_ids.length+1) ) this.display.show_more = true;
else this.display.show_more = false;
var defer = this.display_comments(records);
+ // TODO: move to customize display
if (this.display.show_more == true) $('div.oe_mail_thread_more').eq(-2).show();
else $('div.oe_mail_thread_more').eq(-2).hide();
return defer;
@@ -252,7 +696,8 @@ openerp.mail = function(session) {
display_comments: function (records) {
var self = this;
-
+ // sort the records
+ mail.ChatterUtils.records_struct_add_records(this.comments_structure, records, this.params.parent_id);
//build attachments download urls and compute time-relative from dates
for (var k in records) {
records[k].timerelative = $.timeago(records[k].date);
@@ -263,11 +708,10 @@ openerp.mail = function(session) {
}
}
}
- this.cs = this.sort_comments_tmp(records);
_(records).each(function (record) {
var sub_msgs = [];
if ((record.parent_id == false || record.parent_id[0] == self.params.parent_id) && self.params.thread_level > 0 ) {
- var sub_list = self.cs['tree_struct'][record.id]['direct_childs'];
+ var sub_list = self.comments_structure['tree_struct'][record.id]['direct_childs'];
_(records).each(function (record) {
//if (record.parent_id == false || record.parent_id[0] == self.params.parent_id) return;
if (_.indexOf(sub_list, record.id) != -1) {
@@ -276,35 +720,40 @@ openerp.mail = function(session) {
});
self.display_comment(record);
self.thread = new mail.Thread(self, {'res_model': self.params.res_model, 'res_id': self.params.res_id, 'uid': self.params.uid,
- 'records': sub_msgs, 'thread_level': (self.params.thread_level-1), 'parent_id': record.id});
- self.$element.find('.oe_mail_thread_msg:last').append('');
+ 'records': sub_msgs, 'thread_level': (self.params.thread_level-1), 'parent_id': record.id,
+ 'is_wall': self.params.is_wall});
+ self.$element.find('li.oe_mail_thread_msg:last').append('');
self.thread.appendTo(self.$element.find('div.oe_mail_thread_subthread:last'));
}
else if (self.params.thread_level == 0) {
self.display_comment(record);
}
});
+ mail.ChatterUtils.records_struct_update_after_display(this.comments_structure);
// update offset for "More" buttons
if (this.params.thread_level == 0) this.params.offset += records.length;
},
- /**
- * Display a record
- */
+ /** Displays a record, performs text/link formatting */
display_comment: function (record) {
- record.body = this.do_text_nl2br(record.body, true);
+ record.body = mail.ChatterUtils.do_text_nl2br(record.body, true);
+ // if (record.type == 'email' && record.state == 'received') {
if (record.type == 'email') {
record.mini_url = ('/mail/static/src/img/email_icon.png');
- } else {
- record.mini_url = this.thread_get_avatar('res.users', 'avatar', record.user_id[0]);
+ } else {
+ record.mini_url = mail.ChatterUtils.get_image(this.session.prefix, this.session.session_id, 'res.users', 'avatar', record.user_id[0]);
}
// body text manipulation
- record.body = this.do_clean_text(record.body);
- record.body = this.do_replace_internal_links(record.body);
-
+ if (record.subtype == 'plain') {
+ record.body = mail.ChatterUtils.do_text_remove_html_tags(record.body);
+ }
+ record.body = mail.ChatterUtils.do_replace_expressions(record.body);
// format date according to the user timezone
record.date = session.web.format_value(record.date, {type:"datetime"});
- var rendered = session.web.qweb.render('mail.Thread.message', {'record': record, 'thread': this, 'params': this.params, 'display': this.display});
+ // is the user the author ?
+ record.is_author = mail.ChatterUtils.is_author(this, record.user_id[0]);
+ // render
+ var rendered = session.web.qweb.render('mail.thread.message', {'record': record, 'thread': this, 'params': this.params, 'display': this.display});
$(rendered).appendTo(this.$element.children('div.oe_mail_thread_display:first'));
// expand feature
this.$element.find('div.oe_mail_msg_body:last').expander({
@@ -316,84 +765,33 @@ openerp.mail = function(session) {
lesClass: 'oe_mail_reduce',
});
},
-
- /**
- * Add records to sorted_comments array
- * @param {Array} records records from mail.message sorted by date desc
- * @returns {Object} sc sorted_comments: dict {
- * 'root_id_list': list or root_ids
- * 'root_id_msg_list': {'record_id': [ancestor_ids]}, still sorted by date desc
- * 'id_to_root': {'root_id': [records]}, still sorted by date desc
- * }
- */
- sort_comments: function (records) {
- var self = this;
- sc = {'root_id_list': [], 'root_id_msg_list': {}, 'id_to_root': {}}
- var cur_iter = 0; var max_iter = 10; var modif = true;
- /* step1: get roots */
- while ( modif && (cur_iter++) < max_iter) {
- modif = false;
- _(records).each(function (record) {
- if ( (record.parent_id == false || record.parent_id[0] == self.params.parent_id) && (_.indexOf(sc['root_id_list'], record.id) == -1)) {
- sc['root_id_list'].push(record.id);
- sc['root_id_msg_list'][record.id] = [];
- self.sorted_comments['root_ids'].push(record.id);
- modif = true;
- }
- else {
- if (_.indexOf(sc['root_id_list'], record.parent_id[0]) != -1) {
- sc['id_to_root'][record.id] = record.parent_id[0];
- modif = true;
- }
- else if ( sc['id_to_root'][record.parent_id[0]] ) {
- sc['id_to_root'][record.id] = sc['id_to_root'][record.parent_id[0]];
- modif = true;
- }
- }
- });
- }
- /* step2: add records */
- _(records).each(function (record) {
- var root_id = sc['id_to_root'][record.id];
- if (! root_id) return;
- sc['root_id_msg_list'][root_id].push(record);
- //self.sorted_comments['root_id_msg_list'][root_id].push(record.id);
- });
- return sc;
- },
-
- /**
- * Add records to comments_structure object: see function for details
- */
- sort_comments_tmp: function(records) {
- return tools_sort_comments(this.comments_structure, records, this.params.parent_id);
- },
-
+
display_current_user: function () {
- return this.$element.find('img.oe_mail_msg_image').attr('src', this.thread_get_avatar('res.users', 'avatar', this.params.uid));
+ var avatar = mail.ChatterUtils.get_image(this.session.prefix, this.session.session_id, 'res.users', 'avatar', this.params.uid);
+ return this.$element.find('img.oe_mail_icon').attr('src', avatar);
},
do_comment: function () {
var comment_node = this.$element.find('textarea');
var body_text = comment_node.val();
comment_node.val('');
- return this.ds.call('message_append_note', [[this.params.res_id], 'Reply', body_text, this.params.parent_id, 'comment', 'html']).then(
+ return this.ds.call('message_append_note', [[this.params.res_id], '', body_text, this.params.parent_id, 'comment', 'plain']).then(
this.proxy('init_comments'));
},
/**
* Create a domain to fetch new comments according to
- * comment already present in sorted_comments
- * @param {Object} sorted_comments (see sort_comments)
+ * comment already present in comments_structure
+ * @param {Object} comments_structure (see chatter utils)
* @returns {Array} fetch_domain (OpenERP domain style)
*/
- get_fetch_domain: function (sorted_comments) {
+ get_fetch_domain: function (comments_structure) {
var domain = [];
- var ids = sorted_comments.root_ids.slice();
+ var ids = comments_structure.root_ids.slice();
var ids2 = [];
// must be child of current parent
if (this.params.parent_id) { domain.push(['id', 'child_of', this.params.parent_id]); }
- _(sorted_comments.root_ids).each(function (id) { // each record
+ _(comments_structure.root_ids).each(function (id) { // each record
ids.push(id);
ids2.push(id);
});
@@ -413,109 +811,46 @@ openerp.mail = function(session) {
},
do_more: function () {
- domain = this.get_fetch_domain(this.sorted_comments);
+ domain = this.get_fetch_domain(this.comments_structure);
return this.fetch_comments(this.params.limit, this.params.offset, domain);
},
-
- /**
- *
- * var regex_login = new RegExp(/(^|\s)@((\w|@|\.)*)/g);
- * var regex_intlink = new RegExp(/(^|\s)#(\w*[a-zA-Z_]+\w*)\.(\w+[a-zA-Z_]+\w*),(\w+)/g);
- */
- do_replace_internal_links: function (string) {
- var self = this;
- var icon_list = ['al', 'pinky']
- /* shortcut to user: @login */
- var regex_login = new RegExp(/(^|\s)@((\w|@|\.)*)/g);
- var regex_res = regex_login.exec(string);
- while (regex_res != null) {
- var login = regex_res[2];
- string = string.replace(regex_res[0], regex_res[1] + '@' + login + '');
- regex_res = regex_login.exec(string);
- }
- /* special shortcut: :name, try to find an icon if in list */
- var regex_login = new RegExp(/(^|\s):((\w)*)/g);
- var regex_res = regex_login.exec(string);
- while (regex_res != null) {
- var icon_name = regex_res[2];
- if (_.include(icon_list, icon_name))
- string = string.replace(regex_res[0], regex_res[1] + '');
- regex_res = regex_login.exec(string);
- }
- return string;
- },
-
- thread_get_avatar: function(model, field, id) {
- return this.session.prefix + '/web/binary/image?session_id=' + this.session.session_id + '&model=' + model + '&field=' + field + '&id=' + (id || '');
- },
-
- /** Removes html tags, except b, em, br */
- do_clean_text: function (string) {
- var html = $('').text(string.replace(/\s+/g, ' ')).html().replace(new RegExp('<(/)?(b|em|br|br /)\\s*>', 'gi'), '<$1$2>');
- return html;
- },
-
- /** Replaces line bracks by html line breaks (br) */
- do_text_nl2br: function (str, is_xhtml) {
- var break_tag = (is_xhtml || typeof is_xhtml === 'undefined') ? ' ' : ' ';
- return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1'+ break_tag +'$2');
- },
-
- /**
- *
- * var regex_login = new RegExp(/(^|\s)@((\w|@|\.)*)/g);
- * var regex_intlink = new RegExp(/(^|\s)#(\w*[a-zA-Z_]+\w*)\.(\w+[a-zA-Z_]+\w*),(\w+)/g);
- */
- do_check_internal_links: function(string) {
- /* shortcut to user: @login */
- var regex_login = new RegExp(/(^|\s)@((\w|@|\.)*)/g);
- var regex_res = regex_login.exec(string);
- while (regex_res != null) {
- var login = regex_res[2];
- if (! ('res.users' in this.map_hash)) { this.map_hash['res.users']['name'] = []; }
- this.map_hash['res.users']['login'].push(login);
- regex_res = regex_login.exec(string);
- }
- /* internal links: #res.model,name */
- var regex_intlink = new RegExp(/(^|\s)#(\w*[a-zA-Z_]+\w*)\.(\w+[a-zA-Z_]+\w*),(\w+)/g);
- regex_res = regex_intlink.exec(string);
- while (regex_res != null) {
- var res_model = regex_res[2] + '.' + regex_res[3];
- var res_name = regex_res[4];
- if (! (res_model in this.map_hash)) { this.map_hash[res_model]['name'] = []; }
- this.map_hash[res_model]['name'].push(res_name);
- regex_res = regex_intlink.exec(string);
- }
- },
-
- /** checks if tue current user is the message author */
- _is_author: function (id) {
- return (this.session.uid == id);
- },
-
});
- session.web.form.widgets.add( 'Thread', 'openerp.mail.Thread');
+
+
+ /**
+ * ------------------------------------------------------------
+ * mail_thread Widget
+ * ------------------------------------------------------------
+ *
+ * This widget handles the display of the Chatter on documents.
+ */
+
+ /* Add mail_thread widget to registry */
+ session.web.form.widgets.add('mail_thread', 'openerp.mail.RecordThread');
/** mail_thread widget: thread of comments */
mail.RecordThread = session.web.form.AbstractField.extend({
- template: 'mail.RecordThread',
+ // QWeb template to use when rendering the object
+ template: 'mail.record_thread',
init: function() {
this._super.apply(this, arguments);
- this.see_subscribers = true;
- this.thread = null;
this.params = this.get_definition_options();
this.params.thread_level = this.params.thread_level || 0;
- // datasets
+ this.params.see_subscribers = true;
+ this.params.see_subscribers_options = this.params.see_subscribers_options || false;
+ this.thread = null;
this.ds = new session.web.DataSet(this, this.view.model);
this.ds_users = new session.web.DataSet(this, 'res.users');
},
start: function() {
- this._super.apply(this, arguments);
var self = this;
- // bind buttons
- this.$element.find('button.oe_mail_button_followers').click(function () { self.do_toggle_followers(); }).hide();
+ this._super.apply(this, arguments);
+ mail.ChatterUtils.bind_events(this);
+ this.$element.find('button.oe_mail_button_followers').click(function () { self.do_toggle_followers(); });
+ if (! this.params.see_subscribers_options) {
+ this.$element.find('button.oe_mail_button_followers').hide(); }
this.$element.find('button.oe_mail_button_follow').click(function () { self.do_follow(); })
.mouseover(function () { $(this).html('Follow').removeClass('oe_mail_button_mouseout').addClass('oe_mail_button_mouseover'); })
.mouseleave(function () { $(this).html('Not following').removeClass('oe_mail_button_mouseover').addClass('oe_mail_button_mouseout'); });
@@ -530,7 +865,8 @@ openerp.mail = function(session) {
},
reinit: function() {
- this.see_subscribers = true;
+ this.params.see_subscribers = true;
+ this.params.see_subscribers_options = this.params.see_subscribers_options || false;
this.$element.find('button.oe_mail_button_followers').html('Hide followers')
this.$element.find('button.oe_mail_button_follow').hide();
this.$element.find('button.oe_mail_button_unfollow').hide();
@@ -548,11 +884,11 @@ openerp.mail = function(session) {
// fetch followers
var fetch_sub_done = this.fetch_subscribers();
// create and render Thread widget
- this.$element.find('div.oe_mail_recthread_left').empty();
+ this.$element.find('div.oe_mail_recthread_main').empty();
if (this.thread) this.thread.destroy();
this.thread = new mail.Thread(this, {'res_model': this.view.model, 'res_id': this.view.datarecord.id, 'uid': this.session.uid,
- 'thread_level': this.params.thread_level, 'show_post_comment': true, 'limit': 15});
- var thread_done = this.thread.appendTo(this.$element.find('div.oe_mail_recthread_left'));
+ 'thread_level': this.params.thread_level, 'show_post_comment': true, 'limit': 15});
+ var thread_done = this.thread.appendTo(this.$element.find('div.oe_mail_recthread_main'));
return fetch_sub_done && thread_done;
},
@@ -567,9 +903,8 @@ openerp.mail = function(session) {
this.$element.find('div.oe_mail_recthread_followers h4').html('Followers (' + records.length + ')');
_(records).each(function (record) {
if (record.id == self.session.uid) { self.is_subscriber = true; }
- var mini_url = self.thread_get_avatar('res.users', 'avatar', record.id);
- $('
+
+
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 1b19a383c10..d26511464f8 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -33,7 +33,7 @@ from ..mail_message import to_email
# main mako-like expression pattern
EXPRESSION_PATTERN = re.compile('(\$\{.+?\})')
-class mail_compose_message(osv.osv_memory):
+class mail_compose_message(osv.TransientModel):
"""Generic Email composition wizard. This wizard is meant to be inherited
at model and view level to provide specific wizard features.
@@ -41,13 +41,12 @@ class mail_compose_message(osv.osv_memory):
parameters, among which are:
* mail.compose.message.mode: if set to 'reply', the wizard is in
- reply mode and pre-populated with the original quote.
- If set to 'mass_mail', the wizard is in mass mailing
- where the mail details can contain template placeholders
- that will be merged with actual data before being sent
- to each recipient. Recipients will be derived from the
- records determined via ``context['active_model']`` and
- ``context['active_ids']``.
+ reply to a previous message mode and pre-populated with the original
+ quote. If set to 'comment', it means you are writing a new message to
+ be attached to a document. If set to 'mass_mail', the wizard is in
+ mass mailing where the mail details can contain template placeholders
+ that will be merged with actual data before being sent to each
+ recipient.
* active_model: model name of the document to which the mail being
composed is related
* active_id: id of the document to which the mail being composed is
@@ -61,119 +60,179 @@ class mail_compose_message(osv.osv_memory):
_description = 'Email composition wizard'
def default_get(self, cr, uid, fields, context=None):
- """Overridden to provide specific defaults depending on the context
- parameters.
+ """ Overridden to provide specific defaults depending on the context
+ parameters.
+
+ Composition mode
+ - comment: default mode; active_model, active_id = model and ID of a
+ document we are commenting,
+ - reply: active_id = ID of a mail.message to which we are replying.
+ From this message we can find the related model and res_id,
+ - mass_mailing mode: active_model, active_id = model and ID of a
+ document we are commenting,
:param dict context: several context values will modify the behavior
of the wizard, cfr. the class description.
"""
if context is None:
context = {}
+ compose_mode = context.get('mail.compose.message.mode', 'comment')
+ active_model = context.get('active_model')
+ active_id = context.get('active_id')
result = super(mail_compose_message, self).default_get(cr, uid, fields, context=context)
+
+ # get default values according to the composition mode
vals = {}
- reply_mode = context.get('mail.compose.message.mode') == 'reply'
- if (not reply_mode) and context.get('active_model') and context.get('active_id'):
- # normal mode when sending an email related to any document, as specified by
- # active_model and active_id in context
- vals = self.get_value(cr, uid, context.get('active_model'), context.get('active_id'), context)
- elif reply_mode and context.get('active_id'):
- # reply mode, consider active_id is the ID of a mail.message to which we're
- # replying
- vals = self.get_message_data(cr, uid, int(context['active_id']), context)
- else:
- # default mode
- result['model'] = context.get('active_model', False)
+ if compose_mode in ['reply']:
+ vals = self.get_message_data(cr, uid, int(context['active_id']), context=context)
+ elif compose_mode in ['comment', 'mass_mail'] and active_model and active_id:
+ vals = self.get_value(cr, uid, active_model, active_id, context)
for field in vals:
if field in fields:
- result.update({field : vals[field]})
+ result[field] = vals[field]
# link to model and record if not done yet
- if not result.get('model') or not result.get('res_id'):
- active_model = context.get('active_model')
- res_id = context.get('active_id')
- if active_model and active_model not in (self._name, 'mail.message'):
- result['model'] = active_model
- if res_id:
- result['res_id'] = res_id
+ if not result.get('model') and active_model:
+ result['model'] = active_model
+ if not result.get('res_id') and active_id:
+ result['res_id'] = active_id
# Try to provide default email_from if not specified yet
if not result.get('email_from'):
- current_user = self.pool.get('res.users').browse(cr, uid, uid, context)
+ current_user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
result['email_from'] = current_user.user_email or False
return result
_columns = {
+ 'dest_partner_ids': fields.many2many('res.partner',
+ 'email_message_send_partner_rel',
+ 'wizard_id', 'partner_id', 'Destination partners',
+ help="When sending emails through the social network composition wizard"\
+ "you may choose to send a copy of the mail to partners."),
'attachment_ids': fields.many2many('ir.attachment','email_message_send_attachment_rel', 'wizard_id', 'attachment_id', 'Attachments'),
'auto_delete': fields.boolean('Auto Delete', help="Permanently delete emails after sending"),
'filter_id': fields.many2one('ir.filters', 'Filters'),
}
def get_value(self, cr, uid, model, res_id, context=None):
- """Returns a defaults-like dict with initial values for the composition
- wizard when sending an email related to the document record identified
- by ``model`` and ``res_id``.
+ """ Returns a defaults-like dict with initial values for the composition
+ wizard when sending an email related to the document record
+ identified by ``model`` and ``res_id``.
- The default implementation returns an empty dictionary, and is meant
- to be overridden by subclasses.
+ The default implementation returns an empty dictionary, and is meant
+ to be overridden by subclasses.
- :param str model: model name of the document record this mail is related to.
- :param int res_id: id of the document record this mail is related to.
- :param dict context: several context values will modify the behavior
- of the wizard, cfr. the class description.
+ :param str model: model name of the document record this mail is
+ related to.
+ :param int res_id: id of the document record this mail is related to.
+ :param dict context: several context values will modify the behavior
+ of the wizard, cfr. the class description.
"""
- return {}
+ result = {}
+ user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
+ result.update({
+ 'model': model,
+ 'res_id': res_id,
+ 'email_from': user.user_email or tools.config.get('email_from', False),
+ 'body_html': False,
+ 'body_text': False,
+ 'subject': False,
+ 'dest_partner_ids': [],
+ })
+ return result
+
+ def onchange_email_mode(self, cr, uid, ids, value, model, res_id, context=None):
+ """ email_mode (values: True or False). This onchange on the email mode
+ allows to have some specific behavior when going in email mode, or
+ when going out of email mode.
+ Basically, dest_partner_ids is reset when going out of email
+ mode.
+ This method can be overridden for models that want to have their
+ specific behavior.
+ Note that currently, this onchange is used in mail.js and called
+ manually on the form instantiated in the Chatter.
+ """
+ if not value:
+ return {'value': {'dest_partner_ids': []}}
+ return {'value': {}}
+
+ def onchange_formatting(self, cr, uid, ids, value, model, res_id, context=None):
+ """ onchange_formatting (values: True or False). This onchange on the
+ formatting allows to have some specific behavior when going in
+ formatting mode, or when going out of formatting.
+ Basically, subject is reset when going out of formatting mode.
+ This method can be overridden for models that want to have their
+ specific behavior.
+ Note that currently, this onchange is used in mail.js and called
+ manually on the form instantiated in the Chatter.
+ """
+ if not value:
+ return {'value': {'subject': False}}
+ return {'value': {}}
def get_message_data(self, cr, uid, message_id, context=None):
- """Returns a defaults-like dict with initial values for the composition
- wizard when replying to the given message (e.g. including the quote
- of the initial message, and the correct recipient).
- Should not be called unless ``context['mail.compose.message.mode'] == 'reply'``.
+ """ Returns a defaults-like dict with initial values for the composition
+ wizard when replying to the given message (e.g. including the quote
+ of the initial message, and the correct recipient). It should not be
+ called unless ``context['mail.compose.message.mode'] == 'reply'``.
- :param int message_id: id of the mail.message to which the user
- is replying.
- :param dict context: several context values will modify the behavior
- of the wizard, cfr. the class description.
- When calling this method, the ``'mail'`` value
- in the context should be ``'reply'``.
+ :param int message_id: id of the mail.message to which the user
+ is replying.
+ :param dict context: several context values will modify the behavior
+ of the wizard, cfr. the class description.
"""
if context is None:
context = {}
result = {}
- mail_message = self.pool.get('mail.message')
- if message_id:
- message_data = mail_message.browse(cr, uid, message_id, context)
- subject = tools.ustr(message_data.subject or '')
- # we use the plain text version of the original mail, by default,
- # as it is easier to quote than the HTML version.
- # XXX TODO: make it possible to switch to HTML on the fly
- current_user = self.pool.get('res.users').browse(cr, uid, uid, context)
- body = message_data.body_text or current_user.signature or ''
- if context.get('mail.compose.message.mode') == 'reply':
- sent_date = _('On %(date)s, ') % {'date': message_data.date} if message_data.date else ''
- sender = _('%(sender_name)s wrote:') % {'sender_name': tools.ustr(message_data.email_from or _('You'))}
- quoted_body = '> %s' % tools.ustr(body.replace('\n', "\n> ") or '')
- body = '\n'.join(["\n", (sent_date + sender), quoted_body])
- body += "\n" + (current_user.signature or '')
- re_prefix = _("Re:")
- if not (subject.startswith('Re:') or subject.startswith(re_prefix)):
- subject = "%s %s" % (re_prefix, subject)
- result.update({
- 'subtype' : 'plain', # default to the text version due to quoting
- 'body_text' : body,
- 'subject' : subject,
- 'attachment_ids' : [],
- 'model' : message_data.model or False,
- 'res_id' : message_data.res_id or False,
- 'email_from' : current_user.user_email or message_data.email_to or False,
- 'email_to' : message_data.reply_to or message_data.email_from or False,
- 'email_cc' : message_data.email_cc or False,
- 'user_id' : uid,
+ if not message_id:
+ return result
- # pass msg-id and references of mail we're replying to, to construct the
- # new ones later when sending
- 'message_id' : message_data.message_id or False,
- 'references' : message_data.references and tools.ustr(message_data.references) or False,
- })
+ current_user = self.pool.get('res.users').browse(cr, uid, uid, context)
+ message_data = self.pool.get('mail.message').browse(cr, uid, message_id, context)
+ # Form the subject
+ re_prefix = _("Re:")
+ reply_subject = tools.ustr(message_data.subject or '')
+ if not (reply_subject.startswith('Re:') or reply_subject.startswith(re_prefix)):
+ reply_subject = "%s %s" % (re_prefix, reply_subject)
+ # Form the bodies (text and html). We use the plain text version of the
+ # original mail, by default, as it is easier to quote than the HTML
+ # version. TODO: make it possible to switch to HTML on the fly
+ sent_date = _('On %(date)s, ') % {'date': message_data.date} if message_data.date else ''
+ sender = _('%(sender_name)s wrote:') % {'sender_name': tools.ustr(message_data.email_from or _('You'))}
+ body_text = message_data.body_text or ''
+ body_html = message_data.body_html or ''
+ quoted_body_text = '> %s' % tools.ustr(body_text.replace('\n', "\n> ") or '')
+ quoted_body_html = '
+
+
- Point of Sale
-
-
+ Point of Sale
+
+
+ 150
-
-
-
pos.config.form.viewpos.config
@@ -842,12 +846,12 @@
-
+ domain="[('config_id', '=', active_id)]" />
Point of Sales
@@ -864,8 +868,8 @@
id="menu_pos_config_pos"
groups="group_pos_manager"/>
- pos.session
form
-
-
@@ -650,9 +645,9 @@
-
-
-
+
+
@@ -675,7 +670,7 @@
-
+
account.analytic.account.form.inheritaccount.analytic.account
@@ -687,7 +682,7 @@
-
+
@@ -827,5 +822,6 @@
+
diff --git a/addons/project/res_partner_view.xml b/addons/project/res_partner_view.xml
index 3b019e51af6..09170c43434 100644
--- a/addons/project/res_partner_view.xml
+++ b/addons/project/res_partner_view.xml
@@ -3,35 +3,29 @@
-
- res.partner.crm.history.inherit1
- res.partner
- form
-
-
-
- False
-
-
- res.partner.task.info.inheritres.partnerform
-
-
-
-
-
-
-
-
-
-
-
-
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/project/security/ir.model.access.csv b/addons/project/security/ir.model.access.csv
index b6fd90c948f..3f79cfee3de 100644
--- a/addons/project/security/ir.model.access.csv
+++ b/addons/project/security/ir.model.access.csv
@@ -18,4 +18,3 @@ access_account_analytic_line_project,account.analytic.line project,analytic.mode
access_project_task_history,project.task.history project,project.model_project_task_history,project.group_project_user,1,1,1,0
access_project_task_history_cumulative,project.task.history project,project.model_project_task_history_cumulative,project.group_project_manager,1,0,0,0
access_resource_calendar,project.resource_calendar manager,resource.model_resource_calendar,project.group_project_manager,1,0,0,0
-access_mail_message_project_user,project.mail.message.user,mail.model_mail_message,project.group_project_user,1,1,1,0
diff --git a/addons/project_gtd/__openerp__.py b/addons/project_gtd/__openerp__.py
index d6fa568977a..c28bc6f732a 100644
--- a/addons/project_gtd/__openerp__.py
+++ b/addons/project_gtd/__openerp__.py
@@ -25,6 +25,7 @@
'version': '1.0',
'category': 'Project Management',
"sequence": 20,
+ "summary": "Personal Tasks",
'description': """
This module implements all concepts defined by the Getting Things Done methodology.
===================================================================================
diff --git a/addons/project_issue/__openerp__.py b/addons/project_issue/__openerp__.py
index 9037523d41e..fa7d002f571 100644
--- a/addons/project_issue/__openerp__.py
+++ b/addons/project_issue/__openerp__.py
@@ -25,6 +25,7 @@
'version': '1.0',
'category': 'Project Management',
"sequence": 22,
+ "summary": "Multi Level Support",
'description': """
This module provides Issues/Bugs Management in Project.
=======================================================
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 5f9b0a369ca..ca5bd9224f2 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -519,7 +519,7 @@ class project_issue(base_stage, osv.osv):
# -------------------------------------------------------
# OpenChatter methods and notifications
# -------------------------------------------------------
-
+
def message_get_subscribers(self, cr, uid, ids, context=None):
""" Override to add responsible user. """
user_ids = super(project_issue, self).message_get_subscribers(cr, uid, ids, context=context)
@@ -538,7 +538,7 @@ class project_issue(base_stage, osv.osv):
return 'Project issue'
def convert_to_task_send_note(self, cr, uid, ids, context=None):
- message = _("Project issue has been converted in to task.")
+ message = _("Project issue has been converted into task.")
return self.message_append_note(cr, uid, ids, body=message, context=context)
def create_send_note(self, cr, uid, ids, context=None):
diff --git a/addons/project_issue/security/ir.model.access.csv b/addons/project_issue/security/ir.model.access.csv
index 789f93b5175..5799fb0b611 100644
--- a/addons/project_issue/security/ir.model.access.csv
+++ b/addons/project_issue/security/ir.model.access.csv
@@ -4,10 +4,8 @@ access_project_issue_report_all,project.issue.report,model_project_issue_report,
access_crm_case_categ_id,crm.case.categ,crm.model_crm_case_categ,project.group_project_manager,1,1,1,1
access_project_issue_version_project,project_issue_version manager,model_project_issue_version,project.group_project_manager,1,1,1,1
access_project_issue_version_project_user,project_issue_version user,model_project_issue_version,project.group_project_user,1,0,0,0
-access_mail_message_project_manager,mail.message.manager,mail.model_mail_message,project.group_project_manager,1,1,1,1
access_resource_calendar_project_manager,resource.calendar.project.manager,resource.model_resource_calendar,project.group_project_manager,1,1,1,1
access_project_issue_report_user,project.issue.report user,model_project_issue_report,project.group_project_user,1,0,0,0
-access_mail_message_issue_project_user,mail.message.user,mail.model_mail_message,project.group_project_user,1,1,1,0
access_crm_case_section,crm.case.section,crm.model_crm_case_section,project.group_project_user,1,0,0,0
access_project_issue_salesman,project.issue,model_project_issue,base.group_sale_salesman,1,0,0,0
access_project_issue_manager,project.issue,model_project_issue,base.group_sale_manager,1,0,0,0
diff --git a/addons/project_mailgate/__openerp__.py b/addons/project_mailgate/__openerp__.py
index dad9fd09eae..34ace79c39e 100644
--- a/addons/project_mailgate/__openerp__.py
+++ b/addons/project_mailgate/__openerp__.py
@@ -44,7 +44,7 @@ There are two common alternatives to configure the mailbox integration:
""",
"init_xml": [],
- "update_xml": ["security/ir.model.access.csv",
+ "update_xml": [
],
'demo_xml': [
],
diff --git a/addons/project_mailgate/security/ir.model.access.csv b/addons/project_mailgate/security/ir.model.access.csv
deleted file mode 100644
index 6c495169161..00000000000
--- a/addons/project_mailgate/security/ir.model.access.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_mail_message_project_user,project.mail.message.user,mail.model_mail_message,project.group_project_user,1,1,1,0
diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml
index 4d3d288b981..7208885748c 100644
--- a/addons/project_timesheet/project_timesheet_view.xml
+++ b/addons/project_timesheet/project_timesheet_view.xml
@@ -70,7 +70,7 @@
-
+
diff --git a/addons/purchase/__openerp__.py b/addons/purchase/__openerp__.py
index d84408a690d..1f32f3a3145 100644
--- a/addons/purchase/__openerp__.py
+++ b/addons/purchase/__openerp__.py
@@ -25,6 +25,7 @@
'version': '1.1',
'category': 'Purchase Management',
"sequence": 19,
+ "summary": "Requests for Quotation, Invoicing Control",
'description': """
Purchase module is for generating a purchase order for purchase of goods from a supplier.
=========================================================================================
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index f768f293434..547902b4635 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -167,7 +167,7 @@ class purchase_order(osv.osv):
help="Put an address if you want to deliver directly from the supplier to the customer. " \
"Otherwise, keep empty to deliver to your own company."
),
- 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}),
+ 'warehouse_id': fields.many2one('stock.warehouse', 'Destination Warehouse', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}),
'location_id': fields.many2one('stock.location', 'Destination', required=True, domain=[('usage','<>','view')]),
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, help="The pricelist sets the currency used for this purchase order. It also computes the supplier price for the selected products/quantities."),
'state': fields.selection(STATE_SELECTION, 'Status', readonly=True, help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.", select=True),
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 100c60e3f53..ebc7df729b5 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -1,11 +1,13 @@
-
-
+
+
diff --git a/addons/purchase/stock.py b/addons/purchase/stock.py
index b7116e08445..b5b708119cc 100644
--- a/addons/purchase/stock.py
+++ b/addons/purchase/stock.py
@@ -40,6 +40,7 @@ class stock_picking(osv.osv):
'purchase_id': fields.many2one('purchase.order', 'Purchase Order',
ondelete='set null', select=True),
}
+
_defaults = {
'purchase_id': False,
}
@@ -133,5 +134,6 @@ class stock_picking_in(osv.osv):
_columns = {
'purchase_id': fields.many2one('purchase.order', 'Purchase Order',
ondelete='set null', select=True),
+ 'warehouse_id': fields.related('purchase_id', 'warehouse_id', type='many2one', relation='stock.warehouse', string='Destination Warehouse'),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/purchase/stock_view.xml b/addons/purchase/stock_view.xml
index f9d6239e0a5..27318adc0f5 100644
--- a/addons/purchase/stock_view.xml
+++ b/addons/purchase/stock_view.xml
@@ -7,11 +7,11 @@
form
-
-
+
+
-
+
Picking liststock.picking
@@ -30,12 +30,15 @@
form
-
+
+
+
+
-
+
stock.picking.in.search
@@ -86,7 +89,7 @@
{'search_default_purchase_id': active_id,'default_type': 'in'}
-
+
Purchase Picking Inheritedpurchase.order
@@ -102,7 +105,7 @@
-
+
Based on Incoming Shipmentsstock.picking
diff --git a/addons/purchase_requisition/i18n/nb.po b/addons/purchase_requisition/i18n/nb.po
new file mode 100644
index 00000000000..aba3b5d4984
--- /dev/null
+++ b/addons/purchase_requisition/i18n/nb.po
@@ -0,0 +1,444 @@
+# Norwegian Bokmal translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:37+0000\n"
+"PO-Revision-Date: 2012-07-23 10:33+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Norwegian Bokmal \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-07-24 04:52+0000\n"
+"X-Generator: Launchpad (build 15668)\n"
+
+#. module: purchase_requisition
+#: sql_constraint:purchase.order:0
+msgid "Order Reference must be unique per Company!"
+msgstr "Ordrereferanse må være unik pr. firma!"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+#: selection:purchase.requisition,state:0
+msgid "In Progress"
+msgstr "I arbeid"
+
+#. module: purchase_requisition
+#: code:addons/purchase_requisition/wizard/purchase_requisition_partner.py:42
+#, python-format
+msgid "No Product in Tender"
+msgstr "Ikke noe produkt i tilbudet"
+
+#. module: purchase_requisition
+#: view:purchase.order:0
+msgid "Requisition"
+msgstr "Rekvisisjon"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+#: field:purchase.requisition,user_id:0
+msgid "Responsible"
+msgstr "Ansvarlig"
+
+#. module: purchase_requisition
+#: view:purchase.requisition.partner:0
+msgid "Create Quotation"
+msgstr "Lag tilbud"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Group By..."
+msgstr "Grupper etter..."
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+#: field:purchase.requisition,state:0
+msgid "State"
+msgstr "Status"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Purchase Requisition in negociation"
+msgstr "Innkjøpsrekvisisjon i forhandling"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+msgid "Supplier"
+msgstr "Leverandør"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+#: selection:purchase.requisition,state:0
+msgid "New"
+msgstr "Ny"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+msgid "Product Detail"
+msgstr "produktdetaljer"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+#: field:purchase.requisition,date_start:0
+msgid "Requisition Date"
+msgstr "Rekvisisjonsdato"
+
+#. module: purchase_requisition
+#: model:ir.actions.act_window,name:purchase_requisition.action_purchase_requisition_partner
+#: model:ir.actions.report.xml,name:purchase_requisition.report_purchase_requisition
+#: model:ir.model,name:purchase_requisition.model_purchase_requisition
+#: model:ir.module.category,name:purchase_requisition.module_category_purchase_requisition
+#: field:product.product,purchase_requisition:0
+#: field:purchase.order,requisition_id:0
+#: view:purchase.requisition:0
+#: field:purchase.requisition.line,requisition_id:0
+#: view:purchase.requisition.partner:0
+msgid "Purchase Requisition"
+msgstr "Innkjøpsrekvisisjon"
+
+#. module: purchase_requisition
+#: model:ir.model,name:purchase_requisition.model_purchase_requisition_line
+msgid "Purchase Requisition Line"
+msgstr "Innkjøpsrekvisisjonslinje"
+
+#. module: purchase_requisition
+#: view:purchase.order:0
+msgid "Purchase Orders with requisition"
+msgstr "Innkjøpsordre med rekvisisjon"
+
+#. module: purchase_requisition
+#: model:ir.model,name:purchase_requisition.model_product_product
+#: field:purchase.requisition.line,product_id:0
+msgid "Product"
+msgstr "Produkt"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Quotations"
+msgstr "Tilbud"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+#: field:purchase.requisition,description:0
+msgid "Description"
+msgstr "Beskrivelse"
+
+#. module: purchase_requisition
+#: help:product.product,purchase_requisition:0
+msgid ""
+"Check this box so that requisitions generates purchase requisitions instead "
+"of directly requests for quotations."
+msgstr ""
+
+#. module: purchase_requisition
+#: code:addons/purchase_requisition/purchase_requisition.py:136
+#, python-format
+msgid "Warning"
+msgstr "Advarsel"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+msgid "Type"
+msgstr "Type"
+
+#. module: purchase_requisition
+#: field:purchase.requisition,company_id:0
+#: field:purchase.requisition.line,company_id:0
+msgid "Company"
+msgstr "Firma"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Request a Quotation"
+msgstr "Be om tilbud"
+
+#. module: purchase_requisition
+#: selection:purchase.requisition,exclusive:0
+msgid "Multiple Requisitions"
+msgstr ""
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+#: field:purchase.requisition.line,product_uom_id:0
+msgid "Product UoM"
+msgstr "Produkt måleenhet"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Approved by Supplier"
+msgstr "Godkjent av leverandør"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Reset to Draft"
+msgstr "Sett tilbake til utkast"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Current Purchase Requisition"
+msgstr "Gjeldende innkjøpsrekvisisjon"
+
+#. module: purchase_requisition
+#: model:res.groups,name:purchase_requisition.group_purchase_requisition_user
+msgid "User"
+msgstr "Bruker"
+
+#. module: purchase_requisition
+#: field:purchase.requisition.partner,partner_address_id:0
+msgid "Address"
+msgstr "Adresse"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+msgid "Order Reference"
+msgstr "Ordrereferanse"
+
+#. module: purchase_requisition
+#: model:ir.actions.act_window,help:purchase_requisition.action_purchase_requisition
+msgid ""
+"A purchase requisition is the step before a request for quotation. In a "
+"purchase requisition (or purchase tender), you can record the products you "
+"need to buy and trigger the creation of RfQs to suppliers. After the "
+"negotiation, once you have reviewed all the supplier's offers, you can "
+"validate some and cancel others."
+msgstr ""
+
+#. module: purchase_requisition
+#: field:purchase.requisition.line,product_qty:0
+msgid "Quantity"
+msgstr "Kvantum"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Unassigned Requisition"
+msgstr ""
+
+#. module: purchase_requisition
+#: model:ir.actions.act_window,name:purchase_requisition.action_purchase_requisition
+#: model:ir.ui.menu,name:purchase_requisition.menu_purchase_requisition_pro_mgt
+msgid "Purchase Requisitions"
+msgstr "Innkjøpsrekvisisjoner"
+
+#. module: purchase_requisition
+#: code:addons/purchase_requisition/purchase_requisition.py:136
+#, python-format
+msgid ""
+"You have already one %s purchase order for this partner, you must cancel "
+"this purchase order to create a new quotation."
+msgstr ""
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "End Date"
+msgstr "Sluttdato"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+#: field:purchase.requisition,name:0
+msgid "Requisition Reference"
+msgstr "Rekvisisjonsreferanse"
+
+#. module: purchase_requisition
+#: field:purchase.requisition,line_ids:0
+msgid "Products to Purchase"
+msgstr ""
+
+#. module: purchase_requisition
+#: field:purchase.requisition,date_end:0
+msgid "Requisition Deadline"
+msgstr ""
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Search Purchase Requisition"
+msgstr "Søk innkjøpsrekvisisjon"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Notes"
+msgstr "Notater"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+msgid "Date Ordered"
+msgstr "Ordredato"
+
+#. module: purchase_requisition
+#: help:purchase.requisition,exclusive:0
+msgid ""
+"Purchase Requisition (exclusive): On the confirmation of a purchase order, "
+"it cancels the remaining purchase order.\n"
+"Purchase Requisition(Multiple): It allows to have multiple purchase "
+"orders.On confirmation of a purchase order it does not cancel the remaining "
+"orders"
+msgstr ""
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Cancel Purchase Order"
+msgstr "Annuller innkjøpsordre"
+
+#. module: purchase_requisition
+#: model:ir.model,name:purchase_requisition.model_purchase_order
+#: view:purchase.requisition:0
+msgid "Purchase Order"
+msgstr "Innkjøpsordre"
+
+#. module: purchase_requisition
+#: code:addons/purchase_requisition/wizard/purchase_requisition_partner.py:42
+#, python-format
+msgid "Error!"
+msgstr "Feil!"
+
+#. module: purchase_requisition
+#: field:purchase.requisition,exclusive:0
+msgid "Requisition Type"
+msgstr "Rekvisisjonstype"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "New Purchase Requisition"
+msgstr "Ny innkjøpsrekvisisjon"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Products"
+msgstr "Produkter"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Order Date"
+msgstr "Ordredato"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+msgid "]"
+msgstr "]"
+
+#. module: purchase_requisition
+#: selection:purchase.requisition,state:0
+msgid "Cancelled"
+msgstr "Kansellert"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+msgid "["
+msgstr "["
+
+#. module: purchase_requisition
+#: model:ir.model,name:purchase_requisition.model_purchase_requisition_partner
+msgid "Purchase Requisition Partner"
+msgstr "Innkjøpsrekvisisjons partner"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Start"
+msgstr "Start"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+msgid "Quotation Detail"
+msgstr "Tilbudsdetaljer"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+msgid "Purchase for Requisitions"
+msgstr ""
+
+#. module: purchase_requisition
+#: model:ir.actions.act_window,name:purchase_requisition.act_res_partner_2_purchase_order
+msgid "Purchase orders"
+msgstr "Innkjøpsordre"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+#: view:purchase.requisition:0
+#: field:purchase.requisition,origin:0
+msgid "Origin"
+msgstr "Opprinnelse"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Reference"
+msgstr "Referanse"
+
+#. module: purchase_requisition
+#: model:ir.model,name:purchase_requisition.model_procurement_order
+msgid "Procurement"
+msgstr "Innkjøp"
+
+#. module: purchase_requisition
+#: field:purchase.requisition,warehouse_id:0
+msgid "Warehouse"
+msgstr "Lager"
+
+#. module: purchase_requisition
+#: field:procurement.order,requisition_id:0
+msgid "Latest Requisition"
+msgstr "Siste rekvisisjon"
+
+#. module: purchase_requisition
+#: report:purchase.requisition:0
+msgid "Qty"
+msgstr "Ant"
+
+#. module: purchase_requisition
+#: selection:purchase.requisition,exclusive:0
+msgid "Purchase Requisition (exclusive)"
+msgstr "Innkjøpsrekvisisjon (eksklusiv)"
+
+#. module: purchase_requisition
+#: model:res.groups,name:purchase_requisition.group_purchase_requisition_manager
+msgid "Manager"
+msgstr "Manager"
+
+#. module: purchase_requisition
+#: constraint:product.product:0
+msgid "Error: Invalid ean code"
+msgstr "Feil: Ugyldig ean kode"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+#: selection:purchase.requisition,state:0
+msgid "Done"
+msgstr "Fullført"
+
+#. module: purchase_requisition
+#: view:purchase.requisition.partner:0
+msgid "_Cancel"
+msgstr "_Avbryt"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Confirm Purchase Order"
+msgstr "Bekreft innkjøpsordre"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Cancel"
+msgstr "Kanseller"
+
+#. module: purchase_requisition
+#: field:purchase.requisition.partner,partner_id:0
+msgid "Partner"
+msgstr "Partner"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Start Date"
+msgstr "Startdato"
+
+#. module: purchase_requisition
+#: view:purchase.requisition:0
+msgid "Unassigned"
+msgstr "Ikke tildelt"
+
+#. module: purchase_requisition
+#: field:purchase.requisition,purchase_ids:0
+msgid "Purchase Orders"
+msgstr "Innkjøpsordre"
diff --git a/addons/sale/__openerp__.py b/addons/sale/__openerp__.py
index 968d8d1cecd..f28a0518669 100644
--- a/addons/sale/__openerp__.py
+++ b/addons/sale/__openerp__.py
@@ -24,6 +24,7 @@
'version': '1.0',
'category': 'Sales Management',
"sequence": 14,
+ "summary": "Quotations, Sales, Invoicing",
'description': """
The base module to manage quotations and sales orders.
======================================================
diff --git a/addons/sale/i18n/ar.po b/addons/sale/i18n/ar.po
index d9c6ad71004..991e7876843 100644
--- a/addons/sale/i18n/ar.po
+++ b/addons/sale/i18n/ar.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -88,8 +88,8 @@ msgstr "تحذير !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "ضريبة القيمة المضافة"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2413,6 +2413,9 @@ msgstr "أصدر الفواتير بناءً على التسليم"
#~ msgid "Configuration Progress"
#~ msgstr "تقدم الإعدادات"
+#~ msgid "VAT"
+#~ msgstr "ضريبة القيمة المضافة"
+
#~ msgid " Month-1 "
#~ msgstr " شهر- ١ "
diff --git a/addons/sale/i18n/bg.po b/addons/sale/i18n/bg.po
index f38ed8a9b86..1e2359a1936 100644
--- a/addons/sale/i18n/bg.po
+++ b/addons/sale/i18n/bg.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -88,8 +88,8 @@ msgstr "Предупреждение !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "ДДС"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2188,6 +2188,9 @@ msgstr "Фактура базирана на доставки"
#~ msgid "Reference"
#~ msgstr "Отпратка"
+#~ msgid "VAT"
+#~ msgstr "ДДС"
+
#~ msgid ""
#~ "The sale order will automatically create the invoice proposition (draft "
#~ "invoice). Ordered and delivered quantities may not be the same. You have to "
diff --git a/addons/sale/i18n/bs.po b/addons/sale/i18n/bs.po
index fc7cca1fec4..354439ed5f3 100644
--- a/addons/sale/i18n/bs.po
+++ b/addons/sale/i18n/bs.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -88,8 +88,8 @@ msgstr ""
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "PDV"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2286,6 +2286,9 @@ msgstr "Račun sa referencom na isporuku"
#~ msgid "Our Salesman"
#~ msgstr "Naš Prodavač"
+#~ msgid "VAT"
+#~ msgstr "PDV"
+
#~ msgid "Delivery Order Only"
#~ msgstr "Samo isporuka"
diff --git a/addons/sale/i18n/ca.po b/addons/sale/i18n/ca.po
index 02c11057ac4..b47aeb04e49 100644
--- a/addons/sale/i18n/ca.po
+++ b/addons/sale/i18n/ca.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -89,8 +89,8 @@ msgstr "Avís!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "IVA"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2494,6 +2494,9 @@ msgstr "Factura des d'albarans"
#~ "la comanda de venda. Aquesta transacció converteix la comanda de venda a "
#~ "factures."
+#~ msgid "VAT"
+#~ msgstr "IVA"
+
#~ msgid "Make Invoice"
#~ msgstr "Crea factura"
diff --git a/addons/sale/i18n/cs.po b/addons/sale/i18n/cs.po
index 03610618ecd..562aa26664f 100644
--- a/addons/sale/i18n/cs.po
+++ b/addons/sale/i18n/cs.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
"X-Poedit-Language: Czech\n"
#. module: sale
@@ -87,8 +87,8 @@ msgstr "Varování !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "DPH"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2202,6 +2202,9 @@ msgstr "Faktura založená na dodávce"
#~ msgid "Payment Before Delivery"
#~ msgstr "Platba před doručením"
+#~ msgid "VAT"
+#~ msgstr "DPH"
+
#~ msgid "All at Once"
#~ msgstr "Vše najednou"
diff --git a/addons/sale/i18n/da.po b/addons/sale/i18n/da.po
index 4dd21480065..ebea93e173b 100644
--- a/addons/sale/i18n/da.po
+++ b/addons/sale/i18n/da.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -89,8 +89,8 @@ msgstr "Advarsel!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "Moms"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2165,6 +2165,9 @@ msgstr "År"
msgid "Invoice Based on Deliveries"
msgstr ""
+#~ msgid "VAT"
+#~ msgstr "Moms"
+
#~ msgid " Year "
#~ msgstr " År "
diff --git a/addons/sale/i18n/de.po b/addons/sale/i18n/de.po
index 6e7eefbf3cf..aadc82565c6 100644
--- a/addons/sale/i18n/de.po
+++ b/addons/sale/i18n/de.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -89,8 +89,8 @@ msgstr "Warnung !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "USt."
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2501,6 +2501,9 @@ msgstr "Rechnung durch Lieferung"
#~ "Rechnung' angeklickt wird. Dieser Vorgang verschiebt den Verkaufsauftrag zu "
#~ "den Rechnungen."
+#~ msgid "VAT"
+#~ msgstr "USt."
+
#~ msgid "Make Invoice"
#~ msgstr "Erzeuge Rechnung"
diff --git a/addons/sale/i18n/el.po b/addons/sale/i18n/el.po
index 6dc0d1c8ca4..d919dc2071f 100644
--- a/addons/sale/i18n/el.po
+++ b/addons/sale/i18n/el.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -89,8 +89,8 @@ msgstr "Προειδοποίηση!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "ΦΠΑ"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2227,6 +2227,9 @@ msgstr "Τιμολόγηση Βασισμένη Σε Παραδόσεις"
#~ msgid "Reference"
#~ msgstr "Παραπομπή"
+#~ msgid "VAT"
+#~ msgstr "ΦΠΑ"
+
#~ msgid "Procure Method"
#~ msgstr "Μέθοδος Προμήθειας"
diff --git a/addons/sale/i18n/es.po b/addons/sale/i18n/es.po
index 5326d9f13ec..61f2fd976a5 100644
--- a/addons/sale/i18n/es.po
+++ b/addons/sale/i18n/es.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -91,8 +91,8 @@ msgstr "¡Aviso!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "CIF/NIF"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -3000,3 +3000,6 @@ msgstr "Facturar desde albaranes"
#~ msgid "Ordered Date"
#~ msgstr "Fecha pedido"
+
+#~ msgid "VAT"
+#~ msgstr "CIF/NIF"
diff --git a/addons/sale/i18n/es_AR.po b/addons/sale/i18n/es_AR.po
index 6e739de4b74..59284ec10cd 100644
--- a/addons/sale/i18n/es_AR.po
+++ b/addons/sale/i18n/es_AR.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -88,8 +88,8 @@ msgstr ""
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "IVA"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2170,6 +2170,9 @@ msgstr "Facturar desde órdenes de entrega"
#~ msgid "Reference"
#~ msgstr "Referencia"
+#~ msgid "VAT"
+#~ msgstr "IVA"
+
#~ msgid ""
#~ "The sale order will automatically create the invoice proposition (draft "
#~ "invoice). Ordered and delivered quantities may not be the same. You have to "
diff --git a/addons/sale/i18n/es_CL.po b/addons/sale/i18n/es_CL.po
index 9d20a2ec2c2..0ecd4353144 100644
--- a/addons/sale/i18n/es_CL.po
+++ b/addons/sale/i18n/es_CL.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -88,8 +88,8 @@ msgstr "¡Aviso!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "IVA"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2274,6 +2274,9 @@ msgstr "Facturar desde guías de despacho"
#~ msgid "Payment Before Delivery"
#~ msgstr "Pago antes del envío"
+#~ msgid "VAT"
+#~ msgstr "IVA"
+
#~ msgid "All at Once"
#~ msgstr "Todo a la vez"
diff --git a/addons/sale/i18n/es_CR.po b/addons/sale/i18n/es_CR.po
index fb4f3cd2a3c..3aa9d2262c8 100644
--- a/addons/sale/i18n/es_CR.po
+++ b/addons/sale/i18n/es_CR.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
"Language: \n"
#. module: sale
@@ -91,8 +91,8 @@ msgstr "¡Aviso!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "IVA"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2382,6 +2382,9 @@ msgstr "Año"
msgid "Invoice Based on Deliveries"
msgstr "Facturar desde albaranes"
+#~ msgid "VAT"
+#~ msgstr "IVA"
+
#~ msgid "Do you really want to create the invoice(s) ?"
#~ msgstr "¿Desea crear la(s) factura(s)?"
diff --git a/addons/sale/i18n/es_EC.po b/addons/sale/i18n/es_EC.po
index 361d651a110..94d4d958295 100644
--- a/addons/sale/i18n/es_EC.po
+++ b/addons/sale/i18n/es_EC.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -88,8 +88,8 @@ msgstr "¡Advertencia!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "VAT"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2567,6 +2567,9 @@ msgstr "Facturar desde albaranes"
#~ msgid "Invalid model name in the action definition."
#~ msgstr "Nombre de modelo no válido en la definición de la acción."
+#~ msgid "VAT"
+#~ msgstr "VAT"
+
#~ msgid "Configure Picking Policy for Sales Order"
#~ msgstr ""
#~ "Configurar la Politica de paquete de productos de los pedidos de ventas"
diff --git a/addons/sale/i18n/et.po b/addons/sale/i18n/et.po
index c373ae66644..799c62c28cf 100644
--- a/addons/sale/i18n/et.po
+++ b/addons/sale/i18n/et.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: model:process.node,name:sale.process_node_deliveryorder0
@@ -155,8 +155,8 @@ msgstr "Hoiatus!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "KM"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2487,6 +2487,9 @@ msgstr "Arve kohaletoimetamiste põhjal"
#~ msgid "My Sales Order"
#~ msgstr "Minu müügikorraldus"
+#~ msgid "VAT"
+#~ msgstr "KM"
+
#~ msgid "Delivery, from the warehouse to the customer."
#~ msgstr "Kohaletoimetamine laost kliendile."
diff --git a/addons/sale/i18n/fi.po b/addons/sale/i18n/fi.po
index a1149147d70..5ef37fea35e 100644
--- a/addons/sale/i18n/fi.po
+++ b/addons/sale/i18n/fi.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -91,8 +91,8 @@ msgstr "Varoitus !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "ALV"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2269,6 +2269,9 @@ msgstr "Lasku perustuen toimitettuihin"
#~ msgid "Outgoing Products"
#~ msgstr "Lähtevät tuotteet"
+#~ msgid "VAT"
+#~ msgstr "ALV"
+
#~ msgid ""
#~ "The sale order will automatically create the invoice proposition (draft "
#~ "invoice). Ordered and delivered quantities may not be the same. You have to "
diff --git a/addons/sale/i18n/fr.po b/addons/sale/i18n/fr.po
index a1207be3bab..97cd0137c97 100644
--- a/addons/sale/i18n/fr.po
+++ b/addons/sale/i18n/fr.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: code:addons/sale/sale.py:655
@@ -130,8 +130,8 @@ msgstr "Attention !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "TVA"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2638,6 +2638,9 @@ msgstr "Facturation basé sur les livraisons"
#~ msgid "Direct Delivery"
#~ msgstr "Livraison directe"
+#~ msgid "VAT"
+#~ msgstr "TVA"
+
#~ msgid "Make Invoice"
#~ msgstr "Créer facture"
diff --git a/addons/sale/i18n/gl.po b/addons/sale/i18n/gl.po
index 8d5aa806c80..81a6facac29 100644
--- a/addons/sale/i18n/gl.po
+++ b/addons/sale/i18n/gl.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -87,7 +87,7 @@ msgstr ""
#. module: sale
#: report:sale.order:0
-msgid "VAT"
+msgid "Tax"
msgstr ""
#. module: sale
diff --git a/addons/sale/i18n/hr.po b/addons/sale/i18n/hr.po
index e802d9d3b75..f567ee5169a 100644
--- a/addons/sale/i18n/hr.po
+++ b/addons/sale/i18n/hr.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
"Language: hr\n"
#. module: sale
@@ -91,8 +91,8 @@ msgstr "Upozorenje !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "PDV"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2453,6 +2453,9 @@ msgstr "Faktura na temelju dostava"
#~ "Račun se kreira kada se klikne na 'Kriraj Račun' nakon potvrde Prodajne "
#~ "Narudžbe. Ova transakcija prenosi podatke Prodajne Narudžbe u Račune."
+#~ msgid "VAT"
+#~ msgstr "PDV"
+
#~ msgid "Sales order lines"
#~ msgstr "Vezane Prodajne Narudžbe"
diff --git a/addons/sale/i18n/hu.po b/addons/sale/i18n/hu.po
index 97f0fe59171..d97ff49cc78 100644
--- a/addons/sale/i18n/hu.po
+++ b/addons/sale/i18n/hu.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -89,8 +89,8 @@ msgstr "Figyelem!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "ÁFA"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2271,6 +2271,9 @@ msgstr "Számlák kiszállítások alapján"
#~ msgid "Reference"
#~ msgstr "Hivatkozás"
+#~ msgid "VAT"
+#~ msgstr "ÁFA"
+
#~ msgid "Net Price"
#~ msgstr "Nettó ár"
diff --git a/addons/sale/i18n/id.po b/addons/sale/i18n/id.po
index 0fc14082a31..1439af92090 100644
--- a/addons/sale/i18n/id.po
+++ b/addons/sale/i18n/id.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -89,8 +89,8 @@ msgstr "Peringatan !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "VAT"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2663,3 +2663,6 @@ msgstr "Invoice berdasarkan pengiriman"
#~ msgid "Steps To Deliver a Sales Order"
#~ msgstr "Langkah-langkah untuk pengiriman sales order."
+
+#~ msgid "VAT"
+#~ msgstr "VAT"
diff --git a/addons/sale/i18n/is.po b/addons/sale/i18n/is.po
index 0f5351587ad..13a74f4c2a3 100644
--- a/addons/sale/i18n/is.po
+++ b/addons/sale/i18n/is.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -89,8 +89,8 @@ msgstr "Aðvörun !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "VSK"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2171,3 +2171,6 @@ msgstr ""
#: selection:sale.config.picking_policy,order_policy:0
msgid "Invoice Based on Deliveries"
msgstr ""
+
+#~ msgid "VAT"
+#~ msgstr "VSK"
diff --git a/addons/sale/i18n/it.po b/addons/sale/i18n/it.po
index ddfc2f09e6f..a4872985e17 100644
--- a/addons/sale/i18n/it.po
+++ b/addons/sale/i18n/it.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -88,8 +88,8 @@ msgstr "Attenzione!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "IVA"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2500,6 +2500,9 @@ msgstr "Fattura basata su Consegne"
#~ "l'ordine di vendita. Questa transazione crea una fattura sulla base "
#~ "dell'ordine di vendita."
+#~ msgid "VAT"
+#~ msgstr "IVA"
+
#~ msgid "Make Invoice"
#~ msgstr "Crea fattura"
diff --git a/addons/sale/i18n/ja.po b/addons/sale/i18n/ja.po
index 1e88262f8bb..50c3722876a 100644
--- a/addons/sale/i18n/ja.po
+++ b/addons/sale/i18n/ja.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -87,8 +87,8 @@ msgstr "警告"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "消費税"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2283,3 +2283,6 @@ msgstr "年"
#: selection:sale.config.picking_policy,order_policy:0
msgid "Invoice Based on Deliveries"
msgstr "配達基準の請求書"
+
+#~ msgid "VAT"
+#~ msgstr "消費税"
diff --git a/addons/sale/i18n/ko.po b/addons/sale/i18n/ko.po
index 594032bc105..8dadcc0c5de 100644
--- a/addons/sale/i18n/ko.po
+++ b/addons/sale/i18n/ko.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -87,8 +87,8 @@ msgstr ""
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "VAT"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2205,6 +2205,9 @@ msgstr "베송에 기초한 인보이스"
#~ msgid "Origin"
#~ msgstr "기원"
+#~ msgid "VAT"
+#~ msgstr "VAT"
+
#~ msgid ""
#~ "The sale order will automatically create the invoice proposition (draft "
#~ "invoice). Ordered and delivered quantities may not be the same. You have to "
diff --git a/addons/sale/i18n/lt.po b/addons/sale/i18n/lt.po
index 47b6c90d2cc..305a1fd8664 100644
--- a/addons/sale/i18n/lt.po
+++ b/addons/sale/i18n/lt.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -89,8 +89,8 @@ msgstr "Įspėjimas!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "PVM"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2185,6 +2185,9 @@ msgstr "Sąskaita faktūra iš pristatymo užsakymo"
#~ msgid "Origin"
#~ msgstr "Kilmė"
+#~ msgid "VAT"
+#~ msgstr "PVM"
+
#~ msgid "Automatic Declaration"
#~ msgstr "Automatinis deklaravimas"
diff --git a/addons/sale/i18n/lv.po b/addons/sale/i18n/lv.po
index fba2e67f98f..eb1f56507dd 100644
--- a/addons/sale/i18n/lv.po
+++ b/addons/sale/i18n/lv.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -87,8 +87,8 @@ msgstr ""
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "PVN"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2181,6 +2181,9 @@ msgstr "Rēķins pēc Piegādes"
#~ msgid "Invoice after delivery"
#~ msgstr "Rēķins pēc piegādes"
+#~ msgid "VAT"
+#~ msgstr "PVN"
+
#~ msgid "Outgoing Products"
#~ msgstr "Izejošā Produkcija"
diff --git a/addons/sale/i18n/mn.po b/addons/sale/i18n/mn.po
index 547daf2db0b..2fc96bd7db5 100644
--- a/addons/sale/i18n/mn.po
+++ b/addons/sale/i18n/mn.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -91,8 +91,8 @@ msgstr "Анхаар !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "НӨАТ"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2359,6 +2359,9 @@ msgstr "Жил"
msgid "Invoice Based on Deliveries"
msgstr "Хүргэлт дээр үндэслэн нэхэмжлэх"
+#~ msgid "VAT"
+#~ msgstr "НӨАТ"
+
#~ msgid "Sale Order"
#~ msgstr "Борлуулах захиалга"
diff --git a/addons/sale/i18n/nb.po b/addons/sale/i18n/nb.po
index 6eb4c6e19e5..849ac26783a 100644
--- a/addons/sale/i18n/nb.po
+++ b/addons/sale/i18n/nb.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -91,8 +91,8 @@ msgstr "Advarsel !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "MVA"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2208,6 +2208,9 @@ msgstr "Faktura basert på leveringer"
#~ msgid "Payment Before Delivery"
#~ msgstr "Betaling før levering"
+#~ msgid "VAT"
+#~ msgstr "MVA"
+
#~ msgid "All at Once"
#~ msgstr "Alt på en gang"
diff --git a/addons/sale/i18n/nl.po b/addons/sale/i18n/nl.po
index a074ba3dfb0..883d8f3b509 100644
--- a/addons/sale/i18n/nl.po
+++ b/addons/sale/i18n/nl.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -90,8 +90,8 @@ msgstr "Waarschuwing !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "BTW"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -372,7 +372,7 @@ msgid ""
"Product Category or Fiscal Position is not defined !"
msgstr ""
"Er is geen categorie opbrengstrekening gedefinieerd in de standaard "
-"eigenschappen van de productcategorie of fiscale situatie niet gedefinieerd !"
+"eigenschappen van de productcategorie of fiscale positie niet gedefinieerd !"
#. module: sale
#: selection:sale.report,month:0
@@ -454,7 +454,7 @@ msgstr "Offertedatum"
#. module: sale
#: field:sale.order,fiscal_position:0
msgid "Fiscal Position"
-msgstr "Fiscale situatie"
+msgstr "Fiscale positie"
#. module: sale
#: view:sale.order:0 view:sale.order.line:0 field:sale.report,product_uom:0
@@ -1713,7 +1713,7 @@ msgstr "Handmatig in behandeling"
#. module: sale
#: field:sale.order.line,product_uom:0
msgid "Product UoM"
-msgstr "Product meeteenheid"
+msgstr "Product maateenheid"
#. module: sale
#: view:sale.order:0
@@ -2602,6 +2602,9 @@ msgstr "Factuur gebaseerd op leveringen"
#~ "geven verkooporder. Deze handeling verplaatst de verkooporder naar de "
#~ "facturen."
+#~ msgid "VAT"
+#~ msgstr "BTW"
+
#~ msgid "Make Invoice"
#~ msgstr "Maak factuur"
diff --git a/addons/sale/i18n/nl_BE.po b/addons/sale/i18n/nl_BE.po
index 41853d574a2..49a664ab6cf 100644
--- a/addons/sale/i18n/nl_BE.po
+++ b/addons/sale/i18n/nl_BE.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -91,8 +91,8 @@ msgstr "Waarschuwing"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "Btw"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2377,6 +2377,9 @@ msgstr "Factuur op basis van zendnota's"
#~ msgid "Payment Before Delivery"
#~ msgstr "Vooruitbetaling"
+#~ msgid "VAT"
+#~ msgstr "Btw"
+
#~ msgid "All at Once"
#~ msgstr "Complete leveringen"
diff --git a/addons/sale/i18n/oc.po b/addons/sale/i18n/oc.po
index 2d1e93e607b..aea018e7d08 100644
--- a/addons/sale/i18n/oc.po
+++ b/addons/sale/i18n/oc.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -87,7 +87,7 @@ msgstr ""
#. module: sale
#: report:sale.order:0
-msgid "VAT"
+msgid "Tax"
msgstr ""
#. module: sale
diff --git a/addons/sale/i18n/pl.po b/addons/sale/i18n/pl.po
index e62531c01e4..9e75ec4af00 100644
--- a/addons/sale/i18n/pl.po
+++ b/addons/sale/i18n/pl.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -90,8 +90,8 @@ msgstr "Ostrzeżenie !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "NIP"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2709,6 +2709,9 @@ msgstr "Faktura wg dostaw"
#~ msgid "Draft customer invoice, to be reviewed by accountant."
#~ msgstr "Projekt faktury dla klienta do sprawdzenia księgowego"
+#~ msgid "VAT"
+#~ msgstr "NIP"
+
#, python-format
#~ msgid "You cannot cancel a sale order line that has already been invoiced !"
#~ msgstr ""
diff --git a/addons/sale/i18n/pt.po b/addons/sale/i18n/pt.po
index cf6bebbec98..6b0c5fd3ab4 100644
--- a/addons/sale/i18n/pt.po
+++ b/addons/sale/i18n/pt.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -90,8 +90,8 @@ msgstr "Aviso !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "NIF"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -3086,3 +3086,6 @@ msgstr "Fatura Baseada em Entregas"
#~ msgid "Do you really want to create the invoice(s) ?"
#~ msgstr "Deseja realmente criar a fatura(s) ?"
+
+#~ msgid "VAT"
+#~ msgstr "NIF"
diff --git a/addons/sale/i18n/pt_BR.po b/addons/sale/i18n/pt_BR.po
index 4b213456a7d..a8256204d5a 100644
--- a/addons/sale/i18n/pt_BR.po
+++ b/addons/sale/i18n/pt_BR.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -89,8 +89,8 @@ msgstr "Aviso !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "Imposto"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2280,6 +2280,9 @@ msgstr "Notas Fiscais Baseadas nas Entregas"
#~ msgid "Invoice after delivery"
#~ msgstr "Faturar depois de entreguar"
+#~ msgid "VAT"
+#~ msgstr "Imposto"
+
#~ msgid "Origin"
#~ msgstr "Origem"
diff --git a/addons/sale/i18n/ro.po b/addons/sale/i18n/ro.po
index 0f944a0d9e4..45738b758a6 100644
--- a/addons/sale/i18n/ro.po
+++ b/addons/sale/i18n/ro.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -90,8 +90,8 @@ msgstr "Avertizare !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "TVA"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2393,6 +2393,9 @@ msgstr "Factura pe baza Livrarilor"
#~ msgid "Origin"
#~ msgstr "Origine"
+#~ msgid "VAT"
+#~ msgstr "TVA"
+
#~ msgid "Packing"
#~ msgstr "Împachetare"
diff --git a/addons/sale/i18n/ru.po b/addons/sale/i18n/ru.po
index 2286a8b9971..a62be53408f 100644
--- a/addons/sale/i18n/ru.po
+++ b/addons/sale/i18n/ru.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -88,8 +88,8 @@ msgstr "Внимание!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "НДС"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2283,6 +2283,9 @@ msgstr "Счет основанный на доставках"
#~ msgid "Sale Order"
#~ msgstr "Заказ"
+#~ msgid "VAT"
+#~ msgstr "НДС"
+
#~ msgid "Sales order lines"
#~ msgstr "Позиции заказа"
diff --git a/addons/sale/i18n/sale.pot b/addons/sale/i18n/sale.pot
index 64cd1ee5a8c..2c477d1d7a0 100644
--- a/addons/sale/i18n/sale.pot
+++ b/addons/sale/i18n/sale.pot
@@ -105,7 +105,7 @@ msgstr ""
#. module: sale
#: report:sale.order:0
-msgid "VAT"
+msgid "Tax"
msgstr ""
#. module: sale
diff --git a/addons/sale/i18n/sk.po b/addons/sale/i18n/sk.po
index f385f207254..55c638674d0 100644
--- a/addons/sale/i18n/sk.po
+++ b/addons/sale/i18n/sk.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -87,8 +87,8 @@ msgstr "Varovanie!"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "DPH"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2252,6 +2252,9 @@ msgstr ""
#~ msgid "Packing Policy"
#~ msgstr "Podmienky balenia"
+#~ msgid "VAT"
+#~ msgstr "DPH"
+
#~ msgid "Invalid XML for View Architecture!"
#~ msgstr "Neplatné XML pre zobrazenie architektúry!"
diff --git a/addons/sale/i18n/sl.po b/addons/sale/i18n/sl.po
index 3df83d235aa..cee0e17d3ae 100644
--- a/addons/sale/i18n/sl.po
+++ b/addons/sale/i18n/sl.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -88,8 +88,8 @@ msgstr "Opozorilo !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "DDV"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2294,6 +2294,9 @@ msgstr "Račun na Podlagi Dobav"
#~ msgid "Direct Delivery"
#~ msgstr "Direktna dostava"
+#~ msgid "VAT"
+#~ msgstr "DDV"
+
#~ msgid "Sales order lines"
#~ msgstr "Postavke prodajnega naloga"
diff --git a/addons/sale/i18n/sq.po b/addons/sale/i18n/sq.po
index 5e94d3956b8..5bed8cb0ccb 100644
--- a/addons/sale/i18n/sq.po
+++ b/addons/sale/i18n/sq.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 05:59+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:06+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -87,7 +87,7 @@ msgstr ""
#. module: sale
#: report:sale.order:0
-msgid "VAT"
+msgid "Tax"
msgstr ""
#. module: sale
diff --git a/addons/sale/i18n/sr.po b/addons/sale/i18n/sr.po
index 572ce524c7d..4cad9147ec7 100644
--- a/addons/sale/i18n/sr.po
+++ b/addons/sale/i18n/sr.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -89,8 +89,8 @@ msgstr "Upozorenje !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "PDV"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2459,6 +2459,9 @@ msgstr "Račun na osnovu isporuke"
#~ "Račun je kreiran kada je kliknuto 'Kreiranje račun' nakon potvrde naloga za "
#~ "prodaju. Ovaj proces prenosi nalog za prodaju do računa."
+#~ msgid "VAT"
+#~ msgstr "PDV"
+
#~ msgid "Delivery Order Only"
#~ msgstr "Isključivo nalog za isporuku"
diff --git a/addons/sale/i18n/sr@latin.po b/addons/sale/i18n/sr@latin.po
index 9350bb4ed1e..befa922b816 100644
--- a/addons/sale/i18n/sr@latin.po
+++ b/addons/sale/i18n/sr@latin.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:01+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -89,8 +89,8 @@ msgstr "Upozorenje !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "PDV"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2185,6 +2185,9 @@ msgstr "Račun na osnovu isporuke"
#~ msgid "Payment Before Delivery"
#~ msgstr "Plaćanje pre isporuke"
+#~ msgid "VAT"
+#~ msgstr "PDV"
+
#~ msgid "All at Once"
#~ msgstr "Sve odjednom"
diff --git a/addons/sale/i18n/sv.po b/addons/sale/i18n/sv.po
index 0fa027ff3b1..f96295a5be7 100644
--- a/addons/sale/i18n/sv.po
+++ b/addons/sale/i18n/sv.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -90,8 +90,8 @@ msgstr "Varning !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "Moms"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2480,6 +2480,9 @@ msgstr "Fakturera utgående ifrån leveranser"
#~ msgid "Sales Process"
#~ msgstr "Kundorderprocess"
+#~ msgid "VAT"
+#~ msgstr "Moms"
+
#~ msgid "Delivery Order Only"
#~ msgstr "Endast leveransorder"
diff --git a/addons/sale/i18n/th.po b/addons/sale/i18n/th.po
index fadb12bd016..2c0e2691dfd 100644
--- a/addons/sale/i18n/th.po
+++ b/addons/sale/i18n/th.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -87,8 +87,8 @@ msgstr "คำเตือน !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "ภาษีมูลค่าเพิ่ม (VAT)"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2166,6 +2166,9 @@ msgstr ""
#~ msgid "All at Once"
#~ msgstr "ทั้วหมดในครั้งเดียว"
+#~ msgid "VAT"
+#~ msgstr "ภาษีมูลค่าเพิ่ม (VAT)"
+
#~ msgid "Configure"
#~ msgstr "ตั้งค่า"
diff --git a/addons/sale/i18n/tlh.po b/addons/sale/i18n/tlh.po
index 143197536b4..cdff94156e4 100644
--- a/addons/sale/i18n/tlh.po
+++ b/addons/sale/i18n/tlh.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -86,7 +86,7 @@ msgstr ""
#. module: sale
#: report:sale.order:0
-msgid "VAT"
+msgid "Tax"
msgstr ""
#. module: sale
diff --git a/addons/sale/i18n/tr.po b/addons/sale/i18n/tr.po
index 0f4e6b89cc8..d68060cf433 100644
--- a/addons/sale/i18n/tr.po
+++ b/addons/sale/i18n/tr.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -88,8 +88,8 @@ msgstr "Uyarı"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "KDV"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2252,6 +2252,9 @@ msgstr "Teslimatlara Bağlı Fatura"
#~ msgid "Reference"
#~ msgstr "Referans"
+#~ msgid "VAT"
+#~ msgstr "KDV"
+
#~ msgid "Net Price"
#~ msgstr "Net Fiyat"
diff --git a/addons/sale/i18n/uk.po b/addons/sale/i18n/uk.po
index a5950553653..bfe3683cb29 100644
--- a/addons/sale/i18n/uk.po
+++ b/addons/sale/i18n/uk.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -86,8 +86,8 @@ msgstr ""
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "ПДВ"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2284,6 +2284,9 @@ msgstr ""
#~ msgid "Direct Delivery"
#~ msgstr "Пряма Доставка"
+#~ msgid "VAT"
+#~ msgstr "ПДВ"
+
#~ msgid "Make Invoice"
#~ msgstr "Виписати інвойс"
diff --git a/addons/sale/i18n/vi.po b/addons/sale/i18n/vi.po
index fb3bc012541..a94a024cc73 100644
--- a/addons/sale/i18n/vi.po
+++ b/addons/sale/i18n/vi.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -89,8 +89,8 @@ msgstr "Cảnh báo !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "Thuế GTGT"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2611,6 +2611,9 @@ msgstr "Hóa đơn dựa theo việc giao hàng"
#~ msgid "Allows you to compute delivery costs on your quotations."
#~ msgstr "Cho phép bạn tính toán chi phí giao hàng trên Đơn chào hàng của bạn"
+#~ msgid "VAT"
+#~ msgstr "Thuế GTGT"
+
#~ msgid "Configure"
#~ msgstr "Cấu hình"
diff --git a/addons/sale/i18n/zh_CN.po b/addons/sale/i18n/zh_CN.po
index fbd99435bf9..dc70e1ecc7d 100644
--- a/addons/sale/i18n/zh_CN.po
+++ b/addons/sale/i18n/zh_CN.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -86,8 +86,8 @@ msgstr "警告 !"
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "增值税"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2195,6 +2195,9 @@ msgstr "年"
msgid "Invoice Based on Deliveries"
msgstr "发票基于送货单"
+#~ msgid "VAT"
+#~ msgstr "增值税"
+
#~ msgid "Draft Invoice"
#~ msgstr "发票草稿"
diff --git a/addons/sale/i18n/zh_TW.po b/addons/sale/i18n/zh_TW.po
index 75d604ae074..99d07991b52 100644
--- a/addons/sale/i18n/zh_TW.po
+++ b/addons/sale/i18n/zh_TW.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-07-14 06:00+0000\n"
-"X-Generator: Launchpad (build 15614)\n"
+"X-Launchpad-Export-Date: 2012-07-21 05:07+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
#. module: sale
#: field:sale.config.picking_policy,timesheet:0
@@ -86,8 +86,8 @@ msgstr ""
#. module: sale
#: report:sale.order:0
-msgid "VAT"
-msgstr "增值稅(VAT)"
+msgid "Tax"
+msgstr ""
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
@@ -2379,6 +2379,9 @@ msgstr "根據交貨的發票"
#~ msgid "Direct Delivery"
#~ msgstr "直接交貨"
+#~ msgid "VAT"
+#~ msgstr "增值稅(VAT)"
+
#~ msgid "Make Invoice"
#~ msgstr "開立發票"
diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml
index 3a3bfc55042..8fecc17e62c 100644
--- a/addons/sale/report/sale_order.rml
+++ b/addons/sale/report/sale_order.rml
@@ -134,7 +134,7 @@
Description
- VAT
+ Tax
Quantity
@@ -236,7 +236,7 @@
Description
- VAT
+ Tax
Quantity
diff --git a/addons/sale/res_partner_view.xml b/addons/sale/res_partner_view.xml
index bb5695eac39..11ac318b7a7 100644
--- a/addons/sale/res_partner_view.xml
+++ b/addons/sale/res_partner_view.xml
@@ -1,7 +1,24 @@
-
+
+ Quotations and Sales
+ sale.order
+ form
+ tree,form,graph
+ {'search_default_partner_id': active_id}
+
+
+ This customer has no quotation or sale order.
+ Click here to create a new quotation.
+ <p>
+ The "Quotation" is the first step of the Sales flow. Manage your sales from quotation to invoice.
+ <p>
+ You will be able to sell products (manage deliveries) as well as services (create projects).
+
+
+
+
res.partner.kanban.saleorder.inheritres.partner
@@ -18,6 +35,22 @@
+
+
+ res.partner.view.buttons
+ res.partner
+ form
+
+
+
+
+
+
+
+
+
diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml
index 4622577ac3d..9768f606793 100644
--- a/addons/sale/sale_data.xml
+++ b/addons/sale/sale_data.xml
@@ -27,4 +27,28 @@
+
+
+
+ Module sale installed!
+ comment
+ text
+ res.users
+
+ Welcome to OpenERP
+
+ You can click on the top menu Sales to manage your
+ customers, your quotations and sales orders.
+
+ If you need to manage your sales pipeline (leads,
+ opportunities, phonecalls), you can install the CRM module
+ from the Settings top menu.
+
+
+
+
+
+
+
+
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index e7420edb910..3f7f7efa43b 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -1,6 +1,16 @@
+
-
+
+
+
+
+
@@ -146,10 +156,10 @@
-
+
-
-
+
+
@@ -171,10 +181,9 @@
-
+
-
@@ -197,7 +206,7 @@
@@ -263,6 +272,8 @@
+
+
@@ -297,7 +308,7 @@
-
+
@@ -569,14 +580,6 @@
-
-
form
-
+
@@ -19,8 +19,8 @@
form
-
-
+
+
diff --git a/addons/sale/wizard/sale_make_invoice.py b/addons/sale/wizard/sale_make_invoice.py
index 5265afb9bff..b4b3772a91a 100644
--- a/addons/sale/wizard/sale_make_invoice.py
+++ b/addons/sale/wizard/sale_make_invoice.py
@@ -68,4 +68,4 @@ class sale_make_invoice(osv.osv_memory):
sale_make_invoice()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_analytic_plans/i18n/nb.po b/addons/sale_analytic_plans/i18n/nb.po
new file mode 100644
index 00000000000..c234f234d72
--- /dev/null
+++ b/addons/sale_analytic_plans/i18n/nb.po
@@ -0,0 +1,28 @@
+# Norwegian Bokmal translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:37+0000\n"
+"PO-Revision-Date: 2012-07-22 21:14+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Norwegian Bokmal \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-07-23 05:17+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
+
+#. module: sale_analytic_plans
+#: field:sale.order.line,analytics_id:0
+msgid "Analytic Distribution"
+msgstr "Analytisk Distribusjon"
+
+#. module: sale_analytic_plans
+#: model:ir.model,name:sale_analytic_plans.model_sale_order_line
+msgid "Sales Order Line"
+msgstr "Salgsordrelinje"
diff --git a/addons/sale_margin/i18n/nb.po b/addons/sale_margin/i18n/nb.po
new file mode 100644
index 00000000000..7db7e12a698
--- /dev/null
+++ b/addons/sale_margin/i18n/nb.po
@@ -0,0 +1,52 @@
+# Norwegian Bokmal translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:37+0000\n"
+"PO-Revision-Date: 2012-07-22 21:27+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Norwegian Bokmal \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-07-23 05:17+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
+
+#. module: sale_margin
+#: sql_constraint:sale.order:0
+msgid "Order Reference must be unique per Company!"
+msgstr "Ordrereferanse må være unik pr. firma!"
+
+#. module: sale_margin
+#: field:sale.order.line,purchase_price:0
+msgid "Cost Price"
+msgstr "Kostpris"
+
+#. module: sale_margin
+#: model:ir.model,name:sale_margin.model_sale_order
+msgid "Sales Order"
+msgstr "Salgsordre"
+
+#. module: sale_margin
+#: help:sale.order,margin:0
+msgid ""
+"It gives profitability by calculating the difference between the Unit Price "
+"and Cost Price."
+msgstr ""
+"Fortjeneste oppnås ved å beregne differansen mellom enhetspris og kostpris"
+
+#. module: sale_margin
+#: field:sale.order,margin:0
+#: field:sale.order.line,margin:0
+msgid "Margin"
+msgstr "Margin"
+
+#. module: sale_margin
+#: model:ir.model,name:sale_margin.model_sale_order_line
+msgid "Sales Order Line"
+msgstr "Salgsordrelinje"
diff --git a/addons/sale_margin/sale_margin_view.xml b/addons/sale_margin/sale_margin_view.xml
index 4696eec6eb2..30c2a0dea14 100644
--- a/addons/sale_margin/sale_margin_view.xml
+++ b/addons/sale_margin/sale_margin_view.xml
@@ -8,8 +8,13 @@
sale.order
-
-
+
+
+
+
+
+
+
diff --git a/addons/sale_mrp/i18n/nb.po b/addons/sale_mrp/i18n/nb.po
new file mode 100644
index 00000000000..4b6589b24cc
--- /dev/null
+++ b/addons/sale_mrp/i18n/nb.po
@@ -0,0 +1,53 @@
+# Norwegian Bokmal translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:37+0000\n"
+"PO-Revision-Date: 2012-07-22 20:19+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Norwegian Bokmal \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-07-23 05:17+0000\n"
+"X-Generator: Launchpad (build 15654)\n"
+
+#. module: sale_mrp
+#: help:mrp.production,sale_ref:0
+msgid "Indicate the Customer Reference from sales order."
+msgstr "Viser kundereferansen fra salgsordren"
+
+#. module: sale_mrp
+#: field:mrp.production,sale_ref:0
+msgid "Sales Reference"
+msgstr "Salgsreferanse"
+
+#. module: sale_mrp
+#: model:ir.model,name:sale_mrp.model_mrp_production
+msgid "Manufacturing Order"
+msgstr "Produksjonsordre"
+
+#. module: sale_mrp
+#: field:mrp.production,sale_name:0
+msgid "Sales Name"
+msgstr "Salgsnavn"
+
+#. module: sale_mrp
+#: sql_constraint:mrp.production:0
+msgid "Reference must be unique per Company!"
+msgstr "Referanse må være unik pr firma!"
+
+#. module: sale_mrp
+#: constraint:mrp.production:0
+msgid "Order quantity cannot be negative or zero!"
+msgstr "Ordrekvantum kan ikke være negativt eller null!"
+
+#. module: sale_mrp
+#: help:mrp.production,sale_name:0
+msgid "Indicate the name of sales order."
+msgstr "Angi navnet på salgsordren."
diff --git a/addons/sale_mrp/sale_mrp.py b/addons/sale_mrp/sale_mrp.py
index 840c33770a7..7397edbec2b 100644
--- a/addons/sale_mrp/sale_mrp.py
+++ b/addons/sale_mrp/sale_mrp.py
@@ -70,8 +70,8 @@ class mrp_production(osv.osv):
return res
_columns = {
- 'sale_name': fields.function(_ref_calc, multi='sale_name', type='char', string='Sales Name', help='Indicate the name of sales order.'),
- 'sale_ref': fields.function(_ref_calc, multi='sale_name', type='char', string='Sales Reference', help='Indicate the Customer Reference from sales order.'),
+ 'sale_name': fields.function(_ref_calc, multi='sale_name', type='char', string='Sale Name', help='Indicate the name of sales order.'),
+ 'sale_ref': fields.function(_ref_calc, multi='sale_name', type='char', string='Sale Reference', help='Indicate the Customer Reference from sales order.'),
}
mrp_production()
diff --git a/addons/sale_mrp/sale_mrp_view.xml b/addons/sale_mrp/sale_mrp_view.xml
index fbf2e7a9327..882663680c5 100644
--- a/addons/sale_mrp/sale_mrp_view.xml
+++ b/addons/sale_mrp/sale_mrp_view.xml
@@ -8,10 +8,12 @@
form
-
-
+
+
+
+
diff --git a/addons/sale_order_dates/i18n/nb.po b/addons/sale_order_dates/i18n/nb.po
new file mode 100644
index 00000000000..9d4322c8535
--- /dev/null
+++ b/addons/sale_order_dates/i18n/nb.po
@@ -0,0 +1,58 @@
+# Norwegian Bokmal translation for openobject-addons
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2012-02-08 00:37+0000\n"
+"PO-Revision-Date: 2012-07-23 10:58+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Norwegian Bokmal \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2012-07-24 04:52+0000\n"
+"X-Generator: Launchpad (build 15668)\n"
+
+#. module: sale_order_dates
+#: sql_constraint:sale.order:0
+msgid "Order Reference must be unique per Company!"
+msgstr "Ordrereferanse må være unik pr. firma!"
+
+#. module: sale_order_dates
+#: help:sale.order,requested_date:0
+msgid "Date on which customer has requested for sales."
+msgstr "Dato som kunden har ønsket for salg."
+
+#. module: sale_order_dates
+#: field:sale.order,commitment_date:0
+msgid "Commitment Date"
+msgstr "Bekreftet dato"
+
+#. module: sale_order_dates
+#: field:sale.order,effective_date:0
+msgid "Effective Date"
+msgstr "Behandlingsdato"
+
+#. module: sale_order_dates
+#: help:sale.order,effective_date:0
+msgid "Date on which picking is created."
+msgstr "Dato hvor plukkingen er gjort."
+
+#. module: sale_order_dates
+#: field:sale.order,requested_date:0
+msgid "Requested Date"
+msgstr "Ønsket dato"
+
+#. module: sale_order_dates
+#: model:ir.model,name:sale_order_dates.model_sale_order
+msgid "Sales Order"
+msgstr "Salgsordre"
+
+#. module: sale_order_dates
+#: help:sale.order,commitment_date:0
+msgid "Date on which delivery of products is to be made."
+msgstr "Dato hvor levering av varer skal skje"
diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py
index 41871480f45..23245e12a2d 100644
--- a/addons/share/wizard/share_wizard.py
+++ b/addons/share/wizard/share_wizard.py
@@ -274,7 +274,6 @@ class share_wizard(osv.TransientModel):
'name': new_login,
'groups_id': [(6,0,[group_id])],
'share': True,
- 'menu_tips' : False,
'company_id': current_user.company_id.id
}, context)
new_line = { 'user_id': user_id,
diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py
index 50bcb23df7b..2eaaa1ffb69 100644
--- a/addons/stock/__openerp__.py
+++ b/addons/stock/__openerp__.py
@@ -23,6 +23,7 @@
"name" : "Warehouse Management",
"version" : "1.1",
"author" : "OpenERP SA",
+ "summary": "Incoming Shipments, Deliveries, Inventory, Stock",
"description" : """
OpenERP Inventory Management module can manage multi-warehouses, multi and structured stock locations.
======================================================================================================
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 432b3ce365b..e90a2bb8162 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -2,15 +2,17 @@
-
+
+
+
+ parent="stock.menu_stock_product" sequence="0"/>
@@ -20,19 +22,19 @@
parent="stock.menu_stock_configuration" sequence="45" groups="base.group_no_one"/>
+ parent="stock.menu_product_in_config_stock" sequence="0"/>
-
-
-
+
+ stock.inventory.line.tree
@@ -116,25 +118,21 @@
-
-
+
+
-
-
-
-
+
+
-
+ -
+
-
-
-
@@ -150,19 +148,27 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -200,7 +206,7 @@
stock.inventoryform
-
+ Periodical Inventories are used to count the number of products available per location. You can use it once a year when you do the general inventory or whenever you need it, to correct the current stock level of a product.
@@ -271,9 +277,9 @@
child_ids
-
-
-
+
+
+
@@ -287,7 +293,7 @@
-
+
@@ -331,18 +337,25 @@
form
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
+
+
-
-
@@ -376,7 +389,7 @@
tree
-
+
@@ -397,7 +410,7 @@
-
+
@@ -415,7 +428,7 @@
stock.production.lotform
-
+ {}This is the list of all the production lots (serial numbers) you recorded. When you select a lot, you can get the upstream or downstream traceability of the products contained in lot. By default, the list is filtred on the serial numbers that are available in your warehouse but you can uncheck the 'Available' button to get all the lots you produced, received or delivered to customers.
@@ -433,8 +446,8 @@
move_history_ids
-
-
+
+
@@ -457,8 +470,8 @@
move_history_ids2
-
-
+
+
@@ -558,11 +571,11 @@
+ string="Internal" domain="[('usage', '=', 'internal')]" help="Internal Locations"/>
+ string="Customer" domain="[('usage', '=', 'customer')]" help="Customer Locations"/>
+ string="Supplier" domain="[('usage', '=', 'supplier')]" help="Supplier Locations"/>
@@ -726,7 +739,7 @@
-
+
@@ -734,7 +747,7 @@