-
-
Notifications
You must be signed in to change notification settings - Fork 694
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] account_receipt_sale: invoice word occurrences
- Loading branch information
Showing
8 changed files
with
204 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_sale_advance_payment_rec,access.sale.advance.payment.rec,model_sale_advance_payment_rec,sales_team.group_sale_salesman,1,1,1,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo noupdate="1"> | ||
<record id="sale_advance_payment_rec_rule" model="ir.rule"> | ||
<field name="name">Sales Advance Payment Receipt Rule</field> | ||
<field name="model_id" ref="model_sale_advance_payment_rec" /> | ||
<field name="domain_force">[('create_uid', '=', user.id)]</field> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
~ Copyright 2024 Sergio Zanchetta - PNLUG APS | ||
~ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
--> | ||
<odoo> | ||
<record id="view_sale_advance_payment_rec" model="ir.ui.view"> | ||
<field name="name">Receipt Orders</field> | ||
<field name="model">sale.advance.payment.rec</field> | ||
<field name="arch" type="xml"> | ||
<form string="Receipt Sales Order"> | ||
<p class="oe_grey"> | ||
Receipts will be created in draft so that you can review | ||
them before validation. | ||
</p> | ||
<group> | ||
<field | ||
name="count" | ||
attrs="{'invisible': [('count','=', 1)]}" | ||
readonly="True" | ||
/> | ||
<field | ||
name="advance_payment_method" | ||
string="Create Receipt" | ||
class="oe_inline" | ||
widget="radio" | ||
attrs="{'invisible': [('count','>',1)]}" | ||
/> | ||
<field name="has_down_payments" invisible="1" /> | ||
<label | ||
for="deduct_down_payments" | ||
string="Pippo" | ||
attrs="{'invisible': ['|', ('has_down_payments', '=', False), ('advance_payment_method', '!=', 'delivered')]}" | ||
/> | ||
<div | ||
attrs="{'invisible': ['|', ('has_down_payments', '=', False), ('advance_payment_method', '!=', 'delivered')]}" | ||
id="down_payment_details" | ||
> | ||
<field name="deduct_down_payments" nolabel="1" /> | ||
<label for="deduct_down_payments" /> | ||
</div> | ||
<field | ||
name="product_id" | ||
context="{'default_invoice_policy': 'order'}" | ||
class="oe_inline" | ||
invisible="1" | ||
/> | ||
<label | ||
for="amount" | ||
attrs="{'invisible': [('advance_payment_method', 'not in', ('fixed','percentage'))]}" | ||
/> | ||
<div | ||
attrs="{'invisible': [('advance_payment_method', 'not in', ('fixed','percentage'))]}" | ||
id="payment_method_details" | ||
> | ||
<field name="currency_id" invisible="1" /> | ||
<field | ||
name="fixed_amount" | ||
attrs="{'required': [('advance_payment_method', '=', 'fixed')], 'invisible': [('advance_payment_method', '!=','fixed')]}" | ||
class="oe_inline" | ||
/> | ||
<field | ||
name="amount" | ||
attrs="{'required': [('advance_payment_method', '=', 'percentage')], 'invisible': [('advance_payment_method', '!=', 'percentage')]}" | ||
class="oe_inline" | ||
/> | ||
<span | ||
attrs="{'invisible': [('advance_payment_method', '!=', 'percentage')]}" | ||
class="oe_inline" | ||
>%</span> | ||
</div> | ||
<field | ||
name="deposit_account_id" | ||
options="{'no_create': True}" | ||
class="oe_inline" | ||
attrs="{'invisible': ['|', ('advance_payment_method', 'not in', ('fixed', 'percentage')), ('product_id', '!=', False)]}" | ||
groups="account.group_account_manager" | ||
/> | ||
<field | ||
name="deposit_taxes_id" | ||
class="oe_inline" | ||
widget="many2many_tags" | ||
domain="[('type_tax_use','=','sale')]" | ||
attrs="{'invisible': ['|', ('advance_payment_method', 'not in', ('fixed', 'percentage')), ('product_id', '!=', False)]}" | ||
/> | ||
</group> | ||
<footer> | ||
<button | ||
name="create_invoices" | ||
id="create_invoice_open" | ||
string="Create and View Receipt" | ||
type="object" | ||
context="{'open_invoices': True}" | ||
class="btn-primary" | ||
/> | ||
<button | ||
name="create_invoices" | ||
id="create_invoice" | ||
string="Create Receipt" | ||
type="object" | ||
/> | ||
<button | ||
string="Cancel" | ||
class="btn-secondary" | ||
special="cancel" | ||
/> | ||
</footer> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="action_view_sale_advance_payment_rec" model="ir.actions.act_window"> | ||
<field name="name">Create receipts</field> | ||
<field name="type">ir.actions.act_window</field> | ||
<field name="res_model">sale.advance.payment.rec</field> | ||
<field name="view_mode">form</field> | ||
<field name="target">new</field> | ||
<!-- TODO: check if we need this --> | ||
<field name="binding_model_id" ref="sale.model_sale_order" /> | ||
<field name="binding_view_types">list</field> | ||
</record> | ||
|
||
</odoo> |