-
+
@@ -66,25 +65,4 @@
-
- account settings
- account.config.settings
-
-
-
-
- 0
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/addons/sale/views/sale_layout_category_view.xml b/addons/sale/views/sale_layout_category_view.xml
index 189f5532305..9104798247e 100644
--- a/addons/sale/views/sale_layout_category_view.xml
+++ b/addons/sale/views/sale_layout_category_view.xml
@@ -1,6 +1,5 @@
-
-
+
report.configuration.form.view
@@ -59,5 +58,4 @@
name="Report Layout Categories"
groups="sale.group_sale_layout"
/>
-
-
+
diff --git a/addons/sale/views/sale.xml b/addons/sale/views/sale_templates.xml
similarity index 91%
rename from addons/sale/views/sale.xml
rename to addons/sale/views/sale_templates.xml
index cb00aea11a4..b7bd128c7e5 100644
--- a/addons/sale/views/sale.xml
+++ b/addons/sale/views/sale_templates.xml
@@ -1,6 +1,5 @@
-
-
+
@@ -8,5 +7,4 @@
-
-
+
diff --git a/addons/sale/sale_view.xml b/addons/sale/views/sale_views.xml
similarity index 99%
rename from addons/sale/sale_view.xml
rename to addons/sale/views/sale_views.xml
index f754f9f71d4..0f596068da0 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/views/sale_views.xml
@@ -1,6 +1,5 @@
-
-
+
New Quotation
sale.order
@@ -99,4 +132,5 @@
+
diff --git a/addons/sale/wizard/__init__.py b/addons/sale/wizard/__init__.py
index 92be178df5a..926a3a55b06 100644
--- a/addons/sale/wizard/__init__.py
+++ b/addons/sale/wizard/__init__.py
@@ -2,3 +2,4 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import sale_make_invoice_advance
+import mail_compose_message
\ No newline at end of file
diff --git a/addons/sale/wizard/mail_compose_message.py b/addons/sale/wizard/mail_compose_message.py
new file mode 100644
index 00000000000..784d07dd568
--- /dev/null
+++ b/addons/sale/wizard/mail_compose_message.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo import api, models
+
+
+class MailComposeMessage(models.TransientModel):
+ _inherit = 'mail.compose.message'
+
+ @api.multi
+ def send_mail(self, auto_commit=False):
+ if self._context.get('default_model') == 'sale.order' and self._context.get('default_res_id') and self._context.get('mark_so_as_sent'):
+ order = self.env['sale.order'].browse([self._context['default_res_id']])
+ if order.state == 'draft':
+ order.state = 'sent'
+ return super(MailComposeMessage, self.with_context(mail_post_autofollow=True)).send_mail(auto_commit=auto_commit)
diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py
index 3c34c67e93f..838f9abde22 100644
--- a/addons/sale/wizard/sale_make_invoice_advance.py
+++ b/addons/sale/wizard/sale_make_invoice_advance.py
@@ -1,10 +1,12 @@
+# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
-from openerp import api, fields, models, _
-import openerp.addons.decimal_precision as dp
-from openerp.exceptions import UserError
+from odoo import api, fields, models, _
+import odoo.addons.decimal_precision as dp
+from odoo.exceptions import UserError
+
class SaleAdvancePaymentInv(models.TransientModel):
_name = "sale.advance.payment.inv"
@@ -42,11 +44,11 @@ class SaleAdvancePaymentInv(models.TransientModel):
('percentage', 'Down payment (percentage)'),
('fixed', 'Down payment (fixed amount)')
], string='What do you want to invoice?', default=_get_advance_payment_method, required=True)
- product_id = fields.Many2one('product.product', string='Down Payment Product', domain=[('type', '=', 'service')],\
+ product_id = fields.Many2one('product.product', string='Down Payment Product', domain=[('type', '=', 'service')],
default=_default_product_id)
count = fields.Integer(default=_count, string='# of Orders')
amount = fields.Float('Down Payment Amount', digits=dp.get_precision('Account'), help="The amount to be invoiced in advance, taxes excluded.")
- deposit_account_id = fields.Many2one("account.account", string="Income Account", domain=[('deprecated', '=', False)],\
+ deposit_account_id = fields.Many2one("account.account", string="Income Account", domain=[('deprecated', '=', False)],
help="Account used for deposits", default=_default_deposit_account_id)
deposit_taxes_id = fields.Many2many("account.tax", string="Customer Taxes", help="Taxes used for deposits", default=_default_deposit_taxes_id)
@@ -70,8 +72,8 @@ class SaleAdvancePaymentInv(models.TransientModel):
account_id = order.fiscal_position_id.map_account(prop_id)
if not account_id:
raise UserError(
- _('There is no income account defined for this product: "%s". You may have to install a chart of account from Accounting app, settings menu.') % \
- (self.product_id.name,))
+ _('There is no income account defined for this product: "%s". You may have to install a chart of account from Accounting app, settings menu.') %
+ (self.product_id.name,))
if self.amount <= 0.00:
raise UserError(_('The value of the down payment amount must be positive.'))
diff --git a/addons/sale/wizard/sale_make_invoice_advance.xml b/addons/sale/wizard/sale_make_invoice_advance_views.xml
similarity index 98%
rename from addons/sale/wizard/sale_make_invoice_advance.xml
rename to addons/sale/wizard/sale_make_invoice_advance_views.xml
index 436acda185a..3a9b25d0701 100644
--- a/addons/sale/wizard/sale_make_invoice_advance.xml
+++ b/addons/sale/wizard/sale_make_invoice_advance_views.xml
@@ -1,6 +1,5 @@
-
-
+
Invoice Orders
sale.advance.payment.inv
@@ -61,5 +60,4 @@
sale.order
-
-
+