Prior to this commit it was not possible to get a hook from
sale.advance.payment.inv in order to get the created invoices.
The create_invoices def returns either an action or an ir.actions.act_window_close
The introduction of the _create_invoices def will allow to get the created invoices
from the wizzard.
task-2608812
Closes: #79926
Current behavior :
When creating payment from invoice, the payment had the wrong sales team id
Steps to reproduce :
- Create atleast 2 invoices with different sales team and same partner
- Register payments for every invoice
- Go in payments list view
- Filter on partner and group by sales team
- All the payments are grouped in the same sales team
opw-2681041
closesodoo/odoo#82114
X-original-commit: 2f3ebe86b2d520dd9c7570f60056f200bb091aab
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
How to reproduce:
- Have a databas with 2 companies (A and B)
- Create and confirm a sale with company A
- Switch to company B
- Create a down payment invoice.
Bug:
When generating an invoice from a sale, the company of the invoice
should always be the one from the sale.
closesodoo/odoo#80523
Opw: 2631354
X-original-commit: a345d2f4a45179b1c3cecb5be983d3ef2435d0f8
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
When a user was opening the payment_link_wizard and tried to select a
preferred payment acquirer, he was getting an AccessError telling that
he was not allowed to access 'payment.acquirer' records.
Fix PR #69334 (task-2504225)
task-2666881
closesodoo/odoo#80005
X-original-commit: 2ff580c073ac105219582dbf2108a1437645c9b5
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
In this commit some reorganization is performed within mail compose message
code. Purpose is to reorder a bit methods by main usage: onchange, CRUD,
actions, values generation with rendering and template management.
Some renaming is performed on action methods, notably send_mail that has some
impact on sub-addons. Finally we also set onchange and sub-onchange methods
private.
No functional change should be implied by this commit.
LINKS
Task ID-2377974
Community PR odoo/odoo#61467
Enterprise PR odoo/enterprise#14633
Define `data-hotkey` on most used action buttons.
For the modals, the following keys are dedicated for "special"
actions:
- Alt+G: add
- Alt+V: save
- Alt+Z: cancel
closesodoo/odoo#73275
Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Actually, salesmen have to add manually the acquirer_id to the link, and it isn't user-friendly. The dropdown will show the possibility to add the acquirer_id.
Task #2504225closesodoo/odoo#69334
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Valentin Chevalier <vcr@odoo.com>
This commit replaces the old online payments API of the `payment`
module with the new one and adapts to it all the implementing modules.
See the merge commit for more details.
task-2085989
task-2119838
task-2165982
task-2289255
Co-authored-by: Victor Feyens <vfe@odoo.com>
Steps:
- Go to Settings > Users & Companies > Companies
- Create a new company (1)
- Install a payment acquirer and Website
- Go to Website > Configuration > Settings:
- Select "My Website 2"
- Assign it to company (1)
- Add a custom domain
- Save
- Switch to company (1)
- Go to Invoicing
- Create a new Invoice:
- Add a product line
- Post it
- Click Action > Generate a Payment Link
Bug:
The base domain is used instead of the domain of the website linked to
the invoicing company.
Explanation:
The app only uses the URL on which the user has logged in to generate a
payment link. If the user has multiple companies, this can confuse
customers if they land on another domain than the one they are used to.
This commit makes the app use the domain of the website of the record
linked to the payment if it has one.
opw:2440251
closesodoo/odoo#65938
X-original-commit: 700dba53843e71f5f34c86305cc658d9273914aa
Signed-off-by: backspac <backspac@users.noreply.github.com>
- Set a customer language to a different language, e.g. French
- Create a SO, add a product and validate
- Create a down payment
The down payment invoice is partially translated in French.
This was first solved in fc659d3f78 but broken in
0e73eca1364c8e0df93cd.
opw-2365982
closesodoo/odoo#61207
X-original-commit: f10b98d1776659f291b2f7f8a4a2111e4f106667
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When generating a payment link through the payment link wizard, the
company was previously not included. This could cause accounting issues
if the acquirer displayed to the customer were not part of the same
company as the underlying document that generated the link.
This commit add a new computed field 'company_id' on the wizard model
that gets computed based on the underlying model; this field will be
included in links generated by the wizard to limit the acquirers
displayed to those of the that company, preventing extra acocunting
steps (interco reconciliation).
opw-2254011
closesodoo/odoo#51441
X-original-commit: a6fcd7e0cfec8d4c62620a53b5fa806561e239af
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
* The first tour is starting in the sale app dashboard and ensures
the user goes through the needed configuration steps
* The second tour starts in the new Quote form and shows the flow to
send a quote to a customer
TaskID: 2187222
Closes: #46167
- Create journal entries as soon as bank/cash statement lines are created, temporary booked on a suspense account set on the journal.
- Simplify the management of "blue" lines in the reconciliation widget. A "blue" line is now a journal item using a temporary liquidity account (outstanding payment/receipt accounts, set on the journal).
- Adapt and simplify the bank reconciliation report.
- Remove the bank reconciliation threshold date. The reconciliation report will show the not already reconciled journal entries using a liquidity account and the not already reconciled journal entries using a temporary liquidity account. Without accounting, an account.payment will involve directly the liquidity account and then, will be considered as a statement line directly.
- Remove the post_at bank reconciliation feature. The "paid" state will be set on the invoices only if reconciled with a journal entry involving the journal's liquidity account.
With invoicing, the payment will do that so the "in_payment" state should never be shown up.
With accounting, only the statement lines have the power to move an invoice to the "paid" state.
- Fix various corner cases about the management of multi-currency in bank statement lines.
- Fix the conversion dates in multi-currency: Since the bank/cash is always used on the statement lines, it will use always the real "bank" date instead of the fictive payment one.
- Ensure the 'reconcile' method will raise an error if the involved moves are not posted.
related enterprise PR odoo/enterprise#7019closesodoo/odoo#41301
--task: 2092096
Related: odoo/upgrade#1018
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Before this commit, Payment URL was not encoded correctly which can compute Payment refernece Wrongly on website.
Eg,
Enter Description which contains Special Characters
Go to Payment Page using Computed URL.
There will be wrong Payment Reference on Payment page.
With this commit, We encode Payment reference before generating Payment URL.
closesodoo/odoo#47387
X-original-commit: 6ebcc43d177b9333afa73ee90e976d57111aaf3d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Steps to reproduce the bug:
- In debug mode, create a SO
- Confirm the SO
- Click on "Create invoice"
- In the wizard, click on the debug logo
- Set a User default value V for Downpayment amount
- Close the wizard
- Re-click on "Create invoice"
Bug:
The default value V was not suggested.
Fine tuning of c258b8a0427bd5aface891ed1f4420174f4afde4
opw:2184367
closesodoo/odoo#45512
X-original-commit: f95550d59ddeb8a77cb7b72592cc4aafb210aa25
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Before this fix, an empty sale order produced a traceback when the invoice was created.
closesodoo/odoo#42750
Taskid: 1997415
Related: odoo/enterprise#7540
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Currently when creating an SO without any products and creating
down payment for that creates a traceback.
so Fix traceback when creating an invoice for sale order with an empty
product. when there is no orderline then do not get the sequence in down
payment line to make down payment line at last in sales order.
Task-2181464
closes odoo/odoo#44645
Closes: #44491
X-original-commit: 5e3e127187130a3d6dac98920564598a05d9c627
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Following changes needing ir.model.access on transient models too.
Remove groups declaration on the action to move it to ir.model.access
when possible.
Rules are strict by default with no unlink access by default and high
priviledge asked. Adaptations may be needed later.
Write access is given as a wizard may need to be modified in case the
action triggers an error and the user has to correct a value
account*: use account.group_account_user for all transient by default
remove account.print.journal relic
stock*: use stock.group_stock_user by default
survey: survey user can send invitations
mail: allow any employee to execute wizards
additional verifications are made to ensure they are executed
only on the documents the user has access to you
give portal access to mail.compose.message as portal still does
some actions like posting messages on the forum
add ir.rule to avoid reading somebody else messages
increase the query count because of undeterminist count
crm: saleman for lead2opp, manager for massmailing
partner manager for actions linked to partners
avoid a write in test_lead_lost
sms: any employee can send sms
mrp: mrp user can execute wizards
give unlink access as making write during do_produce operation
base_import: employees can import files
delivery: stock user can deliver
event_sale: sale user can configure the wizards
event user inherit from sale rights
gamification: employee can give badge
google_service: resolve FIXME
hr: add specific rights
manager can set a plan according to group on button
anyone who can write on an employee can register a departure
hr_expense: set rights based on buttons
hr_holidays: an approver can make a summary report
hr_recruitment: recruiter can refuse a candidate
hr_timesheet: can use the wizard if can create a timesheet
l10n_eu_service: managers can create fiscal positions
mass_mailing: same group as on mass.mailing.list
membership: accountant can create invoice from membership
payment: accountant can create a link
as the source is an account.move
keep the payment.acquirer.onboarding.wizard to system user
only as it is called during company configuration
point_of_sale: PoS manager only can use wizards
never create closing_balance_confirm_wizard records
product_expiry: stock user has rights on stock.picking
product_margin: access from accounting menus
repair: same rules as for above models
sale: set ir.rule for self wizard only
add rule from model introduced in payment to add salesman group
sale_crm: saleman can create a quotation from a lead
sale_coupon: any saleman can generate coupon
add self ir.rule
sale_product_configurator: salesman can select product variants
snailmail: employee can send letters
website: designers can write on website
website_crm_partner_assign: same rule as group on action
website_sale: sale ACL as for payment.acquirer.onboarding.wizard
website_slides: anyone can send invitation
base: base.language.*: allow employee (cf lang_install)
change.password.user: can not read change password wizard of
other users
test.*: no access is needed
Courtesy of Damien Bouvy, William Andre and Antoine Prieëls for review
of acl
Fill bank account information for the current company
Create an Invoice by hand, under "Other info" tab the Bank Account
section is filled.
Now create a Sale order, confirm it and create the invoice.
The invoice created from the sale order is missing the Bank Account
section, this in turn disable the QR code generation. Adding th
erequired information when creating the invoice from the sale
order fix the issue
opw-2181580
closesodoo/odoo#44353
X-original-commit: bea0ee1f484bd25fab1ed4170d88629c4fb2709c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit there were two buttons on this wizard with the same name 'create_invoices' that do different things. One creates the invoice and the other one creates and opens the invoices. By setting an unique ID on both buttons we can do a clean and easy xpath. Something like button[@id='create_invoice_open'] instead of having to use indexes or dangerous behaviours
closesodoo/odoo#44072
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
This method makes a write on res.company but many people do not have
access to the company
closesodoo/odoo#42644
X-original-commit: 130f08f13b49a529c1da0e1dc603c62337842f45
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
On a Sale order having customer with bank information available create
an invoice (down payment).
Bank information will not be available.
This append because the company_id is not provided to the create and
bank information will not be available
https://github.com/odoo/odoo/blob/12.0/addons/account/models/account_invoice.py#L549
opw-2153810
closesodoo/odoo#41902
X-original-commit: 097db42b0302c769a6584004d7a9cbbc03856de7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Purpose of the task is be able to cancel an order if the products have
been delivered or if an invoice has already been confirmed
-the remaining pickings (back orders) should be cancelled.
-the draft invoices should be cancelled too.
[IMP] product_expiry: compute method should iterate on self
task-1919761
Closes#29920
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Co-authored-by: Hiral Bhavsar <hbh@odoo.com>
Purpose of the commit is if sales order is very long, the down payment
gets lost in the middle of it and will be best to make it appear
systematically at the end of it.
currently the sales order line is order by the sequence and while
creating the down payment it takes the default sequence of the line
so adding sequence by +1 will show the down payment at the end.
task-2025709
closes odoo/odoo#34404
Closes: #34404
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
In the sales modules, set a down payment product with a different UoM
than the default one.
If you create an invoice, select the down payment option, click on
create and view.
Before this commit:
- The down payment tax & UoM are not on the invoice line
After this commit:
- They are on the invoice line, like in V12
OPW-2086146
closesodoo/odoo#39569
X-original-commit: 06db4135d4aabaa7cb2a0d593be2dff11f8c4617
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The modifications are applied in account, sale and website_sale
- Changed description to "Choose your default customer payment method."
- Removed the "Pay with" from labels in Modal
- In sale: Renamed "Confirmation & Payment" to "Payment Method"
task-2032586
Inconsistent filters on the product_id many2one fields.
We should never use a "search_default_*" on a many2one field,
because this will only apply in the Search More popup and not
on the auto-completion.
We should always use a domain, as it will apply in both cases.
id=1944237
closesodoo/odoo#36009
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
When generating a link for a payment through the website_payment/pay
route, including the partner_id 'blindly' is somewhat of a security
issue since it means you could potentially create payments for any
partner of your choosing.
This commit instead introduces an access token mechanism where the
partner_id, amount and currency_id are used to generate a unique access
token that can be checked upon accessing the payment page. This token
is only checked if the partner_id field is set (otherwise this is just
an anonymous payment like any other).
Purpose of the task is, there is no easy way to request custom online
payments on sales orders or invoices. The only way is to create an
URL manually: /website_payment/pay?reference=inv-008&amount=123¤cy_id=1
So added menu 'Generate payment link' in action in sales order and invoice.
while making payment pass the partner so reconcilation account flow should not
break as partner_id on account payment is reauired to reconcile.
co-authored-by: sza-odoo <sza@odoo.com>
Task-1938635
Closes: #31575
One cannot override the attribute `selection`, and list selections can only be
extended with `selection_add`.
Adapt the bad extensions to be consistent with the new warnings
closesodoo/odoo#35663
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
While creating the invoice order, if you choose the radio button of
Down Payment(Fixed amount) then the field with currency will be shown
and if you choose the Down Payment(Percentage) then the field with
percentage symbol will be shown and evaluated respectively.
task-2033229