Skip to content
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

[14.0] Mixed MR's #8

Open
wants to merge 14 commits into
base: 14.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.21.1
_commit: v1.22
_src_path: gh:oca/oca-addons-repo-template
ci: GitHub
convert_readme_fragments_to_markdown: false
Expand All @@ -17,6 +17,8 @@ org_name: Odoo Community Association (OCA)
org_slug: OCA
rebel_module_groups:
- product_tax_multicompany_default
- product_supplierinfo_intercompany,product_supplierinfo_intercompany_multi_company,product_supplierinfo_group_intercompany
- stock_intercompany
repo_description: Addons for the management of multi company instances as well as
repo_name: Multi company modules
repo_slug: multi-company
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ jobs:
include: "product_tax_multicompany_default"
name: test with OCB
makepot: "true"
- container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest
include: "product_supplierinfo_intercompany,product_supplierinfo_intercompany_multi_company,product_supplierinfo_group_intercompany"
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest
include: "product_supplierinfo_intercompany,product_supplierinfo_intercompany_multi_company,product_supplierinfo_group_intercompany"
name: test with OCB
makepot: "true"
- container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest
include: "stock_intercompany"
name: test with Odoo
Expand All @@ -50,10 +57,10 @@ jobs:
name: test with OCB
makepot: "true"
- container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest
exclude: "product_tax_multicompany_default,stock_intercompany"
exclude: "product_tax_multicompany_default,product_supplierinfo_intercompany,product_supplierinfo_intercompany_multi_company,product_supplierinfo_group_intercompany,stock_intercompany"
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest
exclude: "product_tax_multicompany_default,stock_intercompany"
exclude: "product_tax_multicompany_default,product_supplierinfo_intercompany,product_supplierinfo_intercompany_multi_company,product_supplierinfo_group_intercompany,stock_intercompany"
name: test with OCB
makepot: "true"
services:
Expand Down
12 changes: 12 additions & 0 deletions purchase_sale_inter_company/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,19 @@ class ResCompany(models.Model):
default="raise",
help="Pick action to perform on sync picking failure",
)
sync_picking_state = fields.Boolean(
string="Sync the receipt state with the delivery state",
default=lambda p: p.sync_picking,
help="State of receipt picking syncs with state of the delivery "
"from the source company. Note this disallows user to manually "
"correct or change a picking that did not sync properly.",
)
block_po_manual_picking_validation = fields.Boolean(
string="Block manual validation of picking in the destination company",
)
notify_user_id = fields.Many2one("res.users", "User to Notify")
notification_side = fields.Selection(
[("so", "Sale Order Source Company"), ("po", "Purchase Destination Company")],
default="so",
help="Select which Company side to notify",
)
6 changes: 6 additions & 0 deletions purchase_sale_inter_company/models/res_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ class InterCompanyRulesConfig(models.TransientModel):
)
sync_picking_failure_action = fields.Selection(
related="company_id.sync_picking_failure_action",
)
sync_picking_state = fields.Boolean(
related="company_id.sync_picking_state",
readonly=False,
)
block_po_manual_picking_validation = fields.Boolean(
Expand All @@ -61,3 +64,6 @@ class InterCompanyRulesConfig(models.TransientModel):
help="User to notify incase of sync picking failure.",
readonly=False,
)
notification_side = fields.Selection(
related="company_id.notification_side", string="Notify", readonly=False
)
8 changes: 7 additions & 1 deletion purchase_sale_inter_company/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ def action_confirm(self):
for order in self.filtered("auto_purchase_order_id"):
for line in order.order_line.sudo():
if line.auto_purchase_line_id:
line.auto_purchase_line_id.price_unit = line.price_unit
qty = line.product_uom_qty
if qty:
line.auto_purchase_line_id.price_unit = (
line.price_subtotal / qty
)
else:
line.auto_purchase_line_id.price_unit = 0.0
res = super().action_confirm()
for sale_order in self.sudo():
dest_company = sale_order.partner_id.ref_company_ids
Expand Down
Loading
Loading