New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.0] [ADD] stock_picking_invoicing_unified #128
[8.0] [ADD] stock_picking_invoicing_unified #128
Conversation
… pickings at once
@lbellier maybe you will want to have a look at this module |
LGTM 👍 |
…not the price ! Give default value to journals (to behave like the stock_account module on this point) Replace [:1] by [0], to make it easier to read Add summary key in __openerp__.py Re-phrase some parts of README.rst
This is a really great module, I wanted to develop it one day, and you did it before me :) I made a PR to enhance it: The main change in my PR is that, for a return, the quantity should be < 0, not the price ! For example, you sell 2 units and the customer returns 1. With your implementation, in the invoice stats, you will see that you sold 3 units ! And if you want to do statistics on the average sell price for a particular product, it breaks it too. My PR also adds default value to journals, to keep the same behavior on that point. |
journal_id = fields.Many2one(required=False) | ||
sale_journal = fields.Many2one( | ||
comodel_name='account.journal', string='Sale Journal', | ||
domain="[('type', '=', 'sale')]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For curiosity: is there a good reason to use domain as a string, instead of sequence: domain=[('type', '=', 'sale')] ? I usually declare domains as a sequence in my Python code, not as a string... but I don't know if it is equivalent or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course it can be a list of tuples! Maybe a copy/paste from an XML view leads to this.
@alexis-via, I haven't put negative quantities because I remember a constraint that prevents it. Did you check it? |
@pedrobaeza I didn't hit such a constraint during my tests. AFAIK, it is possible to have a negative quantity on invoice line. |
…ed-alexis stock_picking_invoicing_unified: for a return, qty should be < 0, not the price (plus some other details)
👍 let's merge it ! |
@pedrobaeza In the "models" subdir, the file stock_picking.py should be renamed stock_move.py |
@alexis-via, changes done. |
Test steps:
It will not break any flow nor produce wrong accounting entry, but IMHO it will make untrained users confuse. Better put explanation on known issue. Other then that 👍 |
The form view issue can't be solved easily. The only solution is to avoid the opening in form view. I'll merge this one and noted that problem as an issue. The standard also has that problem. |
…nified [8.0] [ADD] stock_picking_invoicing_unified
Stock Picking Invoicing Unified
Odoo allows to select several pickings and click on "Create Draft Invoices"
option for creating the corresponding invoice(s) depending if you have
selected several partners and if you have marked the "Group by partner"
check.
But it only takes into account the first picking for selecting the type of the
invoice you are going to create (customer/supplier invoice/refund), mixing all
the lines on it. And not only that: if you have returned pickings, the returned
quantities are summed to the rest, instead of decreasing the amount to invoice,
which is the common practise when you have some returns.
This module overpasses this limitation, allowing to invoice them all together
without having to worry about that, and also having the extra feature of
reducing the amount in the invoice when you have delivered or received goods
and some of them (or previous ones) have been returned, instead of needing
to create 2 invoices and to conciliate them for the final/real amount.
Usage
Warehouse > All Operations and click on any of the lines,
Purchases > Invoice Control > On Incoming Shipments, etc).
created are computed, and you have to select the journals for that types.
with negative price unit.
Known issues / Roadmap