Merge branch '11.0' into 11.0-WIP-sale_planner

This commit is contained in:
Jared Kipe
2018-09-18 13:34:39 -07:00
3 changed files with 62 additions and 5 deletions

View File

@@ -0,0 +1,28 @@
******************************
Hibou - Account Invoice Margin
******************************
Include a margin calculation on invoices.
For more information and add-ons, visit `Hibou.io <https://hibou.io/docs/hibou-odoo-suite-1/invoice-margin-156>`_.
=============
Main Features
=============
* Adds computed field `margin` to invoices to give the profitability by calculating the difference between the Unit Price and the Cost.
.. image:: https://user-images.githubusercontent.com/15882954/45578631-880c0000-b837-11e8-9c4d-d2f15c3c0592.png
:alt: 'Customer Invoice'
:width: 988
:align: left
=======
License
=======
Please see `LICENSE <https://github.com/hibou-io/hibou-odoo-suite/blob/11.0/LICENSE>`_.
Copyright Hibou Corp. 2018

View File

@@ -39,10 +39,11 @@ class HrPayrollRegisterPaymentWizard(models.TransientModel):
context = dict(self._context or {})
active_ids = context.get('active_ids', [])
payslip = self.env['hr.payslip'].browse(active_ids)
amount = 0.0
for line in payslip.move_id.line_ids:
if line.account_id.internal_type == 'payable' and line.partner_id.id == payslip.employee_id.address_home_id.id:
amount += abs(line.balance)
amount = -sum(payslip.move_id.line_ids.filtered(lambda l: (
l.account_id.internal_type == 'payable'
and l.partner_id.id == payslip.employee_id.address_home_id.id
and not l.reconciled)
).mapped('balance'))
return amount
@api.model
@@ -142,7 +143,7 @@ class HrPayrollRegisterPaymentWizard(models.TransientModel):
if line.account_id.internal_type == 'payable':
account_move_lines_to_reconcile |= line
for line in payslip.move_id.line_ids:
if line.account_id.internal_type == 'payable' and line.partner_id.id == self.partner_id.id:
if line.account_id.internal_type == 'payable' and line.partner_id.id == self.partner_id.id and not line.reconciled:
account_move_lines_to_reconcile |= line
account_move_lines_to_reconcile.reconcile()

View File

@@ -0,0 +1,28 @@
***********************************
Hibou - Reorder Rules Per Warehouse
***********************************
Run the inventory scheduler per warehouse.
For more information and add-ons, visit `Hibou.io <https://hibou.io/docs/hibou-odoo-suite-1/reorder-rules-per-warehouse-163>`_.
=============
Main Features
=============
* Extends the `stock.scheduler.compute` wizard to allow the inventory scheduler to run on demand per warehouse.
.. image:: https://user-images.githubusercontent.com/15882954/45578023-f353d300-b833-11e8-8007-48fa3d96495a.png
:alt: 'Run Scheduler Wizard'
:width: 988
:align: left
=======
License
=======
Please see `LICENSE <https://github.com/hibou-io/hibou-odoo-suite/blob/11.0/LICENSE>`_.
Copyright Hibou Corp. 2018