[IMP] account: sale or purchase receipt active from account settings
Purpose: If the user is not using receipt functionality in his organization then it's can be hidden. Current behavior before PR: Sale and purchase receipt by default show when the account module is instaled. Desired behavior after PR is merged: Now users can activate Sale or purchase receipt from accounting settings. closes odoo/odoo#44464 Task: 2028813 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit is contained in:
committed by
Jigar Vaghela
parent
dc10774d52
commit
7b9e13e091
@@ -43,6 +43,10 @@ class ResConfigSettings(models.TransientModel):
|
||||
"Show line subtotals with taxes (B2C)",
|
||||
implied_group='account.group_show_line_subtotals_tax_included',
|
||||
group='base.group_portal,base.group_user,base.group_public')
|
||||
group_show_sale_receipts = fields.Boolean(string='Sale Receipt',
|
||||
implied_group='account.group_sale_receipts')
|
||||
group_show_purchase_receipts = fields.Boolean(string='Purchase Receipt',
|
||||
implied_group='account.group_purchase_receipts')
|
||||
show_line_subtotals_tax_selection = fields.Selection([
|
||||
('tax_excluded', 'Tax-Excluded'),
|
||||
('tax_included', 'Tax-Included')], string="Line Subtotals Tax Display",
|
||||
|
||||
@@ -66,6 +66,14 @@
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
|
||||
<record id="group_sale_receipts" model="res.groups">
|
||||
<field name="name">Sale Receipt</field>
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
<record id="group_purchase_receipts" model="res.groups">
|
||||
<field name="name">Purchase Receipt</field>
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
|
||||
<record id="account_analytic_line_rule_billing_user" model="ir.rule">
|
||||
<field name="name">account.analytic.line.billing.user</field>
|
||||
|
||||
@@ -1436,6 +1436,7 @@ if records:
|
||||
id="menu_action_move_out_receipt_type"
|
||||
action="action_move_out_receipt_type"
|
||||
parent="account.menu_finance_receivables"
|
||||
groups="account.group_sale_receipts"
|
||||
sequence="1"/>
|
||||
|
||||
<menuitem
|
||||
@@ -1454,6 +1455,7 @@ if records:
|
||||
id="menu_action_move_in_receipt_type"
|
||||
action="action_move_in_receipt_type"
|
||||
parent="account.menu_finance_payables"
|
||||
groups="account.group_purchase_receipts"
|
||||
sequence="1"/>
|
||||
|
||||
<menuitem
|
||||
|
||||
@@ -293,6 +293,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="show_sale_receipts">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_show_sale_receipts" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane" name="show_sale_receipts_right_pane">
|
||||
<label for="group_show_sale_receipts"/>
|
||||
<div class="text-muted">
|
||||
Active to create sale receipt
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Customer Payments</h2>
|
||||
<div class="row mt16 o_settings_container" id="pay_invoice_online_setting_container">
|
||||
@@ -372,6 +383,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="show_purchase_receipts">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_show_purchase_receipts" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane" name="show_purchase_receipts_right_pane">
|
||||
<label for="group_show_purchase_receipts"/>
|
||||
<div class="text-muted">
|
||||
Active to create purchase receipt
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Vendor Payments</h2>
|
||||
<div class="row mt16 o_settings_container" id="print_vendor_checks_setting_container">
|
||||
|
||||
Reference in New Issue
Block a user